Tuesday, January 13, 2009

Twitterss - RSS to Twitter script that can handle multiple accounts

I know there are a bunch of RSS to Twitter scripts out there in a variety of languages. There's even twitterfeed which manages all your feeds for you (which is a pretty cool service). But, I couldn't find one that did all of the following:
  1. Took updates as frequently as I wanted
  2. Could handle multiple RSS feeds to multiple Twitter accounts (ie: could be configured)
  3. Didn't require handing out my Twitter password (not that this is always a bad thing)
  4. Didn't have a bunch of dependencies (activerecord, mysqlite, etc...)
  5. Preferably written in ruby
So, I hacked twitterss together. Twitterss is just a script that takes a YAML configuration file as a paramter which is meant to be used as a cron job:
  $ twitterss twitterss.yml
twitterss.yml might look something like this:
  rss: http://www.avvo.com/news.rss
  login: avvolegalnews
  password: secret

  rss: http://rss.cnn.com/rss/money_topstories.rss
  login: money_news
  password: secret
  max: 5

  rss: http://rss.cnn.com/rss/money_markets.rss
  login: money_news
  password: secret
  max: 3
This config would make twitterss pull items from the CNN Money Top Stories and the CNN Money Markets feeds and push them the the money_news Twitter account. It would also pull from the Avvo Legal News feed and push to avvolegalnews. Example result: To make sure it doesn't post the same link twice, it keeps a list of each link it posts for each config entry in a local file (<USER_HOME>/.twitterss_history).

1 comment:

Rob Webb said...

hey ben i'm thinking of using twitterss...is still working well?