I’ve just finally transferred most of the content of my old blog, Defenestration Corner, to this blog. I wound up writing a bunch of bad Python code to do much of the work, but still had to do quite a bit of manual cleanup (and someday, I may yet get around to categorizing the posts I transferred). I lost all the comments to the blog in the process; there are few enough (and many of them were spam, anyway) that I’ll look at them by hand rather than bother to try to write yet more single-purpose code.
One of the areas which caused me the most trouble was my use, in the early days, of a non-empty posting to hold a picture. I finally decided that those few comments were not worth the effort and tossed them, changing the link to the picture itself instead of the posting.
I also learned, yet again, to Keep It Simple, Stupid. My original plans, months ago, involved writing wonderfully clever code to go through the old site, grabbing each posting, examining it to see if it had any references which needed changing, and, if so, finding the target posting and updating it. This would have involved a stack, worrying about circular references, and many other perils. I eventually (months later) took a simpler path; I made a first pass over all of the articles, capturing essential information about them, such as the date as rendered by Manila (rather than trying to figure it out from the UTC date, sometimes badly-formed, passed back through the Manila SOAP interface into Python) and the title of the article. I used the date and title to create a slug for WordPress; I probably didn’t use the same algorithm WordPress would have used, but it didn’t matter.
After that, it was fairly easy to go through the rendered, content-only version of each article (thereby letting Manila resolve its internal “shortcuts”), find all the internal references, convert them to the new version (or, for images, just go to the underlying image), and use the MySQLdb Python module to directly insert the articles into the database on readthisblog.net.
I ran into a few problems where Manila did, ummm, odd things; rather than program around them, I just manually fixed up the results. And I’ll probably be doing more manual fixups later.
I still have to arrange for a redirect from dss.editthispage.com to this site, and I still will have to convert from the Manila forms (like /discuss/msgReader$nn) to the renamed postings here, but that’s fairly simple. I hope.