My blog was very unhappy.
I had a pretty cool blog a couple years ago. I made a bunch of entries; actually I was one of the earlier bloggers, pre-livejournal even!
I had modified the blog to last forever- it was blog-software agnostic. Every URL would last forever and ever, because there were no hints in the permalink about the implementation. Theoretically I could use any blog software and the links would be the same. What this meant was every post was on a page called “index.html” in its own directory.
At some point Brazillian hackers got into our machine with what I think was a PHP exploit. They replaced every index.html file with their calling card. What would normally be a small hassle turned into a devastating loss of every page on my site.
All was not lost. We had all the entries in the database. But the server was taken down for security reasons. Then, life got in the way, and we never rehabilitated the server.
History became legend, legend became myth, and for two hundred years my blog postings lay inaccessible in their MovableType database. SixApart changed schema, and eventually didn’t even support the old version. All the migration scripts would no longer work. Enough has changed that I couldn’t even get the old version of Movable Type to work.
The time: the present. I now have a one-click install of WordPress. I start blogging again. How to get that stuff back? The answer: write a custom script in perl.
Issues/saga:
- Movable Type has a export format. Unfortunately that format has changed over the years.
- WordPress also has an export format. Unfortunately they never define it anywhere.
- WordPress claims they can import MovableType. This turns out to be a total lie. I used the perl in the MT installation, which didn’t work out… I wrote a script that directly reads the legacy MT database, and outputs a mt-import.txt. WP didn’t like it
- Eventually, I wrote a script that directly reads the legacy MT database, and outputs a fake WordPress export file. A few of the fields don’t map directly; for example WordPress has no notion of “Extended Entries.” Also I think my faceted category system in MT screwed up my category data. Oh well.
The upshot: here’s the script, if anyone wants it.
customMTExport.perl
- If you don’t know perl, if you aren’t a UNIX person, just forget it. You won’t be able to use it.
- Unsupported. I’m not your momma. I can be bribed, however. For $50 I can rehabilitate your blog and put the entries into your WordPress.
- Hopefully the script is short enough and there are enough comments so the average perl hacker can figure out what I’m doing and modify it to their liking.