Blogger conversion to BlogCFC

  • Post author:
  • Post category:Uncategorized

As is probably obvious from the title, I recently moved my blog to Ray Camden’s BlogCFC, and I wanted to get all of my blogger.com posts over to this new blog. This method has some problems, the biggest is that it doesn’t capture any comments you may have on your posts. I’m sure you can come up with a way similar to this to get your comments, if you really want to keep them.In order for this to work you have to do a few things first:

  1. Create a delimited file from your blogger account. I did this by changing my blogger template so that it creates a delimited file instead of an HTML file:
    1. If you don’t want to lose any of your existing blogger formatting:
      1. Backup your existing template
      2. set the URL of your blog to something different for now, I.E, delimited.txt
    2. Change your template to the this code:
      <Blogger><BlogDateHeader><$BlogDateHeaderDate$></BlogDateHeader> <$BlogItemDateTime$>^<$BlogItemTitle$>^<$BlogItemBody$>
      </Blogger>
    3. Under formatting set ‘Show’ to 999 days
      1. This is so that blogger will put all of your posts in one file. If you have more than 999 posts, you will have to find a work around for this (blogger doesn’t allow more than this)
    4. Change ‘Date Header Format’ to YYYY-MM-DD
    5. Change ‘Timestamp Format’ to HH:MM:SS
    6. Publish your blog again (I’d chose the index only option if you’re concerned about keeping your old formatting)
  2. Do any necessary data cleaning on the delimited file:
    1. I used the ‘^’ character as the delimiter because I don’t have that in any of my post titles or bodies. You may need to change the template to use a different character
    2. My blog is kind of old, and I had a lot of posts from before blogger implemented the post title field. I had to do some manual data cleaning to get all of the post titles in the right spot
    3. I also had to do some data cleaning for any links to previous posts, as blogger’s formatting for post URLs is different than Ray’s.

Now that you have a delimited file, take a look this code. You will have to change lines 7, 22, 23, and 26 to match your blog’s settings.Now you can run this code, and you should see all of your posts on your blog now. You may want to go through your posts and add categories. Since Blogger doesn’t currently have post categories, I couldn’t automate this.