jmhobbs@pyhacker /posts/convert-comments-exported-disqus-wxr

date
2011-11-11T10:57:50.000Z

whoami
jmhobbs

ls
comments content tags

wc content
151

cat content

Convert comments exported from Disqus to WXR

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

wc tags
disqus   wxr   xml  

cat comments