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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s