Feeds For All With hAtom

I previously had tackled the issue of subscribing to documents with embedded hAtom content by writing a script for NetNewsWire that used its ability to run special script subscriptions on the “client” side.

While the script works great, and I’ve got a number of feeds I watch from other sites this way as a publisher I still longed for a more “feed”-like and more universal, and less technical solution.

This afternoon I got one big leap closer to a solution I’m happy with.

Detected feed as seen in Camino

Instead of offloading the work of parsing the html document containing the hAtom content to a client side application, or relying on a 3rd party proxy that I have no control over and may not be expecting a ton of regular traffic I’ve set up a script on my own server to act as a proxy and turn any found hAtom content at the specified address into more useful atom content1. Through the magic of the link element I can pass the new feed url off as you would with any other atom feed and the whole process is seamless to the user.

This even works for adding feeds to hand edited pages [yes, people still do that!] or pages that otherwise don’t have a database to draw on and build multiple feeds from. You can see it in action now for the version history hAtom feeds here and here and I’ll soon be implementing it on all the non-blog pages on ChunkySoup.net.

For the curious, the screen shot is of the feed detection code soon to be added to Camino.

EDIT: I’ve just uploaded the changes to all of the individual pages on ChunkySoup.net. Look for the feed titled ‘This Page’s Atom Feed’ on pages like this to watch them for changes.

1 using the usual suspect: hAtom2Atom.xsl

Comments Temporarily(?) Removed