As I’ve mentioned before, I love Momento’s online capture capabilities. Unfortunately, they don’t have a desktop version and I do most of my journaling there. Day One has a great little command line utility for adding journal entries, and I’ve modified the script used to create this website to make entries in Day One whenever I make a blog post.
And now I’ve written a script to capture my Twitter activity as well.
Using Marc Mims’s Net::Twitter::Lite module, I’m pulling the last 20 tweets. Twenty is a limitation of the Twitter API, so it is what it is. I dump these tweets into a temporary file, then run a
diff against a file containing the tweets the last time I checked. This leaves me with something that looks like the following:
Mon Jan 24 00:09:19 +0000 2012 Test post 1. Sun Jan 23 21:59:14 +0000 2012 Test post 2.
My script then adjusts the time for GMT -0600, tweaks the dates a little (‘Jan’ becomes ‘01’, etc.), then dumps it into Day One. Lastly, it copies the most recent 20 tweets to the history file so it’ll be ready for the next
I plan on running the script every few hours, since I don’t tweet that often (and sometimes Twitter is down -gasp!). However, if I crank my activity level, I can always run the script more often. It’s running from crontab, so that’s easy enough.
The only “problem” I currently have is that I post to Twitter when I have a new blog post and I also update Day One. Using the above methodology, I’ll have somewhat duplicate entries in Day One (one saying I made a blog post titled “XYZ” and one saying I tweeted XYZ.) This isn’t currently an issue for me because Momento will show the same overlap. And it’s accurate. But if it starts getting junky, I’ll figure something out.
Now if the Perl module for Remember The Milk actually worked, I could log that activity as well. I’ll need to spend some time on this one.