[email protected] ~/archive2011/convert-comments-exported-disqus-wxr/

date

Fri Nov 11 10:57:50 PST 2011

whoami

jmhobbs

ls

comments content tags

wc content

160

cat content

When I moved the Python code from my other site (http://www.thehobbsfamily.net) to this site, I wanted to move the comments from those posts over too. I’m using Disqus for the comments on the site and the comment migration tool Disqus provides didn’t seem to work for me. The only way I could think of migrating those comments over was to export them from the other site then import them into this site. Problem is, Disqus only exports to an XML format that isn’t used anywhere else; Disqus doesn’t even support importing their own XML format!

To get around this limitation, I had to convert the Disqus XML into the generic WXR format created by Wordpress (since Disqus DOES support importing that format). I couldn’t find anything online that would convert between those two formats so I wrote a utility to do it myself.

This script requires unidecode. Here it is:

disqus_to_wxr.py

cat tags

disqus wxr xml

cat comments

Comments powered by Disqus