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/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]);
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue