Exporting s9y to MT

When I wanted the skitX blog converted from Serendipity to ExpressionEngine I asked around for an MT Export script for s9y. There was none, so I decided to create it for myself.

For those of you who don’t know, MT stands for Movable Type and is SixApart‘s blogsystem. It’s a pretty simple plain-text format which many blogsystems (like for instance EE) can do an import from. I used the format description found here.

Download the script here: Serendipity (s9y) MT Export

The process is simple — just edit the following lines in the script:

$db_host = "localhost"; $db_user = "db_user"; $db_pass = "db_password"; $db_name = "db_name";

$filename = "s9y_export_mt.txt"; // file to write to

Upload the script and load it in your browser. A file (s9y_export_mt.txt by default) will be written. This is the file you import.

Enjoy, and ask in the comment section if something is unclear :-)

11 Comments
  1. Very cool! Didn’t test it, as I don’t want to change away from Serendipity, what is my favorite blog system, but it is good to have this. :-) Thanks!

  2. Thanks for doing this, Bjorn! I inherited an extremely messy set-up of Serendipity when I joined a university publication, and I am actively trying to move to a more professional publishing tool. Assuming I can figure out how to make this work (the previous web administrator left almost no documentation of how he set up the website), you will be my savior!

  3. I’m receiving an error in your code:

    [Sun Mar 22 17:26:37 2009] [error] [client 76.126.221.102] PHP Fatal error: Call to undefined function mysql_connect() in /usr/home/falvotech/websites/falvotech.com/htdocs/blog/s9y_mt_export.php on line 26

    Remembering that I installed it with PostgreSQL, I modified your script to invoke the relevant pg_* functions instead. The code runs fine, HOWEVER, the resulting output text file is zero-bytes in length!

    Help?

  4. Whew! I spent hours trying to cobble together something based on other links I found, and was about to give up and copy & paste by hand when I stumbled across this page. It worked! So easy!

Leave a Reply to Matt Velker Cancel reply