Everything started with a blog entry in February 2007 called RSS Everything where I wanted various UNIX-like tools for processing RSS or Atom feeds. Based on some discussions and input from Jean-Etienne Poirrier, here is some test scripts and how to use them.
The current scripts can be downloaded from my git repository : rss-tools git repo
rssdir is a simply-and-dirty script to rssify any directory on the filesystem.
python2.5 /usr/local/bin/rssdir.py --prefix http://www.foo.be/cours/ . >rss.xml
rssmerge.py is a simple script to gather rss feed and merge them in reverse time order. Useful to keep track of recent events.
This is still an early prototype and assume that you have full control of the remote rss feeds (if not you may have some security issues).
TODO : - rss 2.0 and atom output / - full html output / - filter items by keyword
python2.5 --maxitem 30 --output phtml url1 url2 url3
python2.5 rssmerge.py --maxitem 200 --output phtml "http://www.foo.be/cgi-bin/wiki.pl?action=journal&tile=AdulauMessyDesk" "http://api.flickr.com/services/feeds/photos_public.gne?id=31797858@N00&lang=en-us&format=atom" "http://git.quuxlabs.com/?p=adulau/.git;a=rss;opt=--no-merges" "http://www.librarything.com/rss/reviews/adulau"
rsscluster.py is a simple script to cluster items from an rss feed based on a time interval (expressed in number of days). The maxitem is the number of item maximum kept after the clustering. An example use is for del.icio.us where you can have a lot of bookmarks during one day and you want to cluster them in one single item per a defined time slot in RSS or in (X)HTML.
python2.5 rsscluster.py --interval 2 --maxitem 20 "http://del.icio.us/rss/adulau" >adulau.xml
rsscount.py is a simple script to count how many items are in a RSS feed per day. This is used to build the wiki creativity index. There is no limit for url arguments.
python rsscount.py "http://www.foo.be/cgi-bin/wiki.pl?action=journal&tile=AdulauMessyDesk&full=1" | sort 20080106 1 20080112 1 20080123 1 20080210 2 20080217 1 20080313 1 20080407 1 20080502 1 20080503 1