diff --git a/doku.php b/doku.php index 41ae830..7e360b9 100755 --- a/doku.php +++ b/doku.php @@ -17,12 +17,17 @@ require_once DOKU_INC.'inc/init.php'; require_once DOKU_INC.'inc/common.php'; require_once DOKU_INC.'inc/cliopts.php'; +function strip_datadir($fn) { + global $conf; + return end(explode($conf['datadir'].'/', $fn, 2)); +} + switch ($argv[1]) { case 'cleanID': echo cleanID($argv[2]); break; -case 'wikiFn': - echo wikiFn($argv[2]); +case 'wikiFN': + echo strip_datadir(wikiFN($argv[2])); break; case 'mediaFn': echo mediaFn($argv[2]); diff --git a/moin2doku.py b/moin2doku.py index 4e3fb59..98d20b6 100755 --- a/moin2doku.py +++ b/moin2doku.py @@ -217,7 +217,7 @@ def convertfile(pagedir, overwrite = False): content = readfile(curr_rev) content = convert_markup(pagename, content) - out_file = dw.wikiFn(pagename) + out_file = os.path.join(output_dir, dw.wikiFN(pagename)) print "dokuname: [%s]" % out_file writefile(out_file, content, overwrite = overwrite)