Well, so far with the planned Drupal migration, so good. I'll outline the approach I'm taking:
1. Tag my current blog.
Because Blogger doesn't (seem to) have an export function, I've gone for the age old method of content scraping. If you view the source for this page you will see chunks of HTML comment that look like this: (etc). These have been automatically generated by a script that reads the Blogger template and puts HTML comments around the Blogger content tags. BDMT is short for Blogger Drupal Migration Tag by the way. This method seems to be a popular way of progressing a migration.
2. Parse the tagged blog.
So, once these comments are in place I can then read the contents of my blog and use a simple regex to extract those bits of text between the comments, nicely indexed by the name of the comment itself.
3. Import into Drupal.
This was causing me some grief, but I've noticed that since playing around with the drupal_execute method the API documentation for v6 of Drupal has been updated. I've just run a quick test of the new code and created my first ever post, programatically. The rest should be plain sailing.
So far I've got scripts for steps one and two, but my PC is out of action at the moment (warranty replacement) so this project will be on hold for a little bit.
Labels: blogger, drupal, migration