It’s just data

Adding Atom support to PlanetPlanet

This weekend’s recreational programming project involved PlanetPlanet and ensuring that there is adequate support for Atom.  And there’s nothing like live data to help identify integration issues.

It turns out that upgrading to the latest Feed Parser wasn’t enough.  PlanetPlanet ignored basic information like title_detail.type.  This turned out to be relatively straightforward to add, and the result passes Phil’s tests.

Internationalization and relative URIs required no effort on my part — PlanetPlanet and the Universal Feed Parser already had these areas covered.

Along the way, I added support for Autodiscovery and the Common Feed Icon.  And produced a valid Atom feed. And adopted and adapted Planet Apache's template and style for my own use.

I then turned to XHTML support.  In order to have any hope of passing Jacques' Torture Tests, any river of news style aggregator will have to first convert all of its input into well formed XML.  Thank’s to Aaron Swartz's help, Planet Intertwingly is currently well formed, if not yet completely valid.

More information: code, results.


Do you plan on including <source> elements in the Atom feed?

Posted by J$ at

Atomic Monday

First of all, implementors of anything Atom-related need to spend some time chez Jacques Distler; in particular, the conversation that plays out in the comments. Second, there’s this piece of software called Planet Planet that allows you to make an...

Excerpt from ongoing at

The API of the Universal Feed Parser is constructed in such a way that escaping errors are quickly made. Values in an API should never have both plain text and HTML text as possible values at the same time!

value and type should be deprecated, and plainValue, htmlValue and xhtmlValue should be added, with proper conversions between them.

Posted by Sjoerd Visscher at

The link to Phil R’s feed and blog are broken (the feed icon links to his blog, his name is a link without an href attribute). The OPML is broken correspondingly.

Posted by Phil Wilson at

FeedParser’s useless API is obviously a result of my flawed personality.

Posted by Mark at

Yes, how could you, you inconsiderate ****!

Posted by Sjoerd Visscher at

J$: consider it on the todo list.  I need to figure out more what this templating engine is capable of before I tackle that.  At the moment, I’m more focused on fixing bugs.

Sjoerd: I’m not sure that type should be deprecated, but I did end up building what amounts to two of those three functions you describe.  If others have similar needs, perhaps this function could be added to Feed Parser.  Example use case: many people escape titles so that they can have convenient access to HTML entity definitions.  Such an escaped title can be readily placed into header elements, but can not readily be placed directly into the value of a title attribute.

Phil: Fixed, thanks.  The OPML provided with Planet probably needs some attention by somebody as it doesn’t have attributes like type and title.

Posted by Sam Ruby at

If others have similar needs.

I can’t imagine an aggregator that would not need either converting plain text to HTML, or HTML to plain text.

Posted by Sjoerd Visscher at

Serendipity

I appear to have timed my WxWidgets/XMPP-enabled three-paned aggregator (which uses Planet as part of the backend) perfectly.... [more]

Trackback from philwilson.org

at

Jeff Waugh: Sweet Planet Action

Lots of cool stuff going on in Planet land at the moment. Mary Gardiner sat down with Rob Collins to add some much needed unit testing love to Planet, and is looking into a bit of sanity-inducing refactoring and optimisation as well. Sam Ruby has...

Excerpt from Planet Ubuntu at

I recently tried converting HTML to plain text and vice-versa for FeedTools, but it turned out to be quite difficult without a better way of escaping/unescaping things.  And I don’t really have a good enough understanding of Unicode to figure out how to go from the numeric character entities to the raw bytes without the aid of a library.  Which doesn’t seem to exist for Ruby.

Posted by Bob Aman at

And I don’t really have a good enough understanding of Unicode to figure out how to go from the numeric character entities to the raw bytes without the aid of a library.  Which doesn’t seem to exist for Ruby.

It is built in:

puts [73, 241, 116, 235, 114, 110, 226, 116, 105, 244, 110, 224, 108, 105, 122, 230, 116, 105, 248, 110].pack('U*')
Posted by Sam Ruby at

Handy.  Going to be messy to write though.

Posted by Bob Aman at

Plagger update: Planet and microformats (XOXO)

I’ve been a little lazy not updating recent Plagger development. Don’t mind. It doesn’t mean Plagger development has been squeezed, but it’s actually still very hot. Looks like Planet Planet added Atom support recently. Plagger also has a nice...

Excerpt from bulknews.typepad.com at

It appears that Planet Intertwingly discards language metadata. My latest feed item has both Finnish and English content—both properly marked up. The language metadata is not present on the Planet Intertwingly front page or in the aggregated feed.

I can’t think of any concrete reason why this should matter in this case. (Finnish—like English—is on the top of the Mozilla UTF-8 font selection pecking order, and I am not aware of real voice browsing use cases.) However, this would make a difference with e.g. Polish or Korean in some circumstances. (Probably not the main use case for Planet Intertwingly, but could be relevant to PlanetPlanet anyway. :-)

P.S. The spell checker does not know about Intertwingly and Mozilla.

Posted by Henri Sivonen at

The language metadata is not present on the Planet Intertwingly front page or in the aggregated feed.

I think I’ve fixed it now.  Let me know what you think, and I’ll try to get the necessary fixes into Planet and the UFP.

Thanks for the test case!  And I’ve updated the dictionary.

Posted by Sam Ruby at

I think I’ve fixed it now.  Let me know what you think, and I’ll try to get the necessary fixes into Planet and the UFP.

Cool. Looks good. Thanks. Perhaps also the language of the title could be carried on.

P.S. I saw the yellow screen of death when previewing this. (Missing paragraph end tag when starting a paragraph with >>.)

Posted by Henri Sivonen at

I think I’ve fixed it now.  Let me know what you think, and I’ll try to get the necessary fixes into Planet and the UFP.

Cool. Looks good. Thanks. Perhaps also the language of the title could be carried on.

OK, now I carry on the language of the entry, title, and content.

P.S. I saw the yellow screen of death when previewing this. (Missing paragraph end tag when starting a paragraph with >>.)

Got a test case?

Posted by Sam Ruby at

Got a test case?

Yes:

>>a

>b


Posted by Henri Sivonen at

Serendipity

I appear to have timed my WxWidgets/XMPP-enabled three-paned aggregator (which uses Planet as part of the backend) perfectly....

Excerpt from philwilson.org at

Planet Musings

Introducing Planet Musings.... [more]

Trackback from Musings

at

Sam Ruby: Adding Atom support to PlanetPlanet

[link]...

Excerpt from del.icio.us/miyagawa/planet at

Plagger update: Planet and microformats (XOXO)

I’ve been a little lazy not updating recent Plagger development. Don’t mind. It doesn’t mean Plagger development has been squeezed, but it’s actually still very hot. Looks like Planet Planet added Atom support recently. Plagger also has a nice...

Excerpt from bulknews.typepad.com at

Add your comment