The Moth - Tool to convert blogger.com content to dasBlog (original) (raw)

« Preserving Permalinks | Microsoft Windows HPC Server R2 Beta2 »

Fri, April 9, 2010, 07:33 AM under Blogging

Due to blogger.com dropping FTP support, I've had to move my blog. If you are in a similar situation, this post will help you by showing you the necessary steps to take.

Goals

No loss on blog posts, comments AND all existing permalinks continue to work (redirect to the correct place).

Steps

  1. Download the XML files corresponding to your blogger.com content and store them in a folder.
  2. Install and configure dasBlog on your local machine.
  3. Configure your web.config file (will need updating once you run step 4).
  4. Use the tool I describe further down to generate the content and place it at the right place.
  5. Test your site locally. Once you are happy, repeat step 2 on your hosting provider of choice. Remember to copy up your dasBlog theme folder if you created one.
  6. Copy up the local web.config file and the XML dasBlog content files generated by the tool of step 4.
  7. Test your site on the server. Once you are happy, go live (following instructions from your hoster). In my case, I gave the nameservers from my new hoster to my existing domain registrar and they made the switch.

Tool (code)

At step 4 above I referred to a tool. That is an overstatement, it is simply one 450-line C#code file that you can download here: BloggerToDasBlog.cs. I used this from a .NET 2.0 console app (and I run it under the Visual Studio debugger, i.e. F5) like this: Program.cs. The console app referenced the dasBlog 2.3 ASP.NET Blogging Engine i.e. the newtelligence.DasBlog.Runtime.dll assembly.

Let me describe what the code does:

Input:

Again, to see what values I passed for all the above, see my Program.cs file.

Output:
Other notes:

This is not code I will maintain or support – it was a throwaway one-use project that I am sharing here as a starting point for anyone finding themselves in the same boat that I was. Enjoy "as is".