A hack job toward single-post exporting

I spoke too soon. Somebody already wrote a plugin that lets you export a single post into an InDesign-friendly format: tagged text, no less.

So, of course, when I came across it my immediate desire was to hack it up and see what I could make it do.

First was to see how I could manipulate the InDesign tags to fit the stylesheets we have in place at The Daily Cougar. Easily accomplished by exporting a complete story (headline, cutline, etc., included) into tagged-text and looking at the guts of it.

This got to be pretty interesting, so I went on a tangent, and realized I could access all of the WordPress functions available through the loop. That meant I could export the headline (the_title) and category (get_the_category) fairly easily. The trick would be writing some simple functions to fetch our custom-field driven subheadline and bylines. And the icing on the cake would be to grab the cutline from the first image attachment of the article.

So, long story short, I’ve got a workable web-to-print workflow piece, customized for our environment and ready for testing in the wild.

Next up: hack the plugin’s “Print post” function to generate a clean XML document that could be imported into any page layout program. If it seems worthwhile, maybe I’ll offer it up to the plugin authors as a new feature.

Man, I’m a huge nerd.

I want: Single post XML export in WordPress

I want to be able to hit a button inside the WordPress post editor that says “Get post XML” and download just that post’s XML for importing into InDesign. Or hell, give me the ability to export Doc, RTF, PDF and any other basic text format. Give me data portability, WordPress!

Do that and you’ll have a free, open-source alternative to Google Docs.

If I were a competent programmer, I’d do it myself.