Skip to content

Instantly share code, notes, and snippets.

@dpk
Created Apr 11, 2011
Embed
What would you like to do?
The usage of Plan's Atom feed generator, based on Rails' atom_feed Builder handler. It works by generating SXML which is then turned into the actual XML of the feed.
(atom-feed
(title "David's Weblog")
(subtitle "An awesome weblog")
(link 'self "http://dpk.org.uk/feed/")
(each post (posts 20)
(entry
(title (post 'title)) ; maybe do an automagic thing to detect dictionary items with the same name as atom properties?
(id (tag-uri post))
(link 'alternate (post 'permalink)) ; could be automagic, too
(published (post 'pub-date)) ; automagic?
(updated (post 'upd-date)) ; " ?
(author '(name "David Kendal"))
(content (post 'body)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment