RSS Library for Racket

This a nascent Coding and publishing project. No one else has made this yet, and it’s something I’ve had to do manually more than once.

This package is now available as a beta:

Original notes

Purposes (in order of importance and implementation):

  1. Convenient generating of valid, best-practice Atom 1.0 feeds suitable for blogging.
  2. Same, but for podcast feeds
  3. Parsing RSS feeds
  4. Validating RSS feeds. (This might never happen. The W3C already has a reference validator, though a Racket implementation might be an interesting exercise.)


You should only have to supply what is absolutely necessary to generate the elements required by the spec.

Everything you supply is validated, so the result is always either a valid feed or an exception.

The library will actually be a bit more opinionated than the spec about how your feed is constructed. This supports the convenience aspect because you have fewer decisions to make, and the validation aspect because there are fewer problems to look for.

Useful links


The below is a near-verbatim excerpt from the test suites that I have passing so far:

#lang racket

(require feed)

(define me      (person "Kate Poster" "")
(define site-id (mint-tag-uri "" "2007" "blog"))

(define entry-1
  (parameterize ([current-timezone 0])
    (feed-entry (append-specific site-id "one")
                "Kate's First Post"
                (infer-moment "2007-03-17") ; published
                (infer-moment "2007-03-17") ; updated
                `(div (p "Welcome to my blog.") ))))

(define blog-feed 
  (feed site-id "" "Kate Poster Posts" (list entry-1)))

(express-xml blog-feed 'atom "")

Running that code results in:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="">
  <title>Kate Poster Posts</title>
  <link rel="self" href="" />
  <link rel="alternate" href="" />
    <title type="text">Kate&apos;s First Post</title>
    <link rel="alternate" href="" />
      <name>Kate Poster</name>
      <![CDATA[<div><p>Welcome to my blog.</p></div>]]>