public
Description: Couple of quick & dirty scripts to create feeds for some sites that doesn't have them.
Homepage: http://www.dirceu.info/blog/creating-rss-feeds-with-rssifier/
Clone URL: git://github.com/dirceu/rssifier.git
dirceu (author)
Fri Oct 17 10:06:06 -0700 2008
commit  c392beba1b937601daa34bcc18b222ddae57fca5
tree    71958c70eb6259f1111e331b9a33b20255a03cb4
parent  f03a897e4f2f6987d067812856b8e0938d3904aa
name age message
file .gitignore Loading commit data...
file README.txt
file malvados.rb
file oots.rb
file rssify.rb
README.txt
How to Run
==========

In the first time you run these scripts you must pass the id of the "next item" as a command-line argument. Example:

$ ruby malvados.rb 1198

This will generate the XML file. In the next run you can do just like this:

$ ruby malvados.rb

Now rssifier.rb will try to get the next item (based on the last item number present in the XML file) and update the 
XML.

How to create a new feed
========================

The 'rssify' method takes some parameters, with two special cases: the parameter ':get_body' must contain a Proc that 
gets a 
string 's' containing the body of the feed item and formats it. The parameter ':next_item_getter' (yeah, I must fix 
these 
names...) doest the same for the next item number.

The guess_next_item method acts sequentially, adding 1 to the next_item number and trying to download it based on a 
template. 
If it's successful (!= '404'), the XML file containing the feed is updated.