Build RSS feeds using Yahoo Pipes

Build RSS feeds using Yahoo Pipes

With Yahoo Pipes one can build complex RSS Feeds using a Visual Programming Language. Just connect different modules with each other and you can easily turn an ical File into an RSS feed!

Folie2

The patch starts with an input module, in this case the user inputs the address to an ical File. Each module has one or more terminals, represented by small circles in the interface. You can wire modules together by clicking on one module’s output terminal and dragging the wire to another module’s input terminal. Once the terminals are wired together the output from the first module will serve as input to the second module. So this address is being passed to a Fetch block, which will download the ical file.  Afterwards a filter is applied and removes all entries older then “1 hour ago”. After this the date is converted in a good readable format using two loops and placeholders. One loop later this datestring is prepended to the event title, then everything gets sorted according to the date and forwarded to the output node. This way an ical file is converted into an RSS Feed showing the upcoming events! :)

Once you save a pipe you can use it in other patches as modules. For example I could now use this ical converter in an other patch and process the output further! This becomes very handy because you can open every pipe ever made by whomever  and save you your own copy which you can then use in a new patch!

In addition Pipes can handle Location data and output maps or even KML files fo Google Earth! Here is an example of a Pipe with locations in action. It analyzes text in each feed item like title and description and attempts to identify addresses, location names or popular map service URLs to calculate latitude and longitude. Moreover adequate pictures are searched on flicker and added to the map output.

Pipes can handle more than RSS. Possible Input:

  • RSS
  • JSON
  • XML
  • CSV
  • Flickr photos
  • Google Base
  • Raw Data from urls as strings
  • YQML (e.g. select * from feed where url=’http://digg.com/rss/index.xml’)

Output:

  • RSS 1 and 2
  • Atom
  • JSON

Folie6

This screenshot shows some other useful modules offered by pipes. On the top right there are different user input modules, a dateinput and a number input. On the left we see a date formatter, and a date builder. The date builder understands sentences like “yesterday” or “two weeks ago”, which is very useful. One can even translate content from many languages into others. This is of course not a good translation and often it does not even transport the sense of a sentence. The module in orange is an example of a patch in a patch, I added my ical to RSS converter to this patch. As one can see, the user input can now be wired to something else, for example to an url builder module shown in the middle. This one can build an url whith parameters that can be wired to the url builder. So one can easily build complex urls depending on different string modules wired to the parameters of your url. For that purpose you could make use of the regular expression module. It extracts strings using different rules according to the standard regexp language.

As you can see it was never as simple to build RSS Feeds, to aggregate data from different websites or to modify existing feeds depending on your needs. Just think of Google News as a really great source to build Feeds from using Pipes. Or wait! Why don’t use the JSON output of Pipes to build a fancy web application?

About the Author

Studying MultimediaTechnology in Salzburg, Austria