respect output directory
This commit is contained in:
parent
f55d6c2799
commit
0537d952b2
2 changed files with 8 additions and 3 deletions
9
doku.php
9
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/common.php';
|
||||||
require_once DOKU_INC.'inc/cliopts.php';
|
require_once DOKU_INC.'inc/cliopts.php';
|
||||||
|
|
||||||
|
function strip_datadir($fn) {
|
||||||
|
global $conf;
|
||||||
|
return end(explode($conf['datadir'].'/', $fn, 2));
|
||||||
|
}
|
||||||
|
|
||||||
switch ($argv[1]) {
|
switch ($argv[1]) {
|
||||||
case 'cleanID':
|
case 'cleanID':
|
||||||
echo cleanID($argv[2]);
|
echo cleanID($argv[2]);
|
||||||
break;
|
break;
|
||||||
case 'wikiFn':
|
case 'wikiFN':
|
||||||
echo wikiFn($argv[2]);
|
echo strip_datadir(wikiFN($argv[2]));
|
||||||
break;
|
break;
|
||||||
case 'mediaFn':
|
case 'mediaFn':
|
||||||
echo mediaFn($argv[2]);
|
echo mediaFn($argv[2]);
|
||||||
|
|
|
@ -217,7 +217,7 @@ def convertfile(pagedir, overwrite = False):
|
||||||
|
|
||||||
content = readfile(curr_rev)
|
content = readfile(curr_rev)
|
||||||
content = convert_markup(pagename, content)
|
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
|
print "dokuname: [%s]" % out_file
|
||||||
writefile(out_file, content, overwrite = overwrite)
|
writefile(out_file, content, overwrite = overwrite)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue