The Chumpologica – an RSS feed combiner

June 30th, 2003  |  Published in foaf, python, rss  |  4 Comments

Today we relaunched The Daily Chump, a multi-author IRC-based blog, with a shiny new look and a new feature: the chumpologica. This is a webpage (and RSS 1.0 feed) that aggregates entries from blogs written by regular contributors to the Chump. It’s built using about 150 lines of python and takes its configuration from a FOAF file.

Update: I’ve now packaged and released this project as a proper distribution.


FOAF has a predicate in its vocabulary for indicating that a person has a weblog. bloginfo.py uses the Redland RDF framework to read the FOAF file and find the details of each weblog. It uses the very latest version of Redland’s python support (which contains support for iterators, allowing nice syntax such as: for statement in model: print statement.subject) which is only available in the nightly source snapshots at the time of writing.

chumpologica.py is the program start point. It uses Mark Pilgrim’s RSS parser to read in the RSS feeds, and puts the entries into a listed sorted by date. The date is taken from the entry’s Dublin Core date property, unless that’s missing in which case the time of retrieval is used. A hash is kept of entries seen on previous runs so that we don’t get duplicate entries. After a run, the entries and hashes are pickled (serialised) into a file for reuse on the next run.

If new entries were found, Mark Nottingham’s RSS.py is invoked to output a new RSS 1.0 file using the newest 30 items. Weblog information taken from the FOAF file is stored along with each entry using standard Dublin Core tags such as relation to point to the original blog and creator to give the name of the writer. The resulting RSS file is sufficient to be transformed using XSLT into the final webpage.

Responses

  1. Raw Blog says:

    July 18th, 2003 at 2:57 pm (#)

    The Chumpologica

    hackdiary: The Chumpologica – an RSS feed combiner. RDF at the core – pulls data out of FOAF. Now that’s…

  2. Lost Boy says:

    September 18th, 2003 at 1:16 pm (#)

    MS Bloggers in FOAF; Java Bloggers Next?

    Dan Brickley has written up a note on the FOAF Wiki about using the foaf:weblog property, pointing to an OPML

  3. Lost Boy says:

    December 5th, 2003 at 1:58 pm (#)

    Connect The Dots

    Let’s see… Whilst pointing out a few cool things Edd mentions Planet Gnome and Monologue. Both of these are community

  4. Raw says:

    December 10th, 2003 at 12:47 pm (#)

    Connect the Dots

    Leigh Dodds on (automatic) group forming: People have blogs. People have interests. People attend conferences. If you describe these people…