Site Meter

Export Blosxom Entries To Rapid Weaver

I've been able to get my Blosxom entries imported into Rapid weaver using a combination of templates and Applescript. There are several ways this could be done, I choose to use a set of Blosxom templates by Marc Nozell. I set Blosxom to generate 9999 entires and set my browser to http://localhost/cgi-bin/blosxom.cgi?flav=mt (.mt being the template extension). I then saved the resulting webpage to my hard drive as a text file.

Ah, but winning is only half the battle. Or something like that. Rapid Weaver will import the file, but the format of the file isn't quite right to get the proper import.

  1. Rapid Weaver will only import dates that are in AM/PM format, it doesn't like 24 hour format that templates default format is in. I should note that the specs for the Movable Type Import Format say either way should be good.
  2. The format of the categories are in directory form. Rapid Weaver considers the whole directory to be a single category. Not a bug on RW part, how should it know?
  3. RW will convert any line spaces in the body of the entries to <br/>. Yes annoying.

To fix this issues I post process the MTI file with Applescript. The Applescript formats the date, parses out categories and removes line breaks from entries. There is only one problem with this script, it is extremely slow. It took over 3 hours for it to process my 1000 entry, 2 MB file. If this was something I used a lot, I might try to speed it up. One way to speed it up is to save it as a Run Only application.

Download Fix MTI from Blosxom.scpt

This Applescript could be used on any MTI file. It will need to have the parts removed that are not needed. Hopefully it's obvious from the code what does what.