Tuesday, December 23, 2008

Mashup your RSS Feeds with ruby + sinatra + pipe

I've been doing some build work lately and I stumbled upon a situation last week where I needed to take a bunch of RSS feeds, aggregate them and filter only the specific items I wanted. This actually manifested itself with continuous integration boxes. We have a lot of CI boxes running a lot of builds but each team is only interested in several of these builds.

One option is using something like CCMenu, but I actually needed a consumable RSS feed for use by another service that displayed build status is a very big, readable way (for a monitor in the team area). This aggregation and filtering of RSS feeds is, in fact, exactly what Yahoo Pipes does. However, these are all internal feeds, so Yahoo Pipes wouldn't work for me here.

Lately, I have been toying with sinatra, a great little web framework in ruby. I decided to write a tool that could be used in conjunction with sinatra to get me my RSS feed aggregation and filtering. That tool is called (not surprisingly) pipe. Below is the code for creating a simple feed containing all the ruby related articles on ycombinator and the clojure related articles on the programming subreddit:



You can install pipes like so:
- gem sources -a http://gems.github.com
- sudo gem install drewolson-pipe

The documentation is here. Enjoy.

0 comments: