I was having a conversation today with a friend and somehow we got onto the topic of support for ODF, the Open Document Format, in WordPress. Drupal has some import support for ODF word processing files and that effort appears to be quite active (in the sense that there was an update to the module yesterday).
Import is hard because you need to be able to do something with anything that’s in any document. If you can’t handle something, you had better tell the user what you decided to discard. A minimal import for word processing files, as I mentioned above, might respect all words in the text, paragraph structure, bold, italic, colors, headings, and a few other simple things. In this case I would think of the import as “take this file and do something sensible, if not perfect, with it.”
Export is easier to imagine. Given the range of things that can be done in WordPress posts and pages, I would think that only a relatively small subset of ODF would be needed beyond the packaging and some straightforward text markup. Here I would take as my model “what would this WordPress page look like if I printed it, and what ODF file would I have to create to generate equivalent output?”
Given this, I would tackle the export to ODF feature first, but there is a core question that needs to be answered. Why? That is, given a web page generated by WordPress, why do you need to generate ODF form? I must admit I’m somewhat strapped to come up with good reasons, though I could probably make up a couple.
It is more interesting to consider how to take documents created in ODF by something like Lotus Symphony and then import them into WordPress for publishing. That’s the key word: publishing. So though the problem is harder, having various ways of importing documents into WordPress from ODF would likely be much more useful.
Assuming this as the preferred direction of work and looking at how WordPress can be extended, it’s worthwhile to ask what you might do with plugins or themes to make the import even better. While I like the idea of the result being theme independent, having one or two plugins that added some cool support for imported spreadsheets or presentations could potentially be quite nice.