Hello, I've spend the whole afternoon trying to make this work, i've read all the comments but i did't find a solution. Could anyone help me ? thank you.
I configured slogger_config and all. Here's what i get when i run slogger:
Last login: Fri Nov 16 16:09:28 on ttys000 MacBook-Pro-de-Horkken:~ Horkken$ /Users/Horkken/Documents/Slogger/slogger ; exit; /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 15, col 13: star_posts: true' (ArgumentError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in load' from /Users/horkken/Documents/Slogger/lib/configtools.rb:11:inload_config' from /Users/horkken/Documents/Slogger/lib/configtools.rb:11:in open' from /Users/horkken/Documents/Slogger/lib/configtools.rb:11:inload_config' from /Users/horkken/Documents/Slogger/slogger.rb:77:in initialize' from /Users/horkken/Documents/Slogger/slogger.rb:272:innew' from /Users/horkken/Documents/Slogger/slogger.rb:272 from /Users/horkken/Documents/Slogger/slogger:9:in `require' from /Users/horkken/Documents/Slogger/slogger:9 logout
Hey there just wanted to give you a quick heads up. The words in your post seem to be running off the screen in Opera. I'm not sure if this is a formatting issue or something to do with browser compatibility but I thought I'd post to let you know. The design and style look great though! Hope you get the issue fixed soon. Many thanks
RSS feeds aren't working anymore, the only thing I have done was added a second rss feed, but it was giving me the same thing, and so I removed the second one and now all I get is the following:
I, [2012-08-24T12:57:44.233428 #41597] INFO -- : Loading last.fm logger for user btiede I, [2012-08-24T12:57:48.181850 #41597] INFO -- : Loading RSS logger for feeds http://feeds.feedburner.com... /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:393:in const_defined?': wrong constant name Date.Taken (NameError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:393:instart_else_element' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:347:in tag_start' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/streamparser.rb:24:inparse' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:201:in parse_stream' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/rexmlparser.rb:22:in_parse' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:164:in parse' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:79:inparse' from /Slogger/lib/rsslogger.rb:47:in log_rss' from /Slogger/lib/rsslogger.rb:41:ineach' from /Slogger/lib/rsslogger.rb:41:in `log_rss' from /Slogger/slogger:52 logout
Brett - Cool idea. Heard you talk about it on Systematic the other day with the Day One guys. Made me think of Cory Doctorow's Flashbake script. It does something similar, embedding information into git commit messages. Just thought you might be interested if you hadn't already known about this.
Are the lastfm's tags working? They are not be added in my posts. Also, regarding lastfm inline links, I got bugs in some links, which includes parenthesis. I think that parenthesis bust be escaped.
that claims to insert an image at the date it was created rather than the current date. Does this get the date from the image data (EXIF?) or does it just use the date the file was created on the machine?
I keep coming back to these comments and getting ideas and decided to put together an RSS Resource for Slogger for those wanting to add various RSS feeds to this awesome service that Brett has made available to us. My way of trying to be as generous as Brett is.
Anyway, I have posted the file as a Gist and you can view or download it at:
I keep coming back to these comments and getting ideas and decided to put together an RSS Resource for Slogger for those wanting to add various RSS feeds to this awesome service that Brett has made available to us. My way of trying to be as generous as Brett is.
Anyway, I have posted the file as a Gist and you can view or download it at:
In it, I have listed RSS data for the following services, in case you want to add the feed to your Slogger setup.
Blogger Dropbox Evernote Facebook Flickr Foursquare Instagram InstaPaper LinkedIn Picasa Pinterest StumbleUpon – Get the RSS feed of likes of any SU user Twitter Tumblr WordPress hosted YouTube
For services that don't offer an RSS feed, I suggest my 'Twitter hack' that has been described previously and that I also include in the doc.
Feel free to make corrections and additions and share.
I've been using slogger now for a couple of weeks and just wanted to share an anecdote. A few nights ago my two year old woke up shortly after going to bed -- bad dream? He was inconsolable for quite a while and we all had a pretty bad night. Before i finally got to bed myself I wrote in Day One that it had been a hard evening. I woke up cranky. I opened up Day One and there was my last.fm history from the night before, listing the tracks he and I listened to while we had a wonderful dinner together. I had forgotten all about it, and slogger+Day One brought it back. Thanks, Brett!
This is truly awesome. After a bit of fiddling I have things set up so that any photo I take with Instagram on my iPhone appears as a new journal entry and also gets saved to my flickr photo stream. Used Hazel and IFTTT to hook it all together.
Really great to be able to do this. Now how do I get it to save my facebook status updates? I guess I can use IFTTT to save the status update to a text file in dropbox, but how can I get slogger to pick that up and insert it as a new Day One item? Anyone done that?
One temporary work-around would be to send your status updates to Twitter and pull the feed in that way.
If you don't want all of your FB status updates in your 'regular' Twitter account, create a separate Twitter account just for instances like this.
I have mentioned doing this before for the service, RunKeeper. They don't provide an RSS feed of my activities, but will post them to Twitter. So I set up a Twitter account to handle these posts and pull it into Day One via Slogger. I also use that Twitter account to pull in feeds from my Instapaper and Pinboard accounts so I can capture that info as well.
That's a great idea, will have a crack at that later. Now next question (sorry): I just uploaded two pictures to flickr from Aperture on my Mac in quick succession. I have IFTTT set up to copy the pictures to a dropbox folder and then a Hazel rule to watch that folder, run the slogger_image.rb script and then move the image out of that dropbox folder to an archive folder elsewhere. However only the 2nd image has ended up in Day One. Any ideas why or is this by design?
Actually scratch that, it's there now. I had to wait a bit and re-start Day One for it to appear for some unknown reason. WIll be more patient in future!
Brett - Loved your podcast interview with the Day One folks, and thanks for this great script. I am having trouble with the Last.fm functionality. The script only pulls the most recent 10 items from my Last.fm played tracks listing (basically the same tracks that appear in the "Recently Listened Tracks" section of my Last.fm user page at last.fm/user/username). It does not pull all the listened to tracks for the day, which for me numbers in the dozens. Is this the intended functionality, or should it be pulling all the tracks?
Well the symlink suggestion worked (Thanks Leo and Doc), but my tweets are still not getting through. I'm also trying the IFTTT idea, but I'm not sure how to write the applescript to get the tweets into Day One.
Not in its current form, no. As I've said multiple times here in the comments, this is undergoing a major refactoring and the any time put into the current codebase would be a waste.
Having a ball with Day One and would really like to get your Slogger code working, but I keep getting - `initialize': Path not specified or doesn't exist: ~/Dropbox/Apps/Day\ One/Journal.dayone (RuntimeError) - I've tried enclosing the full path in quotes and still no luck. I've also tried using the full path- no luck. What could I be doing wrong?
I had the same issue as you can see above. It way I fixed it was to give up and use icloud (against my better judgement). I though os symbolic linking it like Leo says above but I wasn't sure it was gona work. After reading Leo's comment I will tel it it would work but by that time I stuck with icloud and it is seamless.
working on the authentication integration. i have a standalone method that works just fine in getting the xml formatted response for my protected feed. however, when i copy that code into twitterlogger.rb, slogger throws the error "error getting timeline for @username", runtime error: failure getting a response from twitter" and the res = nil. i think i'm missing a dependency somewhere or not finding the right places to plug in the authentication calls. i'm just not experienced enough with ruby to know the gotchas. is this going to be something you add into the rewrite version you have mentioned? i really love the idea of slogger...
I can't, for the life of me, get the scheduling to work on Lingdon. If I 'get info' on my slogger file the 'Where' is /Users/Mario/Slogger. So therefore i set my 'What' in Lingon to /usr/bin/ruby Mario/Slogger/slogger. But it doesn't work. What am I missing?
To be more specific, it looks like your 'qualified file path' is incomplete. If you have Brett's 'install.rb' script do the work, you'll get the right path.
Thanks for the reply Leo. I didn't know how to run the install file to get the launch agent. What I ended up doing is creating an 'application' on Automator to run the terminal script then I scheduled this using Hazel by saying 'if' application hasn't been opened in over 24 hours then run the application. Long way round I know, but it works.
Another thing I noticed is that on the 'list view' on Day One, the markup isn't displaying for me. Its fine when I go into the entry but just seeing the 'code' in the list. Anyone else seeing this? I've contact Day One about it but just curious to see if is just me.
Yes, seeing exactly the same thing, though I have one Day One entry that has a Bold first line but when I edit it there is no markup. This goes away on this one entry when I swith off the "Auto-Bold first line" option in the settings. The markdown is showing OK in the entry view when in Non-editing mode.
Yes, seeing exactly the same thing, though I have one Day One entry that has a Bold first line but when I edit it there is no markup. This goes away on this one entry when I swith off the "Auto-Bold first line" option in the settings. The markdown is showing OK in the entry view when in Non-editing mode.
Hi Mario, Lingon ONLY works with launch daemon files. What you SHOULD do is follow the directions and do the install.rb thing, that puts the Slogger scheduling file in:
~/Library/LaunchAgents/com.brettterpstra.slogger
If you use Lingon 3 from the Mac app store you can ONLY see 'user services'... the older Lingon allowed you to see system level ones but that is forbidden by the MAS. You'll be able to see this file in Lingon 3.
To repeat: If you're a beginner with launch daemon/scheduling files, the best thing to do is have Matt's install script set up a Launch Agent for you.. then you can see what can be edited in Lingon.
really want to try this, have retina mbp with mountain lion. I am not a hardcore dev so I am not running Ruby. It looks like it is required and I have no problem installing it. Found a checklist here https://gist.github.com/330... but wanted find out if I need anything else but the base install?
Also My iOS DayOne was syncing to a dropbox folder called Day One now the app on the mac wants me to move it to Dropbox/Apps/Day One but iPhone doesn't allow me to select that folder. It seems now the phone/ipad wants Dropbox root. I'm I crazy?
OK I take all of that back because it started working after a restart of my machine. Now however I'm getting multiple copies of each image. It made 5 copies of each image before aborted. Any Ideas?
PS: All the images have unique names and for what it's worth the oddities of DayOne folder naming thing is still a problem but I've found a slight workaround by launching the program via clicking the Dayone.journal file to launch it.
So I was wondering if there was a way to see if the image dupes wee coming from the face that IG and Twitter both would contain the sam image data if the original IG was marked for sharing via Twitter. I tried posting on IG with no sharing and still got dupes. I also made a watched folder on my desktop called PicsILove and made Hazel run the (slogger_image.rb) shel script. When executes it then moves the image out of that folder to hopefully avoid the dupes and it still makes two copies. It a big step away from 5 or more but still confused why I'm getting dupes.
On a separate note would slogger type thing work as a shortcut to get my NVAlt notes into Day One using the same part of the script that adds the twitter feed?
BT, it's hard to tell if it's Hazel or the Twitter side for sure. I assumeed it was happening because of the script because console logs show QL errors and if I look at the folder listing as the action is happening, I can see the icon flickering between generic img icon and a thumbnail icon... Next thing I notice is the Dayone.journal package contents has a photos folder with 30 plus copies of photos.
Do you have a better idea for tracing or debug view of the scripts or Hazel?
Any thought about adding coverage of additions to pinboard? It might be interesting to see what one thought was important enough to bookmark on any given day.
Already built a Pinboard plugin for the next version. It's pretty simple to convert the rsslogger to read Pinboard, but I'll hold onto it until the next release as the codebase is all new and I don't want to code the plugin twice :).
I know both feeds work. However, when I run Slogger, I get this:
$ ruby slogger /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 8, col 35: ` http://blog.granneman.com/feed/ ]' (ArgumentError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load' from /Users/rsgranne/bin/Slogger/lib/configtools.rb:9:in `load_config' from /Users/rsgranne/bin/Slogger/lib/configtools.rb:9:in `open' from /Users/rsgranne/bin/Slogger/lib/configtools.rb:9:in `load_config' from slogger:28
Just so we're both sure we're not crazy, it looks like there's some syntax highlighting in your screenshot. Is that from a plugin or something on my site? I'm wondering if a syntax highlighter might have obscured the comma somehow...
Brett, Slogger is really cool. However, I have a couple of bugs/thoughts for you.
Here's the results when I ran Slogger last night:
$ ruby slogger I, [2012-08-09T00:00:06.477668 #1881] INFO -- : Loading last.fm logger for user rsgranne I, [2012-08-09T00:00:09.822241 #1881] INFO -- : Loading RSS logger for feeds http://www.chainsawonatireswing.com/feed/ Error expanding http://www.chainsawonatireswing.com/2012/08/08/how-to-fix-day-one-after-the-upgrade-if-the-app-opens-but-you-dont-see-your-journal-entries/ I, [2012-08-09T00:00:12.442129 #1881] INFO -- : Loading Twitter logger for user(s) scottgranneman I, [2012-08-09T00:00:19.294869 #1881] INFO -- : Loading gist logger for user /Users/rsgranne/bin/Slogger/lib/gistlogger.rb:9:in `initialize': No Gist user configured (RuntimeError) from slogger:70:in `new' from slogger:70
Two things:
<ol> <li>
Note the error grabbing my blog entry. No idea why that failed.
</li> <li>
Note the gist error - my config has these lines for gist:
gist_user: "" gist_tags: "@social @coding"
</li> </ol>
I don't use gist, & neither your example config nor the notes for Slogger said what to do if you didn't use a service. Can I simply remove the lines for gist? Or comment those lines out? You might want to include something about that in your notes.
It raises a warning, but shouldn't stop the script. If I recall my late-night thought process, you should be able to just remove the gist lines from the config and it won't run the gist logger.
I have an entirely ravamped code base in the works, so I'm doing no debugging on the current version. All of this is covered in the new code, though.
I would gladly pay to have this all turned into a more user friendly app. I'm a lawyer and command lines make me nervous. The concept is great, and I'd love to use it.
I realized last night --the first time I tried to run this automatically -- that if the MacBook is closed, this won't run.
Duh, right?
I don't suppose there's a conditional run that could run at the appointed time or the next time it wakes up? Also, something running on a server would be no good, as this assumes local-machine updates and has no authentication.
I'm not saying all of this as a passive way of asking for these features :-) Just double-checking my new assumptions that this may not work well for me unless I keep my MBA awake and connected.
(Of course, if what the devs said on your most recent podcast about IFTTT turns out to happen, that would make a lot of this work even better.)
There is a way to get scheduled tasks that were missed to run at the next possible time, I have to look it up and will add it to the instructions.
Running on a server is feasible, but you'd have to work out the details of transmitting to your local drive, either via Dropbox or a scheduled (S)FTP task that pulled down new files and stored them using a script locally. Lots of extra setup, but I might consider trying to build a system that allowed that more easily.
I too would like to use slogger to add my recent pinboard activity to Day One, but the (updated) version still gives the same error noted above.
Since my MBP isn't always on and I don't get to open it up everyday due to vagaries of toddler activity, I wonder of it would work to put slugger on a web hosting location, set a cron job to run daily, placing the resulting XML files in some destination there, and later rsyncing those new files to the macbook's Dropbox folder where my day one journal lives. Is that just asking for trouble?
ImageMagick, available through homebrew and elsewhere. It should just move on if it doesn't see that convert is available, but I might have to go back and peek at the code.
Thanks for this! Am quite happy to get this setup.
One error that I did run to, and might be helpful for others to know, was with the images. It seems that the folder they are stored in in iCloud isn't created until the first image is added in DayOne. The script errors out if its not there, so the fix was just manually adding an image into DayOne, and then automate the script with Hazel and everything started working a-ok.
I wouldn't, yet. I'm 90% of the way through a rewrite and things are going to change (it has a plugin architecture for adding new services, as an example).
Knowing you're 90% through a re-write... should I hold off for however long it takes for you to finish before I try and implement this? Not that I want to rush you, I'm more curious to know if I'll end up doing a lot of re-work on something that can way a few days/weeks to try.
Nah, if you get the current version up and running now, the update will only improve on what you have. At worst, you'll have to re-enter configuration details, but the current config file will translate fine.
Awesome, thanks. bought Day One today (iOS and OS X) and can't wait to see how this works/where the project goes. Pulling in content automatically should really add value to Day One... I wouldn't be surprised if they end up adding a lot of what you've accomplished to their app in a future update.
Updated to 1.0.3 but still cannot get the Instapaper and Pinboard RSS feeds through.
Not a problem for me, though, as I am pulling them through the additional Twitter account I set up. I would prefer to make that account 'private' and just pull the feed, but I can't seem to do so.
I've got more stuff in my Day One journal than I could possible go thru! :-)
On first test run I get “…/Slogger/lib/create.rb:10:in ‘initialize’: Failed to find iCloud storage path (RuntimeError)” — DayOne is using the iCloud storage. How to debug?
Are you outside of the U.S.? I didn't think to localize it, so if your path is anything other than "~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone" it won't think it's there. You can edit line 5 of lib/create.rb and hardcode a change if you need to.
Hello Brett, first of all congratulation for your script. I have tried to download it but it seems it doesn't exist. Any chance to get it? Thank you in advance, regards Fabio
Thought I would get cute and run my RSS feeds for my Instapaper and Pinboard accounts through this. However, got the following in Terminal when I tried to run Slogger.
With Pinboard RSS:
/Users/ronn/Documents/Slogger/lib/rsslogger.rb:49:in log_rss': undefined methodpubDate' for # (NoMethodError) from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:inlog_rss' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:inlog_rss' from slogger:52
With Instapaper RSS:
/Users/ronn/Documents/Slogger/lib/rsslogger.rb:52:in log_rss': undefined methodmatch' for nil:NilClass (NoMethodError) from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:inlog_rss' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:inlog_rss' from slogger:52
I know the RSS links were valid as I added them to my Google Reeder account and they worked fine there.
Yeah, I set it up to look for a content.encoded field without adding an error check. Fixed in the next version, but if you look for the line (in rsslogger.rb):
Can't get anything when using the Pinboard RSS. Get the following in Terminal:
/Users/ronn/Documents/Slogger/lib/rsslogger.rb:49:in log_rss': undefined methodpubDate' for # (NoMethodError) from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:inlog_rss' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:inlog_rss' from slogger:52
When I run the two RSS feeds together, I get these combined:
Error expanding http://mattgemmell.com/2012... /Users/ronn/Documents/Slogger/lib/rsslogger.rb:49:in log_rss': undefined methodpubDate' for # (NoMethodError) from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:inlog_rss' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in each' from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:inlog_rss' from slogger:52
I took the Instapaper and Pinboard feeds and ran them through Tweetfeed and then to a Twitter account that I set up so that I could send my RunKeeper stats to it (as RunKeeper doesn't have a way to RSS your stats). To each of the feeds, I added the suffix, Instapaper or Pinboard, respectively, so that I could have that as a search term.
At your suggestion, I got Lingon to schedule the script. I'm not entirely sure, though, how to configure this action. Is there a command that should be pasted/typed into the "What" field? I'm guessing it's not enough to simply select the slogger script, correct.
What would be the right syntax of the command?
The path to the script on my Mac is /Applications/Slogger/slogger
Assuming you've followed the instructions up to that point, then yes, then the best bet is to use this in the what box:
/usr/bin/ruby /Applications/Slogger/slogger
The Applications folder isn't the best bet for storing slogger, though. You'd be better off in the long run putting it within your user's home folder somewhere, such as ~/Slogger or ~/Scripts/Slogger (where ~ is your home directory). Just fewer file permissions issues that way, more than anything.
It would take some hacking on the user's part right now, but it will be an optional argument in the next version. Also, I built in an undo option that will remove all the entries it just created (with trash bin for recovery) :)
I just re-ran the script and nothing showed up. Then I relaunched Day One and the tweets showed up. I thought I'd tried that debugging step yesterday as well, but now I'm beginning to question whether I did that after all.
Meanwhile, it looks as if a re-launch of Day One on Mac may be necessary to display tweets.
It would natural to read this comment with an asshole tone, but it's really not meant that way. I would genuinely like to know what makes Day One so great that it's worth going to all this hassle when there are other apps (such as Momento) that already have this functionality built-in? Genuinely not trying to be an ass, I just honestly don't understand and would love for someone to explain it to me.
Ditto. Getting your data out of momento is a pain in the butt. Plus, they are totally unresponsive when it comes to support. Day One is being actively developed on multiple platforms and has import/export functionality.
I ran into issues downloading photos from a Twitter Feed. It looks like if you haven't added a picture to Day One before, there is not "photos" directory and Slogger doesn't seem to check. So... if you're having problems, just add a picture and try again.
rsslogger.rb:49:in `log_rss': undefined method `pubDate' for #<RSS::Atom::Feed::Entry:0x1042af7b0> (NoMethodError) from <path>/lib/rsslogger.rb:48:in `each' from <path>/lib/rsslogger.rb:48:in `log_rss' from <path>/lib/rsslogger.rb:41:in `each' from <path>/lib/rsslogger.rb:41:in `log_rss' from slogger:52
It appears that feed doesn't have a content field, I assume it's an excerpt-only feed. Slogger checks the content field for post images, I'll just have it skip that part if it doesn't exist.
On first test run I get ".../Slogger/lib/create.rb:10:in `initialize': Failed to find iCloud storage path (RuntimeError)" - DayOne is using the iCloud storage. I tried by adding full paths to the mobile storage within Library but this just yields a "Path not specified or doesn't exist" error. Any idea how I can get it to find the iCloud storage?
Hmmm, I just ran it with your username and got your favorites just fine. Day One did, however, crash the first time opening after doing that. Next time it was fine and a handsome lad was doing some Angry Birds coloring: http://ckyp.us/RbgV
Did you run slogger again to see if it was a fluke?
By the way, the easiest way to undo a run is to use the find command from your Journal folder. Location of the Journal folder in iCloud is usually ~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/Journal_dayone.
find . -newerct '10 minutes ago' -type f
Will show you what files were just created in the last 10 minutes.
Thanks for this. I bought Day One but didn't end up using it. Now it's finally useful to me. However, I'm not too interested in purchasing Hazel. I'd rather the slogger_config have an option for image folders, and then slogger would look there each day when it runs.
Hey Katy. I originally had reasons for separating out the image handling, but the whole system has changed since then and those reasons aren't really valid anymore. Right now it's just what works best for me with my IFTTT system, but it would work just as well if it polled once a day. It can use the image metadata to insert the photo at the right time of day regardless of when it runs.
I'll reconsider merging image handling back into the scheduled runs. I'm also considering switching from a hardcoded 24-hour span to storing a timestamp and ids for last updates retrieved and then just always getting info only since last update.
Anyway… if you don't want Hazel, you could just set up a LaunchAgent plist to watch an image folder and run an outside script when images showed up. It would just have to glob the folder for a list of files, then loop through them and call slogger_image.rb $file for each one, moving it out of the folder on completion. You probably know this, but for everyone, the plist for a folder watcher looks like this:
this looks awesome - finally brings Day One to the forefront of my journaling! does it work with protected twitter feeds, or would I have to open my feed up (or modify slogger to authenticate)?
Current Twitter functionality uses a public feed for tweets and favorites. For this incarnation I wanted to avoid needing to deal with a bunch of constantly-shifting auth schemes and make something that just worked.
You could modify to use of the command-line Twitter tools that would be able to provide a json or XML feed for a protected account.
If I develop this beyond a script app, I'll add support for auth and a preference pane. And make it a polling background app in the menubar. Lots of ideas, but for now, Slogger. Cheap and easy.
i totally know where you're coming from - i have a day job, too (and kids ) :). however, i was thinking of a really bad hack to modify it just to work with my one and only twitter username, per https://dev.twitter.com/doc... - we'll see if i actually get time to work on it, but it seems like something fun to learn. thx again for your help!
I totally dig where you're coming from. I have a day job, too :) I have done some minimal twitter work in python, but never ruby, so I'm hacking for sure. thanks again!
Comments
Hello, I've spend the whole afternoon trying to make this work, i've read all the comments but i did't find a solution. Could anyone help me ? thank you.
I configured slogger_config and all. Here's what i get when i run slogger:
Last login: Fri Nov 16 16:09:28 on ttys000
MacBook-Pro-de-Horkken:~ Horkken$ /Users/Horkken/Documents/Slogger/slogger ; exit;
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in
load': syntax error on line 15, col 13:star_posts: true' (ArgumentError)from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in
load'load_config'from /Users/horkken/Documents/Slogger/lib/configtools.rb:11:in
from /Users/horkken/Documents/Slogger/lib/configtools.rb:11:in
open'load_config'from /Users/horkken/Documents/Slogger/lib/configtools.rb:11:in
from /Users/horkken/Documents/Slogger/slogger.rb:77:in
initialize'new'from /Users/horkken/Documents/Slogger/slogger.rb:272:in
from /Users/horkken/Documents/Slogger/slogger.rb:272
from /Users/horkken/Documents/Slogger/slogger:9:in `require'
from /Users/horkken/Documents/Slogger/slogger:9
logout
Thank You.
Looks like an error in your config file syntax. Can you post it as a gist (or Droplr or whatever) and let me take a look at it?
Hello, thank you for responding. Here it is:
oups sorry: https://gist.github.com/408...
Thanks!
Hey there just wanted to give you a quick heads up.
The words in your post seem to be running off the screen in Opera.
I'm not sure if this is a formatting issue or something to do with browser compatibility but I thought I'd post to let you know.
The design and style look great though! Hope you get the
issue fixed soon. Many thanks
RSS feeds aren't working anymore, the only thing I have done was added a second rss feed, but it was giving me the same thing, and so I removed the second one and now all I get is the following:
I, [2012-08-24T12:57:44.233428 #41597] INFO -- : Loading last.fm logger for user btiede
I, [2012-08-24T12:57:48.181850 #41597] INFO -- : Loading RSS logger for feeds http://feeds.feedburner.com...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:393:in
const_defined?': wrong constant name Date.Taken (NameError)start_else_element'from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:393:in
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:347:in
tag_start'parse'from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/streamparser.rb:24:in
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:201:in
parse_stream'_parse'from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/rexmlparser.rb:22:in
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:164:in
parse'parse'from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rss/parser.rb:79:in
from /Slogger/lib/rsslogger.rb:47:in
log_rss'each'from /Slogger/lib/rsslogger.rb:41:in
from /Slogger/lib/rsslogger.rb:41:in `log_rss'
from /Slogger/slogger:52
logout
Are you using the new version? If so, please post issues on Github. If you're not, you're using a 100% unsupported version.
Is it be possible to limit the rss from Tumblr to certain tags only?
Luca, yes. The following should do the trick for you.
BLOGNAME.tumblr.com/tagged/...
Thank you, I guess I missed the /tagged/ part in my tries
Brett - Cool idea. Heard you talk about it on Systematic the other day with the Day One guys. Made me think of Cory Doctorow's Flashbake script. It does something similar, embedding information into git commit messages. Just thought you might be interested if you hadn't already known about this.
Need to add a comment to watch for new comments! :( ;)
Are the lastfm's tags working? They are not be added in my posts. Also, regarding lastfm inline links, I got bugs in some links, which includes parenthesis. I think that parenthesis bust be escaped.
One more question (sorry). There is a line in the code to be uncommented
options['datestamp'] = Time.parse(%x{mdls -raw -name kMDItemContentCreationDate "#{File.expand_path(file)}"}).utc.iso8601that claims to insert an image at the date it was created rather than the current date. Does this get the date from the image data (EXIF?) or does it just use the date the file was created on the machine?
I keep coming back to these comments and getting ideas and decided to put together an RSS Resource for Slogger for those wanting to add various RSS feeds to this awesome service that Brett has made available to us. My way of trying to be as generous as Brett is.
Anyway, I have posted the file as a Gist and you can view or download it at:
https://gist.github.com/338...
In it, I have listed RSS data for the following services, in case you want to add the feed to your Slogger setup.
Blogger
Dropbox
Evernote
Facebook
Flickr
Foursquare
Instagram
InstaPaper
LinkedIn
Picasa
Pinterest
StumbleUpon
Twitter
Tumblr
WordPress hosted
YouTube
For services that don't offer an RSS feed, I suggest my 'Twitter hack' that has been described previously and that I also include in the doc.
Feel free to make corrections and additions and share.
I keep coming back to these comments and getting ideas and decided to put together an RSS Resource for Slogger for those wanting to add various RSS feeds to this awesome service that Brett has made available to us. My way of trying to be as generous as Brett is.
Anyway, I have posted the file as a Gist and you can view or download it at:
https://gist.github.com/338...
In it, I have listed RSS data for the following services, in case you want to add the feed to your Slogger setup.
Blogger
Dropbox
Evernote
Facebook
Flickr
Foursquare
Instagram
InstaPaper
LinkedIn
Picasa
Pinterest
StumbleUpon – Get the RSS feed of likes of any SU user
Twitter
Tumblr
WordPress hosted
YouTube
For services that don't offer an RSS feed, I suggest my 'Twitter hack' that has been described previously and that I also include in the doc.
Feel free to make corrections and additions and share.
I've been using slogger now for a couple of weeks and just wanted to share an anecdote. A few nights ago my two year old woke up shortly after going to bed -- bad dream? He was inconsolable for quite a while and we all had a pretty bad night. Before i finally got to bed myself I wrote in Day One that it had been a hard evening. I woke up cranky. I opened up Day One and there was my last.fm history from the night before, listing the tracks he and I listened to while we had a wonderful dinner together. I had forgotten all about it, and slogger+Day One brought it back. Thanks, Brett!
This is truly awesome. After a bit of fiddling I have things set up so that any photo I take with Instagram on my iPhone appears as a new journal entry and also gets saved to my flickr photo stream. Used Hazel and IFTTT to hook it all together.
Really great to be able to do this. Now how do I get it to save my facebook status updates? I guess I can use IFTTT to save the status update to a text file in dropbox, but how can I get slogger to pick that up and insert it as a new Day One item? Anyone done that?
Huge respect for building and sharing this!!
One temporary work-around would be to send your status updates to Twitter and pull the feed in that way.
If you don't want all of your FB status updates in your 'regular' Twitter account, create a separate Twitter account just for instances like this.
I have mentioned doing this before for the service, RunKeeper. They don't provide an RSS feed of my activities, but will post them to Twitter. So I set up a Twitter account to handle these posts and pull it into Day One via Slogger. I also use that Twitter account to pull in feeds from my Instapaper and Pinboard accounts so I can capture that info as well.
Your mileage may vary...
That's a great idea, will have a crack at that later. Now next question (sorry): I just uploaded two pictures to flickr from Aperture on my Mac in quick succession. I have IFTTT set up to copy the pictures to a dropbox folder and then a Hazel rule to watch that folder, run the slogger_image.rb script and then move the image out of that dropbox folder to an archive folder elsewhere. However only the 2nd image has ended up in Day One. Any ideas why or is this by design?
Actually scratch that, it's there now. I had to wait a bit and re-start Day One for it to appear for some unknown reason. WIll be more patient in future!
Not be design. Have you restarted Day One to make sure the image wasn't picked up?
anyone else having trouble with the save images part?
Brett - Loved your podcast interview with the Day One folks, and thanks for this great script. I am having trouble with the Last.fm functionality. The script only pulls the most recent 10 items from my Last.fm played tracks listing (basically the same tracks that appear in the "Recently Listened Tracks" section of my Last.fm user page at last.fm/user/username). It does not pull all the listened to tracks for the day, which for me numbers in the dozens. Is this the intended functionality, or should it be pulling all the tracks?
Thanks,
Drew
Oh cool! It suddenly started to work. Looks like we're in business.
Cheers,
Steve
Well the symlink suggestion worked (Thanks Leo and Doc), but my tweets are still not getting through. I'm also trying the IFTTT idea, but I'm not sure how to write the applescript to get the tweets into Day One.
Cheers,
Steve
It looks like the tweet logging currently logs retweets without attributing the original poster, so it looks like the tweets were mine.
Would you consider posting this on Github so we can open pull requests with patches?
Not in its current form, no. As I've said multiple times here in the comments, this is undergoing a major refactoring and the any time put into the current codebase would be a waste.
When do you think this will be ready for the average joe to set up? I really want this but can't get it to work.
Having a ball with Day One and would really like to get your Slogger code working, but I keep getting - `initialize': Path not specified or doesn't exist: ~/Dropbox/Apps/Day\ One/Journal.dayone (RuntimeError)
- I've tried enclosing the full path in quotes and still no luck. I've also tried using the full path- no luck. What could I be doing wrong?
Cheers,
Steve
Steve,
I had the same issue as you can see above. It way I fixed it was to give up and use icloud (against my better judgement). I though os symbolic linking it like Leo says above but I wasn't sure it was gona work. After reading Leo's comment I will tel it it would work but by that time I stuck with icloud and it is seamless.
Aloha,
Doc
Thanks, Doc. I'll take another look at Leo's suggestion- I really don't want to got the iCloud route.
Cheers,
Steve
brett,
working on the authentication integration. i have a standalone method that works just fine in getting the xml formatted response for my protected feed. however, when i copy that code into twitterlogger.rb, slogger throws the error "error getting timeline for @username", runtime error: failure getting a response from twitter" and the res = nil. i think i'm missing a dependency somewhere or not finding the right places to plug in the authentication calls. i'm just not experienced enough with ruby to know the gotchas. is this going to be something you add into the rewrite version you have mentioned? i really love the idea of slogger...
boom. got the oauth working for a single user account. now, i gotta finish up my momento to day one script...
I can't, for the life of me, get the scheduling to work on Lingdon. If I 'get info' on my slogger file the 'Where' is /Users/Mario/Slogger. So therefore i set my 'What' in Lingon to /usr/bin/ruby Mario/Slogger/slogger. But it doesn't work. What am I missing?
To be more specific, it looks like your 'qualified file path' is incomplete. If you have Brett's 'install.rb' script do the work, you'll get the right path.
-Leo
Thanks for the reply Leo. I didn't know how to run the install file to get the launch agent. What I ended up doing is creating an 'application' on Automator to run the terminal script then I scheduled this using Hazel by saying 'if' application hasn't been opened in over 24 hours then run the application. Long way round I know, but it works.
Another thing I noticed is that on the 'list view' on Day One, the markup isn't displaying for me. Its fine when I go into the entry but just seeing the 'code' in the list. Anyone else seeing this? I've contact Day One about it but just curious to see if is just me.
Yes, seeing exactly the same thing, though I have one Day One entry that has a Bold first line but when I edit it there is no markup. This goes away on this one entry when I swith off the "Auto-Bold first line" option in the settings. The markdown is showing OK in the entry view when in Non-editing mode.
Yes, seeing exactly the same thing, though I have one Day One entry that has a Bold first line but when I edit it there is no markup. This goes away on this one entry when I swith off the "Auto-Bold first line" option in the settings. The markdown is showing OK in the entry view when in Non-editing mode.
Hi Mario, Lingon ONLY works with launch daemon files. What you SHOULD do is follow the directions and do the install.rb thing, that puts the Slogger scheduling file in:
If you use Lingon 3 from the Mac app store you can ONLY see 'user services'... the older Lingon allowed you to see system level ones but that is forbidden by the MAS. You'll be able to see this file in Lingon 3.
To repeat: If you're a beginner with launch daemon/scheduling files, the best thing to do is have Matt's install script set up a Launch Agent for you.. then you can see what can be edited in Lingon.
-Leo
wow cool. awesome off to install.
really want to try this, have retina mbp with mountain lion. I am not a hardcore dev so I am not running Ruby. It looks like it is required and I have no problem installing it. Found a checklist here https://gist.github.com/330... but wanted find out if I need anything else but the base install?
thx.
jMoney: YOu already have Ruby it come with OS X. Go to terminal and type the command:
ruby -vYou'll find Ruby is already installed
MacBook-2:~ pimpstrong$ ruby -vruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
MacBook-2:~ pimpstrong$ whereis ruby
/usr/bin/ruby
Aloha
I got this error when running the script today. It was working then upgraded DayOne and it broke. error and config setting via pastebin
Also My iOS DayOne was syncing to a dropbox folder called Day One now the app on the mac wants me to move it to Dropbox/Apps/Day One but iPhone doesn't allow me to select that folder. It seems now the phone/ipad wants Dropbox root. I'm I crazy?
Mahalo
Doc
OK I take all of that back because it started working after a restart of my machine. Now however I'm getting multiple copies of each image. It made 5 copies of each image before aborted. Any Ideas?
PS: All the images have unique names and for what it's worth the oddities of DayOne folder naming thing is still a problem but I've found a slight workaround by launching the program via clicking the Dayone.journal file to launch it.
For some reason (DayOne first run, I forget which) my DayOne folder was in /Dropbox/Apps/
I had Slogger config problems until I symlinked that folder to:
So the whole command I did was:
Once I did that, things worked.
-Leo
Thank you. I had the same Problem. I think it's caused by the space in the Day One path.
Multiple copies from an image folder watcher, or from stuff it downloads from Twitter?
Aloha Brett et. al,
So I was wondering if there was a way to see if the image dupes wee coming from the face that IG and Twitter both would contain the sam image data if the original IG was marked for sharing via Twitter. I tried posting on IG with no sharing and still got dupes. I also made a watched folder on my desktop called PicsILove and made Hazel run the (slogger_image.rb) shel script. When executes it then moves the image out of that folder to hopefully avoid the dupes and it still makes two copies. It a big step away from 5 or more but still confused why I'm getting dupes.
On a separate note would slogger type thing work as a shortcut to get my NVAlt notes into Day One using the same part of the script that adds the twitter feed?
Thanks,
Doc
http://cl.ly/image/1a3e2d0E... Just in case you need more info!
BT, it's hard to tell if it's Hazel or the Twitter side for sure. I assumeed it was happening because of the script because console logs show QL errors and if I look at the folder listing as the action is happening, I can see the icon flickering between generic img icon and a thumbnail icon... Next thing I notice is the Dayone.journal package contents has a photos folder with 30 plus copies of photos.
Do you have a better idea for tracing or debug view of the scripts or Hazel?
Mahalo
Any thought about adding coverage of additions to pinboard? It might be interesting to see what one thought was important enough to bookmark on any given day.
Already built a Pinboard plugin for the next version. It's pretty simple to convert the rsslogger to read Pinboard, but I'll hold onto it until the next release as the codebase is all new and I don't want to code the plugin twice :).
Another issue with Slogger. On your blog entry introducing Slogger, you show this in your config if you have multiple RSS feeds:
So I did this in my config:
I know both feeds work. However, when I run Slogger, I get this:
I'm not sure why it fails.
@Scott - The example in your comment certainly does not have a comma in it, but the example in the original post does.
You might just try it with the comma in there and see if it doesn't work. :-)
Dang it - the screenshot didn't show up ... & I used Markdown. OK, here's a link: http://ftp.granneman.com/sl...
I'm really not an idiot. I write books 'n teach 'n stuff!
Just so we're both sure we're not crazy, it looks like there's some syntax highlighting in your screenshot. Is that from a plugin or something on my site? I'm wondering if a syntax highlighter might have obscured the comma somehow...
I eventually used the comma, & yes it worked. But I swear that when I look at the page in Chrome, there's no comma. See?
That's a screenshot from my MBP of the config in Chrome. When I look at the same page in other browsers, I see the flippin' comma! Weird!
Looks like you need a comma (,) after the first feed.
Well, yes, except that Brett's example does NOT have a comma after the first feed.
Yes it does
I swear this image is unedited.
<img src="http://ckyp.us/DYq8+" alt="comma"/>
Then I must be blind. When I look at Brett's sample config above, there is no comma after the first feed.
Brett, Slogger is really cool. However, I have a couple of bugs/thoughts for you.
Here's the results when I ran Slogger last night:
Two things:
<ol>
<li>
Note the error grabbing my blog entry. No idea why that failed.
</li>
<li>
Note the gist error - my config has these lines for gist:
gist_user: ""
gist_tags: "@social @coding"
</li>
</ol>
I don't use gist, & neither your example config nor the notes for Slogger said what to do if you didn't use a service. Can I simply remove the lines for gist? Or comment those lines out? You might want to include something about that in your notes.
It raises a warning, but shouldn't stop the script. If I recall my late-night thought process, you should be able to just remove the gist lines from the config and it won't run the gist logger.
I have an entirely ravamped code base in the works, so I'm doing no debugging on the current version. All of this is covered in the new code, though.
I would gladly pay to have this all turned into a more user friendly app. I'm a lawyer and command lines make me nervous. The concept is great, and I'd love to use it.
Hi Brett,
I realized last night --the first time I tried to run this automatically -- that if the MacBook is closed, this won't run.
Duh, right?
I don't suppose there's a conditional run that could run at the appointed time or the next time it wakes up? Also, something running on a server would be no good, as this assumes local-machine updates and has no authentication.
I'm not saying all of this as a passive way of asking for these features :-) Just double-checking my new assumptions that this may not work well for me unless I keep my MBA awake and connected.
(Of course, if what the devs said on your most recent podcast about IFTTT turns out to happen, that would make a lot of this work even better.)
There is a way to get scheduled tasks that were missed to run at the next possible time, I have to look it up and will add it to the instructions.
Running on a server is feasible, but you'd have to work out the details of transmitting to your local drive, either via Dropbox or a scheduled (S)FTP task that pulled down new files and stored them using a script locally. Lots of extra setup, but I might consider trying to build a system that allowed that more easily.
I too would like to use slogger to add my recent pinboard activity to Day One, but the (updated) version still gives the same error noted above.
Since my MBP isn't always on and I don't get to open it up everyday due to vagaries of toddler activity, I wonder of it would work to put slugger on a web hosting location, set a cron job to run daily, placing the resulting XML files in some destination there, and later rsyncing those new files to the macbook's Dropbox folder where my day one journal lives. Is that just asking for trouble?
Thanks for a neat tool!
The image script tries to run /usr/local/bin/convert, but there is nothing. Which tool need to be installed?
Ahh,
brew install imagemagickdoes the trick :) Now everything works, this is really really nice! Thanks for your workImageMagick, available through homebrew and elsewhere. It should just move on if it doesn't see that convert is available, but I might have to go back and peek at the code.
Thanks for this! Am quite happy to get this setup.
One error that I did run to, and might be helpful for others to know, was with the images. It seems that the folder they are stored in in iCloud isn't created until the first image is added in DayOne. The script errors out if its not there, so the fix was just manually adding an image into DayOne, and then automate the script with Hazel and everything started working a-ok.
Thanks again :)
Yep, I have this fixed for the next version, but for now just create a "photos" folder in the root of the journal, next to the "entries" folder.
Would anyone be willing to do a screencast of how to set this up?
I wouldn't, yet. I'm 90% of the way through a rewrite and things are going to change (it has a plugin architecture for adding new services, as an example).
Knowing you're 90% through a re-write... should I hold off for however long it takes for you to finish before I try and implement this? Not that I want to rush you, I'm more curious to know if I'll end up doing a lot of re-work on something that can way a few days/weeks to try.
Nah, if you get the current version up and running now, the update will only improve on what you have. At worst, you'll have to re-enter configuration details, but the current config file will translate fine.
Awesome, thanks. bought Day One today (iOS and OS X) and can't wait to see how this works/where the project goes. Pulling in content automatically should really add value to Day One... I wouldn't be surprised if they end up adding a lot of what you've accomplished to their app in a future update.
Updated to 1.0.3 but still cannot get the Instapaper and Pinboard RSS feeds through.
Not a problem for me, though, as I am pulling them through the additional Twitter account I set up. I would prefer to make that account 'private' and just pull the feed, but I can't seem to do so.
I've got more stuff in my Day One journal than I could possible go thru! :-)
Thanks Brett!!!!!
On first test run I get “…/Slogger/lib/create.rb:10:in ‘initialize’: Failed to find iCloud storage path (RuntimeError)” — DayOne is using the iCloud storage. How to debug?
Are you outside of the U.S.? I didn't think to localize it, so if your path is anything other than "~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone" it won't think it's there. You can edit line 5 of lib/create.rb and hardcode a change if you need to.
Hello Brett, first of all congratulation for your script.
I have tried to download it but it seems it doesn't exist.
Any chance to get it?
Thank you in advance,
regards
Fabio
I'm getting a "download not found" from your link.
Thought I would get cute and run my RSS feeds for my Instapaper and Pinboard accounts through this. However, got the following in Terminal when I tried to run Slogger.
With Pinboard RSS:
/Users/ronn/Documents/Slogger/lib/rsslogger.rb:49:in
log_rss': undefined methodpubDate' for # (NoMethodError)from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
from slogger:52
With Instapaper RSS:
/Users/ronn/Documents/Slogger/lib/rsslogger.rb:52:in
log_rss': undefined methodmatch' for nil:NilClass (NoMethodError)from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
from slogger:52
I know the RSS links were valid as I added them to my Google Reeder account and they worked fine there.
Yeah, I set it up to look for a content.encoded field without adding an error check. Fixed in the next version, but if you look for the line (in rsslogger.rb):
And change "content_encoded" to "description", should clear up the problem.
Change "content_encoded" (item.content_encoded.match) in line 52 of rsslogger.rb to "description" (item.description.match), as directed.
Getting closer...
When I try and import the Instapaper RSS, I can get one link in and see the following in Terminal:
Error expanding http://mattgemmell.com/2012...
Can't get anything when using the Pinboard RSS. Get the following in Terminal:
/Users/ronn/Documents/Slogger/lib/rsslogger.rb:49:in
log_rss': undefined methodpubDate' for # (NoMethodError)from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
from slogger:52
When I run the two RSS feeds together, I get these combined:
Error expanding http://mattgemmell.com/2012...
/Users/ronn/Documents/Slogger/lib/rsslogger.rb:49:in
log_rss': undefined methodpubDate' for # (NoMethodError)from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:48:in
from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
each'log_rss'from /Users/ronn/Documents/Slogger/lib/rsslogger.rb:41:in
from slogger:52
Okay...
Here is my fix for this for now...
I took the Instapaper and Pinboard feeds and ran them through Tweetfeed and then to a Twitter account that I set up so that I could send my RunKeeper stats to it (as RunKeeper doesn't have a way to RSS your stats). To each of the feeds, I added the suffix, Instapaper or Pinboard, respectively, so that I could have that as a search term.
Brett,
Apologies for the rudimentary question... But:
At your suggestion, I got Lingon to schedule the script. I'm not entirely sure, though, how to configure this action. Is there a command that should be pasted/typed into the "What" field? I'm guessing it's not enough to simply select the slogger script, correct.
What would be the right syntax of the command?
The path to the script on my Mac is /Applications/Slogger/slogger
Thank you!
Assuming you've followed the instructions up to that point, then yes, then the best bet is to use this in the what box:
The Applications folder isn't the best bet for storing slogger, though. You'd be better off in the long run putting it within your user's home folder somewhere, such as ~/Slogger or ~/Scripts/Slogger (where ~ is your home directory). Just fewer file permissions issues that way, more than anything.
Is it possible to do a one-time grab of items that are older than 24 hours old?
It would take some hacking on the user's part right now, but it will be an optional argument in the next version. Also, I built in an undo option that will remove all the entries it just created (with trash bin for recovery) :)
I was afraid you would say that. :-) I'll enjoy it now and look forward to the next version. Thanks so much for sharing this!
Hi Brett,
Thanks for releasing this!
I'm not getting anything from my Twitter feed when I test-run slogger from the command line.
This is the line in the config file. Is it correct?:
twitter_users: [ timwindsor ]
This is what is returned by the script in Terminal:
I, [2012-08-06T11:47:48.844851 #19972] INFO -- : Loading Twitter logger for user(s) timwindsor
Nothing is inserted into the Day One file. Is there something else I should be doing?
Thanks.
Do you have tweets in the previous 24 hours that aren't replies?
I just re-ran the script and nothing showed up. Then I relaunched Day One and the tweets showed up. I thought I'd tried that debugging step yesterday as well, but now I'm beginning to question whether I did that after all.
Meanwhile, it looks as if a re-launch of Day One on Mac may be necessary to display tweets.
Thanks!
It would natural to read this comment with an asshole tone, but it's really not meant that way. I would genuinely like to know what makes Day One so great that it's worth going to all this hassle when there are other apps (such as Momento) that already have this functionality built-in? Genuinely not trying to be an ass, I just honestly don't understand and would love for someone to explain it to me.
Momento - as much as I love it - is iPhone only. Or doubled on iPad.
Ditto. Getting your data out of momento is a pain in the butt. Plus, they are totally unresponsive when it comes to support. Day One is being actively developed on multiple platforms and has import/export functionality.
Looks like Momento is iOS only. For me, I want something on my Mac for this type of thing.
Day One has a Desktop app.
I ran into issues downloading photos from a Twitter Feed. It looks like if you haven't added a picture to Day One before, there is not "photos" directory and Slogger doesn't seem to check. So... if you're having problems, just add a picture and try again.
Noted, I'll add a check and create the folder automatically if needed.
When testing the script I am getting some errors:
Any idea on what goes wrong?
I'm not sure the RSS module in Ruby understands Atom… I'll check it out , in the meantime does your feed have an RSS/RSS2 alternative?
I ran the feed through FeedBurner to convert it to RSS2 and it now works fine.
I had the same issues with atom feeds, so I tried the corresponding rss and got a different error: https://gist.github.com/3274644
It appears that feed doesn't have a content field, I assume it's an excerpt-only feed. Slogger checks the content field for post images, I'll just have it skip that part if it doesn't exist.
This is awesome, works great!! Thanks so much.
This is awesome, work's great!! Thanks so much.
On first test run I get ".../Slogger/lib/create.rb:10:in `initialize': Failed to find iCloud storage path (RuntimeError)" - DayOne is using the iCloud storage. I tried by adding full paths to the mobile storage within Library but this just yields a "Path not specified or doesn't exist" error. Any idea how I can get it to find the iCloud storage?
I get an error having to do with parsing the config file. The gist is here: https://gist.github.com/326...
It may be helpful to note that I get this error with Ruby 1.9.3 as well (the error in this git came from Ruby 1.8)
Whoops. And now Day One crashes on launch. Arg.
Hmmm, I just ran it with your username and got your favorites just fine. Day One did, however, crash the first time opening after doing that. Next time it was fine and a handsome lad was doing some Angry Birds coloring: http://ckyp.us/RbgV
Did you run slogger again to see if it was a fluke?
By the way, the easiest way to undo a run is to use the
findcommand from your Journal folder. Location of the Journal folder in iCloud is usually~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/Journal_dayone.Will show you what files were just created in the last 10 minutes.
will delete just those files. It's faster than manually deleting them in Day One by far.
I just ran into a bug logging my twitter favourites - https://gist.github.com/326... - hope this is of use.
Fantastic! I've been using DayOne for a while, but it suddenly because oh so much more useful! Thanks for sharing this!
This is great Brett, thanks for getting something useful out.
Only bug I've found is links back to Twitter. e.g. Day One has
https://twitter.com/michael.... The URL should be https://twitter.com/michael...
Thanks, will fix!
Now I need to figure out how to get my Momento backup data into Day One. Thanks!
Agreed. I was working on a python script to do just that, but haven't worked on it too hard in recent months.
Got this working on the first try, for whatever that's worth. Thanks for sharing, I intend on using this from here on out.
Thanks for this. I bought Day One but didn't end up using it. Now it's finally useful to me. However, I'm not too interested in purchasing Hazel. I'd rather the slogger_config have an option for image folders, and then slogger would look there each day when it runs.
Do you plan to put this on Github eventually?
Hey Katy. I originally had reasons for separating out the image handling, but the whole system has changed since then and those reasons aren't really valid anymore. Right now it's just what works best for me with my IFTTT system, but it would work just as well if it polled once a day. It can use the image metadata to insert the photo at the right time of day regardless of when it runs.
I'll reconsider merging image handling back into the scheduled runs. I'm also considering switching from a hardcoded 24-hour span to storing a timestamp and ids for last updates retrieved and then just always getting info only since last update.
Anyway… if you don't want Hazel, you could just set up a LaunchAgent plist to watch an image folder and run an outside script when images showed up. It would just have to glob the folder for a list of files, then loop through them and call
slogger_image.rb $filefor each one, moving it out of the folder on completion. You probably know this, but for everyone, the plist for a folder watcher looks like this:Noteworthy part being the WatchPaths array of strings at the end. You can watch all of the folders at once...
this looks awesome - finally brings Day One to the forefront of my journaling! does it work with protected twitter feeds, or would I have to open my feed up (or modify slogger to authenticate)?
Current Twitter functionality uses a public feed for tweets and favorites. For this incarnation I wanted to avoid needing to deal with a bunch of constantly-shifting auth schemes and make something that just worked.
You could modify to use of the command-line Twitter tools that would be able to provide a json or XML feed for a protected account.
If I develop this beyond a script app, I'll add support for auth and a preference pane. And make it a polling background app in the menubar. Lots of ideas, but for now, Slogger. Cheap and easy.
As an alternative, you could use IFTTT to log your tweets to a dropbox text file and pick that up by a folder action applescript or Hazel.
i totally know where you're coming from - i have a day job, too (and kids ) :). however, i was thinking of a really bad hack to modify it just to work with my one and only twitter username, per https://dev.twitter.com/doc... - we'll see if i actually get time to work on it, but it seems like something fun to learn. thx again for your help!
I totally dig where you're coming from. I have a day job, too :) I have done some minimal twitter work in python, but never ruby, so I'm hacking for sure. thanks again!
Awesome! Thanks for sharing your script with everyone!