Archives – Again

Following my post on archiving my Blog-City posts over to WordPress, a commenter; Martin Smith has very kindly come to the rescue with a little Java script. This converts the Blog-City XML files to Moveable Type format. Then all that is needed is to run the import script in WordPress for Moveable Type posts and it’s all done.

There are some caveats. The Blog-City XML files do not contain categories, so you will have to do this manually. As the posts are imported as drafts, you can do this as you publish them.

Caveat two is more interesting. The timestamp on the XML files is the last time that the file was updated – so, if there are comments, the timestamp will be the time of the last comment not the time the post was originally submitted. So, if that’s an issue, you will have to manually reset the timestamp on posts with comments.

September, October and November 2005 all have a timestamp of 03/12/05 @ 11:59. This is because Blog-City had a problem at about that time – I recall them being down for a couple of days. Clearly this affected the data. So, again, you will need to manually correct.

You can download Martin’s file from here.

2 Comments

  1. On the first caveat I could put in an option to set all the categories to a specified one. This might save some work but I wasn’t sure it was worth doing if people are going to review all the posts anyway.

    On your second caveat the files have 2 dates per post, dateopened and dateupdated. I noticed that the dateopened didn’t have an associated time in the files I had, they were all midnight so I used the other one. I could easily put in an option to use either date.

    Martin

  2. Longrider replies: Yes, I noticed that there are two dates – it is the second one that is the relevant one – i.e. last updated. If the post has had no comments, then this is the timestamp and date that needs to be used. It is only when comments apply that this changes. Personally, I prefer to use this one and amend manually when reviewing than have to change the times of all posts manually. I see this as a fault in the output files. Whichever option we take, there will be a compromise. I think the one you opted for was the best one for me.

    As for the categories, WordPress automatically defaults to “uncategorised” unless otherwise stated, so specifying a default category might be nice, but would rather rely on people having a category that they use significantly more than others… Again, I was happy enough to amend this one manually as some of them have changed since I started the new blog.

    All in all, though – nice work. :mrgreen:

Comments are closed.