4 September 2007 7 Comments

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 :-)

7 Responses to “Exporting s9y to MT”

  1. Grischa 4 September 2007 at 10:03 #

    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. Bjørn 6 September 2007 at 08:55 #

    Well, your favourite blogsystem just got better with an easy-exit-option ;-)

  3. Kristin 15 October 2007 at 03:23 #

    Thanks!

  4. Matt Velker 22 October 2007 at 06:27 #

    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!

  5. Bjørn 22 October 2007 at 19:52 #

    hehe .. glad to help Matt :-) .. inheriting a messy system is never fun.

  6. Samuel A. Falvo II 23 March 2009 at 00:38 #

    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?

  7. J.D. 10 May 2009 at 20:46 #

    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