2007/02/19

Migrated to Blogger, Mostly

Taking my queue from Carrel.org, I've spent that last several hours (or days?) trying to migrate all my posts from my old Textpattern blog to Blogger. It doesn't seem to be a common thing to do, so nothing would do it out of the box. Using the web APIs is totally the way to go, but I didn't know much about either, so I wanted to find something to do most of the work for me. I found a program called blogsync that did the job fairly well, and here we are. The only trick there was rewriting the assumed WordPress XMLRPC URL to Textattern's location.
However, a few problems remain.

  • Imported posts came with Textile rather than proper HTML.
  • URLs have all changed.
  • I should probably start writing actual content now.
  • Comments weren't migrated, not that I had many. So No big loss.
Fixing the Textile problem is the annoying one. I'm not much of a programmer and I've been sick the last week so my brain barely works. I will eventually write some quick ruby to pull each post, parse the Atom, run just the body through Redcloth's to_html filter, and then update the post. Not rocket science, but my brain is having a bit of a hard time with it.

mod_rewrite on my old server takes care of some URL problems. The main page does an external redirect here, and the old feeds redirect to Feedburner.

Just had to mix a little magic in with the rules I already had:
# Really old B2Evolution blog I used for like 2 days
RewriteRule ^xmlsrv/rss2.php$ http://feeds.feedburner.com/plek [R=permanent,L]

# Old style Textpattern feeds
RewriteCond %{QUERY_STRING} ^(rss|atom)=1
RewriteRule ^(.*) http://feeds.feedburner.com/plek [R=permanent,L]
# New style Textpattern feeds
RedirectPermanent /rss http://feeds.feedburner.com/plek
RedirectPermanent /atom http://feeds.feedburner.com/plek

# Redirect any main page access to the new site
RewriteRule ^$ http://blog.plek.org/ [R,L]

# Keep old Textpattern direct links working
RewriteRule ^(.*) index.php
mod_rewrite really makes my head hurt. I always have to refigure out it's magic. The last problem is all my old URLs won't redirect unless I figure out some real magic since Blogger likes ulrs as 2007/02/article-name and Textpattern did 2007/02/19/article-name. I could do some more rewrite magic, but that stuff just hurts. For now I will just keep the old stuff running for those 3 hits a year it gets.

Technorati Tags: