As soon as I posted details of my new Atom API library to the SixApart ProNet mailing list, I got an email from their Manager of Platform Technology, and then another one from Anil Dash, both with hopes that I could include LiveJournal support.
I’m now in touch with one of their people who’s handling the actual implementation of their APIs, so hopefully I’ll be able to work out what’s going on and add LJ support to the code library soon. At the moment, my WSSE authentication is failing on the second request to their API, even though it’s working on the first one… curious.
I’ve finally packaged up and released the PHP Atom API code I wrote as part of webpad. You can download it now and go crazy.
I’ve just gotten around to getting a copy of a lengthy post that I made to the blosxom mailing list about the different types of Blogging APIs and how they apply. It covers the Blogger API (1.0 and 2.0), metaWeblogAPI, Atom and a bunch of stuff relating to blosxom.
It’s been archived as a feature article for posterity
In amongst all the talk of the Atom API (which might one day actually be released and usable) and RSS, and with me working on some XML/XSL things at work, I realised that there’s probably another option entirely with blosxom as far as templates/flavours/themes goes, and it goes a little something like this;
Three Xs, therefore blosxxxom, that’s one for blosxom (Apple’s OSX), one for XML and one for XSL, which are the three technologies we’re dealing with here.
- Install the theme plugin for blosxom and get it working (this plugin makes life much easier!)
- Now create a new theme, with a suitable name (mine’s called ‘blosxxxom’ for the sake of the experiment, and it looks like this; page.blosxxxom. This theme should create a valid XML document from your posts.
- Your XML output should refer to an XSL stylesheet, which will actually take care of doing the formatting, entirely client-side (style.xsl in my example theme file)
- In the XSL file, just use normal XSL processing instructions to handle the output and presentation of the XML document into XHTML!
- Point your browser to blosxom and tell it to use the flavour name that you used to create this theme, and you should be able to see what the output looks like. View the source of the document and you should see the plain XML produced by blosxom
Now, for a couple notes;
- I made my content_type value in the theme text/xml, but this forced blosxom to encode special characters to be nice for me. I found that it was better to comment this section of the main CGI out so that I could drop the values in, and wrap them in the CDATA tag seen in the XML theme.
- Rather than worry about what’s in the body much, I just wrapped things in a <![CDATA[ tag ]]> to be safe.
- Mozilla doesn’t currently display my output properly – it’s not doing links (or any tags) properly, and it’s just showing them rather than interpreting them as HTML. Anyone got any ideas on this one?
- There’s more to be done, but it’s a fun point to start at, and there’s no reason why you can’t add things like a COMMENTS element to your STORY node, or a KARMA, a META node with a series of elements – it’s pretty free-form if you’re only doing the XML for your own presentation needs!
Hope that’s inspired some people to try some things out that they might not have otherwise tried, and if nothing else, it just demonstrates how flexible blosxom really is!