Well in times of switching blog system, one BIG challenge is to save all the old posts and comments. Fortunately (or not?) for me is that I didn’t get too much comments before. So the only thing I need to worry about is the posts.
At first I found a perl script to migrate from blosxom to WordPress on DeWitt Clinton’s blog. However it didn’t work good for me as it only import half of my posts. I mean, it not only losts some posts, but also losts content of some post. Looks it couldn’t work well for PyBlosxom.
And then I found a script from the Gnome Blog. It makes an RSS feed that includes all the old posts, with full content. So it is pretty easy to import to WordPress.
One thing I found annoying besides the newline problem is that I need to convert all the <pre> tag to <code> tag, to utilize the new code highlight plugin. So I wrote this simple pyblosxom to wordpress script. It’s a one time script and dirty, but works for me
Note I added a .txt postfix to the file name cause WordPress won’t allow me to upload .py files and I haven’t figure out how to chang this.
Usage:
1 . wget the full RSS output produced by the Gnome script
2. update it with my script, you may need to change the file names in the script though
3. use the “import rss” function from the WordPress manage page, and you are done.
Post a Comment
You could use <code type="name"> to get your code colorized