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{#p74}

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

Comments

Comment by Grischa on 2007-09-04 10:03:33 +0000

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!

Comment by Bjørn on 2007-09-06 08:55:32 +0000

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

Comment by Kristin on 2007-10-15 03:23:09 +0000

Thanks!

Comment by Matt Velker on 2007-10-22 06:27:14 +0000

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!

Comment by Bjørn on 2007-10-22 19:52:17 +0000

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

Comment by Samuel A. Falvo II on 2009-03-23 00:38:40 +0000

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?

Comment by J.D. on 2009-05-10 20:46:59 +0000

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!

Comment by Stefan K on 2011-02-02 14:06:01 +0000

Hi, is there a Way to add sqlite Support? All solutions to export s9y are based on mysql…

Comment by Bjørn Børresen on 2011-02-02 14:08:57 +0000

Hi, sorry I don’t have any info on what you’d need to do do get sqllite supported ..

Comment by o2i on 2011-11-29 09:47:48 +0000

Hi, Script was good but i am having problem with comments and tags. How to do with this……..

Thanks in advance.

Comment by stefan on 2011-12-05 22:00:28 +0000

I get “Warning: fopen(s9y_export_mt.txt) [function.fopen]: failed to open stream: Permission denied in…” :(