PLaneT RSS Library

A simple library providing convenience functions and data structures for dealing with RSS. Has a uniform stucture for representing RSS, and uses this to produce any version of RSS.

Download

Since this is on PLaneT, to download this is as simple as running the following program.

(require (planet "write.ss" ("mburns" "rss" 1 1)))

Documentation

Data

(build-rss String String String [Image] Item …)
Create a RSS syndication with the given title, description, and URI. The Image is optional. Following the Image are Items.
(build-image String [String] [String] [Number] [Number])
An image at the given URL, with the optional hyperlink, title, width (pixels), and height (pixels).
(build-item String String String String Xexpr …)
One article in an RSS syndication, with the given author, date, title, link, and contents. Note that the last arguments are Xexprs, not strings; all "&" and "<" must be escaped. For example, the string "I had < $50" must be written as "I had " 'lt "$50". For more information see the XML collection's documentation.

Functions

rss->xexpr
Contract
(rss? (lambda (n) (and (number? n) (or (= n 1.0) (= n 2.)))) . -> . Xexpr?)
Description
Converts the RSS, built using build-rss, into the correct XML for the specified RSS version. Valid versions are 1.0 and 2.0.

To Do

I'm low on free time at the moment, so work on this is slowed. My next task is to rewrite this using the RDF library, then write read.ss using the RDQL library. My prioritized list thus looks like:

  1. Write this using a hypothetical RDF library, to work out ideas, have an example, and an awesome, real-life test case.

    2004-10-09: The preview has been updated according to suggestions by Mike MacHenry.

  2. 2004-10-02: Done! Please review the preview of the next write.ss and send all of your suggestions to mike@mike-burns.com.

  3. Write the RDF library. Release the RDF library on PLaneT.
  4. Release the rewrite of this RSS library using the RDF library.
  5. Add support for Atom. Test and release on PLaneT.
  6. Add support for older RSS versions. Test and release on PLaneT.
  7. Write read.ss, using the hypothetical RDQL library.
  8. Write the RDQL library, using the RDF library. Bruce's code comes into play in the RDF library. Test and release on PLaneT.
  9. Release the new RSS library with the new read.ss, in addition to write.ss. The complete RSS solution, as a simple library on top of RDF, for PLT.

Contact

Mike Burns mike@mike-burns.com