DWiki can now generate Atom feeds for recently changed pages and recently made comments, either for the entire DWiki or for some subtree of it. For comments, this can be down to an individual article.

At the moment, pages in the Atom feed are rendered without macros except for CutShort, for efficiency reasons. All of the links are turned into absolute links (with http:// et al), since this is basically required. Nulled-out macros produce a small message to that effect in the generated content, so that people reading the Atom feed can tell that something is going on.

Atom feeds are implemented as two new views, 'atom' and 'atomcomments', with a associated pile of new renderers. Unfortunately the requirements of the Atom XML format make it all but impossible to reuse standard renderers to display the content of things, because all the actual HTML has to be escaped into oblivion. (Plus, bonus absolute links.)

ChrisSiebenmann doesn't like the view name 'atomcomments' and may come up with a better one sometime.

There is a new atom::feeds renderer that creates the core of a feed toolbar. (ChrisSiebenmann decided that this fit badly into the page toolbar, which is for things that the browser can show you natively. Atom feeds are a different sort of tool.)

Limitations:

The Atom feed is almost but not quite 100% valid. The invalid bit is that the latest Atom RFC has changed the tags used for dates; DWiki generates both old and new date tags, which is invalid in either view.


Comments on this page:

From 78.35.25.22 at 2011-02-26 10:59:26:

I just noticed your comment feed generator has a peculiar behaviour that is arguably wrong: it lists the <author><name> as “By cks” or “From 1.2.3.4” (rather than just “cks” or “1.2.3.4”).

Aristotle Pagaltzis

By cks at 2011-02-26 12:12:30:

This is one of those triumphs of expedience over specifications. In practice, the author name is presented as to the user of the feed and so I format it in comments to be look relatively nice and be clear.

(The author name is formatted differently for actual entries because there is only one sort of author name for them, instead of the two sorts that comments have.)


Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Jun 5 00:58:15 2005
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.