Posted
8 December 2008 @ 11pm
Tagged
Meta, Nerd Factor X
Tags
mephisto, wordpress
So given that the world (still) lacks a decent common export format for blog software, you might wonder how I managed to move the collection of assorted nonsense that is girtby.net from Mephisto to Wordpress.
Actually, there’s a real chance you might not wonder this. But let’s press on anyway for the sake of Google and future generations.
All the hard work was actually done by Daniel Dave Murphy over at schwuk.com who published the script and a bzr branch. Jason Morrison added MySQL support and published a diff.
I’ve made some changes of my own and published the results. You can get either:
So what sort of changes did I have to make?
Well, Dave’s script extracted the rendered HTML into the Wordpress database. This is OK but it means you can’t go back and edit old posts in their source form (in my case, Markdown format). So to use my version of the script you need to set up your content filters in Wordpress to match those in Mephisto.
There are a couple of other minor changes, specifically handling NULL as well as empty content (for whatever reason I had some of these fields in my Mephisto database), and a minor formatting problem which prevented the “Read More” links from working properly.
Anyway that’s my version of the script, and now that that’s out of the way I can get back to procrastinating about doing anything with CSS.
Posted by
Dave
9 December 2008 @ 1am
#
Glad you found the script useful. I really must patch in some of the changes others have made.
BTW it’s Dave, not Daniel.
Posted by
alastair
9 December 2008 @ 6am
#
A thousand pardons, how stupid of me.
Is there enough interest to start a launchpad project now?
Posted by
Dave
9 December 2008 @ 6am
#
No problem.
Yeah, why not. I’ll get one set up.
Posted by
Jared
22 January 2009 @ 5am
#
I’m trying run this script, and this is the traceback I was getting:
Traceback (most recent call last):
File "m2wp-mysql.py", line 291, in <module>
exporter.export()
File "m2wp-mysql.py", line 263, in export
output = self.wxr.finalise()
File "m2wp-mysql.py", line 193, in finalise
wxr = self.display()
File "m2wp-mysql.py", line 72, in display
return self.xml.toprettyxml('')
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 57, in toprettyxml
self.writexml(writer, "", indent, newl, encoding)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 1744, in writexml
node.writexml(writer, indent, addindent, newl)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 814, in writexml
node.writexml(writer,indent+addindent,addindent,newl)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 814, in writexml
node.writexml(writer,indent+addindent,addindent,newl)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 814, in writexml
node.writexml(writer,indent+addindent,addindent,newl)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 814, in writexml
node.writexml(writer,indent+addindent,addindent,newl)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 1143, in writexml
raise ValueError("']]>' not allowed in a CDATA section")
ValueError: ']]>' not allowed in a CDATA section
I had some hivelogic enkoder blocks in my posts that were causing this. Took them out and everything was ok.
Hello, I’m Alastair Rankine. I once had a blog, and you've found it. Would you like to know more?
From time to time I made offerings to the internet. Would you like some?
Powered by WordPress using the DePo Clean Theme
4 Comments