<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Movable Type to ikiwiki</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="../style.css" type="text/css" /> <link rel="stylesheet" href="../local.css" type="text/css" /> </head> <body> <div class="page"> <div class="pageheader"> <div class="header"> <span> <span class="parentlinks"> <a href="../index.html">ikiwiki</a>/ <a href="../tips.html">tips</a>/ </span> <span class="title"> Movable Type to ikiwiki </span> </span> </div> </div> <div id="pagebody"> <div id="content" role="main"> <p>this script can be used to convert your existing Movable Type blog/database to a ikiwiki blog.</p> <p>First, go to your MT Admin panel and purge all spam comments/trackbacks. Then use this script: <a href="http://anti.teamidiot.de/static/nei/*/Code/MovableType/mtdump_to_iki.pl">http://anti.teamidiot.de/static/nei/*/Code/MovableType/mtdump_to_iki.pl</a></p> <p>If you wrote your posts with markdown already you're pretty much ikiwiki compatible <img src="../smileys/smile.png" alt=":-)" /></p> <pre><code>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 </code></pre> <p>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:</p> <pre><code>export OUT=$HOME/my_ikiwiki_blog </code></pre> <p>make sure there is a 'posts' subdirectory inside (default if you start with the blog-setup script)</p> <p>now you can import one or all posts and comments by running the post file through zsh:</p> <pre><code>zsh ./1__my_first_post.mdwn </code></pre> <p>or to do it all:</p> <pre><code>zsh for import (<->__*.*) { zsh $import } </code></pre> <p>the files will be created in your $OUT directory and committed onto git. now the <strong>important</strong> last step: run</p> <pre><code>ikiwiki --gettime --setup your.setup </code></pre> <p>only with the gettime flag will ikiwiki reread the file dates as recorded in the git. Enjoy!</p> </div> </div> <div id="footer" class="pagefooter" role="contentinfo"> <div id="pageinfo"> <div id="backlinks"> Links: <a href="../convert.html">convert</a> </div> <div class="pagedate"> Last edited <span class="date">Tue Feb 26 23:01:54 2019</span> <!-- Created <span class="date">Tue Sep 24 09:32:11 2013</span> --> </div> </div> <!-- from ikiwiki --> </div> </div> </body> </html>