Kaplaaa! I’ve succeeded in transferring most of my old photojournal entries into WordPress! The process was greatly simplified after I wrote an AppleScript to handle each post. The script parsed two files used by my old entries: (1) an XML configuration file containing the post’s title, publish date, and header image and (2) a text file containing the contents of the post. For the post contents, the script called various functions within BBEdit to strip out extraneous HTML tags, PHP code and extra line breaks. It then called an XML-RPC method to WordPress to upload and publish the post. I modified the XML-RPC handling code in WordPress to add additional metadata to each new post. I’ve also tweaked various WP templates to correctly differentiate between the plain thumbnails and those with drop-shadows. This will make the archives and entry pages look more visually appealing. The photogallery now appears in a pop-up window, so you won’t get lost trying to return to the index page.
Moving forward, I have to add <!–more–> tags into the entries to make the archives look cleaner. There also remains a few entries that require manually updating. These things, fortunately, can be deferred until a later date. Now only if I could write an auto-annotator application for my images! I have 7 months left to go: March, 2003 to September, 2003. Almost there!