From 5dced004253c1d8da48ec27b2de7ad51438da382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 22 Sep 2012 19:23:47 +0300 Subject: [PATCH] update docs, set version --- README | 17 +++++++++++------ doku.php | 1 + doku.py | 1 + moin2doku.py | 1 + moinformat.py | 8 ++++++++ 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/README b/README index 176757a..4f9323d 100644 --- a/README +++ b/README @@ -8,23 +8,25 @@ A script for converting MoinMoin version 1.3+ wiki data to DokuWiki format. Call with the name of the directory containing the MoinMoin pages and that of the directory to receive the DokuWiki pages on the command line. +Tested with MoinMoin 1.5 and DokuWiki 2012-09-10 releases + You need to run this on host where MoinMoin is configured and DokuWiki is configured, it will use current configuration from both wikis. Edit doku.php if your DokuWiki installation is other than /usr/share/dokuwiki -$ ./moin2doku.py ./moin/data/pages/ +To convert moinmoin all pages with history, invoke: +$ ./moin2doku.py -a -d /var/lib/dokuwiki + +To convert single page (FrontPage): +$ ./moin2doku.py -F moinmoin/data/pages/FrontPage -d out after conversion be sure to fix ownership (www-data:www-data being your uid/gid webserver runs): # chown -R www-data:www-data /var/lib/dokuwiki/pages/* # chown -R www-data:www-data /var/lib/dokuwiki/media/* -This script doesn't do all the work, and some of the work it does is -wrong. For instance attachment links end up with the trailing "|}}" -on the line following the link. This works, but doesn't look good. -The script interprets a "/" in a pagename as a namespace delimiter and -creates and fills namespace subdirectories accordingly. +also, depending on your configuration, you may need to gzip the attic pages. History: version 0.1 2010-02 Slim Gaillard, based on the "extended python" @@ -32,3 +34,6 @@ version 0.1 2010-02 Slim Gaillard, based on the "extended python" http://www.dokuwiki.org/tips:moinmoin2doku version 0.2 2011 Elan Ruusamäe, moved to github, track history there https://github.com/glensc/moin2doku +version 1.0 2012 Complete moinmoin to dokuiki converter, uses native + moinmoin code to handle converting and translating paths. + Converts also page history and edit-log. diff --git a/doku.php b/doku.php index a34b942..1df4f48 100755 --- a/doku.php +++ b/doku.php @@ -7,6 +7,7 @@ # See README for details. # # Author: Elan Ruusamäe +# Version: 1.0 # # You should probably adjust path to DOKU_INC. diff --git a/doku.py b/doku.py index a74cfc1..ad94aa9 100644 --- a/doku.py +++ b/doku.py @@ -6,6 +6,7 @@ # See README for details. # # Author: Elan Ruusamäe +# Version: 1.0 import sys import subprocess diff --git a/moin2doku.py b/moin2doku.py index 7c8b4bd..edacd57 100755 --- a/moin2doku.py +++ b/moin2doku.py @@ -6,6 +6,7 @@ # See README for details. # # Author: Elan Ruusamäe +# Version: 1.0 import sys, os, os.path, re, codecs import getopt diff --git a/moinformat.py b/moinformat.py index 9935084..91e82fa 100755 --- a/moinformat.py +++ b/moinformat.py @@ -1,5 +1,13 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Setup VIM: ex: noet ts=2 sw=2 : +# +# Module for doing DokuWiki output conversion. +# See README for details. +# +# Author: Elan Ruusamäe +# Version: 1.0 + from MoinMoin import wikimacro, wikiutil from MoinMoin.Page import Page from MoinMoin.parser.wiki import Parser