From: https://www.google.com/accounts/o8/id?id=AItOawnST62ryzCi8-Zye_-2fjr2IOULgraoI9o Date: Sun, 15 May 2011 23:32:49 +0000 (-0400) Subject: (no commit message) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6df072c66bbca90b2bc23999027e2dc6f6c3d8eb;p=ikiwiki.git --- diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 7a34ffc15..607560cba 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -144,7 +144,12 @@ into an ikiwiki tag name using a script such as sys.stdout.write(re.sub(pattern, manglecat, line)) else: sys.stdout.write(line) -## Step 4: Mediawiki plugin +## Step 4: Mediawiki plugin or Converting to Markdown + +You can use a plugin to make ikiwiki support Mediawiki syntax, or you can +convert pages to a format ikiwiki understands. + +### Step 4a: Mediawiki plugin The [[plugins/contrib/mediawiki]] plugin can be used by ikiwiki to interpret most of the Mediawiki syntax. @@ -155,12 +160,29 @@ The following things are not working: * tables * spaces and other funky characters ("?") in page names +### Step 4b: Converting pages + +#### Converting to Markdown + +There is a Python script for converting from the Mediawiki format to Markdown in [[mithro]]'s conversion repository at . *WARNING:* While the script tries to preserve everything is can, Markdown syntax is not as flexible as Mediawiki so the conversion is lossy! + + # The script needs the mwlib library to work + # If you don't have easy_install installed, apt-get install python-setuptools + sudo easy_install mwlib + + # Get the repository + git clone git://github.com/mithro/media2iki.git + cd media2iki + + # Do a conversion + python mediawiki2markdown.py --no-strict --no-debugger > output.md + + +[[mithro]] doesn't frequent this page, so please report issues on the [github issue tracker](https://github.com/mithro/media2iki/issues). + ## Scripts -[[sabr]] used to explain how to [import MediaWiki content into -git](http://u32.net/Mediawiki_Conversion/index.html?updated), including full -edit history, but as of 2009/10/16 that site is not available. A copy of the -information found on this website is stored at . +There is a repository of tools for converting MediaWiki to Git based Markdown wiki formats (such as ikiwiki and github wikis) at . It also includes a standalone tool for converting from the Mediawiki format to Markdown. [[mithro]] doesn't frequent this page, so please report issues on the [github issue tracker](https://github.com/mithro/media2iki/issues). [[Albert]] wrote a ruby script to convert from mediawiki's database to ikiwiki at