Anesti Creative Blog

News, Projects, and other Announcements

Jonesblog – iBlog and WordPress

I recently completed the migration, redesign, and setup of a new blog of a good friend of mine, Bryan Jones. Bryan had been running on one of the first blogging platforms, iBlog. The concept behind iBlog is fairly simple – organize the data and posts in flat files locally, and create flat HTML files for the web-viewable content. The elegance and simplicity of iBlog helped in several ways – portability and performance. Obviously, flat HTML files are served faster than interpreted/dynamic PHP pages. These benefits aside, iBlog had several flaws which eventually thrust it toward become abandonware.

The software wasn’t capable of handling comments within the same system, due to the static nature of the pages. Many iBlog users resorted to using solutions like Haloscan, an offsite third party which provided commenting functionality. The other flaw I noticed was limited flexibility in the department of look-and-feel of the blog, without having to rebuild each and every HTML file – dynamic websites are exceptionally flexible when it comes to situations like this. The development of the software also ceased, as the developer seemed to fall off the face of the earth.

It was time for a change, and Bryan decided to go with WordPress. After seeing other blog engines/CMS’s, WordPress was the obvious choice. The biggest issue at hand was how to get the data from his iBlog website to the WordPress version. There were two options that were available on the web – Agitprop and AppleScript. Agitprop was a utility created to export iBlog content into Movable Type export files, and the AppleScript solution was intended to create WordPress export/import files, though it miserably failed. Having known that WordPress has a fantastic import function for several blog formats including Movable Type and Blogger, I went the Agitprop route. After exporting the content and images I ran into a problem – WordPress didn’t like the Movable Type export file and only imported the first entry. After contemplating numerous solutions and attempting them, I settled on a fun project – using Python to parse the Agitprop/MT export and turn it into a valid WordPress WXR file. Several hundred lines of Python parsing and generating code later, a functional WordPress WXR file was created, allowing the data to be migrated into the new database-driven WordPress blog.

After cleaning up a few snags here and there, Jonesblog was fully imported into WordPress. The remaining issues at hand were the theme of the blog, and URL redirection from the old iBlog URLs. The first was a piece of cake. Diving into the Carrington WordPress theme framework, I created a clean and minimalistic look for Jonesblog – exactly what Bryan was after (success!). The difficult part came in finding a way to connect the old iBlog URLs to WordPress. Jeff McGrath‘s assistance came in incredibly useful here, as he caught onto a tidbit of information that gave me a glimmer of hope that I wouldn’t have to manually rewrite 545 blog entry URLs. iBlog used an interesting format for generating URL structures:

http://example.com/C12345689/E20100522014385/index.html

The first subdirectory is the category, stored in some unique ID. These ID’s could be mapped to WordPress category names using a dictionary/Array. The remaining subdirectory, as pointed out by Jeff, was a UNIX timestamp preceded by the letter E to designate “entry.” After a few attempts at mapping the dates in the URL to WordPress’ post dates, I discovered that iBlog’s naming convention was frustratingly inconsistent. The decoding of these URLs only worked for about 20% of the blog entries – not nearly enough to justify using it. Manually, I added the old URL’s to each post as a custom field, which would allow me to search the WordPress database to find the post that was being requested.

After some Regex and .htaccess magic, the old URLs were rewritten using Apache’s mod_rewrite to the new locations. This was my first experience working with an OS X webserver, and it was an interesting one. You can check out the (nearly) final product at http://prometheus.med.utah.edu/~bwjones/.

Comments

3 Responses to “Jonesblog – iBlog and WordPress”

  1. BWJones

    Many thanks for all your work on Jonesblog Sawyer. Looking forward to lunch on Wednesday.

  2. Devin Reams

    Happy to see Carrington used in such a nice, clean way. Nicely implemented!

  3. SPangborn

    Thanks Devin! It’s a great framework, I’m loving the flexibility. Definitely will be using it more in the future. :)

Leave a Reply