Tonight's Project: Write a Twitter Live-Blog Listener
Wednesday, June 16, 2010, at 05:41PM
By Eric Richardson
For several years I've wanted a little piece of server glue to take tweets and turn them into a story on blogdowntown. Something for those times when I'm out on scene and really just have the phone to work with to let people know what's going on.
This evening I'm sitting down to write that piece of glue. Basically, it needs to be a daemon that connects to our Ruby on Rails application on one side and to twitter on the other. It should listen to blogdowntown's twitter account(s) and recognize certain commands that trigger live blogging.
The twitter piece should be pretty straight-forward. The twitter gem is nifty, and we use it heavily already -- though I do need to go ahead and convert our scripts over to OAuth. I'll likely just have it poll the timeline every X minutes and look for a certain hashtag format.
On the Rails side, the script will need to craft a piece of text formatted with Markdown and / or HTML. Most straight-forward would just be to append new entries onto the bottom of the heap, though it would be entirely nifty if it was somehow smart enough to produce something that could be toggled between chronological and most-recent first.
Altogether, nothing in here should be all that hard. I'm hoping it's a two-hour project.
Pressingly, I need this live and in production by tomorrow night in order to support our coverage of the scene around Game 7 of the NBA Finals. Can I make that happen? We'll find out. I'll report back here tomorrow.