aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://ailin.devio.us/.id/ <Nei@web>2013-09-24 05:32:11 -0400
committeradmin <admin@branchable.com>2013-09-24 05:32:11 -0400
commit6376709e588a4a68ce90db60f6277db3b9d3fc6a (patch)
treecf182bfeb523fa978924e2d396152a5e13e3f5f7
parent19c1d2c3cd33ccdb1986c4bfbca81c04e059fcc7 (diff)
downloadikiwiki-6376709e588a4a68ce90db60f6277db3b9d3fc6a.tar
ikiwiki-6376709e588a4a68ce90db60f6277db3b9d3fc6a.tar.gz
-rw-r--r--doc/tips/Movable_Type_to_ikiwiki.mdwn37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/tips/Movable_Type_to_ikiwiki.mdwn b/doc/tips/Movable_Type_to_ikiwiki.mdwn
new file mode 100644
index 000000000..28fdc6a5e
--- /dev/null
+++ b/doc/tips/Movable_Type_to_ikiwiki.mdwn
@@ -0,0 +1,37 @@
+this script can be used to convert your existing Movable Type blog/database to a ikiwiki blog.
+
+First, go to your MT Admin panel and purge all spam comments/trackbacks. Then use this script: <http://anti.teamidiot.de/static/nei/*/Code/MovableType/mtdump_to_iki.pl>
+
+If you wrote your posts with markdown already you're pretty much ikiwiki compatible :-)
+
+ DATABASE_NAME=your_mt_database
+ DATABASE_USER=your_mysql_user
+
+ mkdir -p conv/posts
+
+ mysqldump $DATABASE_NAME -v -nt --compatible=ansi,postgresql \\
+ --complete-insert=TRUE --extended-insert=FALSE --compact \\
+ --default-character-set=UTF8 -u $DATABASE_USER \\
+ | perl mtdump_to_iki.pl
+
+the script will spit out one file for every post into the conv/posts directory. you can manually clean them up or however you like. next, you must set the output directory where your ikiwiki resides:
+
+ export OUT=$HOME/my_ikiwiki_blog
+
+make sure there is a 'posts' subdirectory inside (default if you start with the blog-setup script)
+
+now you can import one or all posts and comments by running the post file through zsh:
+
+ zsh ./1__my_first_post.mdwn
+
+or to do it all:
+
+ zsh
+ for import (<->__*.*) { zsh $import }
+
+the files will be created in your $OUT directory and committed onto git. now the **important** last step: run
+
+ ikiwiki --gettime --setup your.setup
+
+only with the gettime flag will ikiwiki reread the file dates as recorded in the git. Enjoy!
+