Fix asciidoc2html with --all
This commit is contained in:
parent
4829aee767
commit
1d8a8b57c7
@ -78,7 +78,14 @@ def main(colors=False):
|
|||||||
pass
|
pass
|
||||||
if args.all:
|
if args.all:
|
||||||
for src in glob.glob('**/*.asciidoc') + glob.glob('*.asciidoc'):
|
for src in glob.glob('**/*.asciidoc') + glob.glob('*.asciidoc'):
|
||||||
dst = os.path.join(args.all[0], os.path.relpath(src))
|
parts = [args.all[0]]
|
||||||
|
dirname = os.path.dirname(src)
|
||||||
|
if dirname:
|
||||||
|
parts.append(os.path.relpath(os.path.dirname(src)))
|
||||||
|
parts.append(
|
||||||
|
os.extsep.join((os.path.splitext(os.path.basename(src))[0],
|
||||||
|
'html')))
|
||||||
|
dst = os.path.join(*parts)
|
||||||
os.makedirs(os.path.dirname(dst), exist_ok=True)
|
os.makedirs(os.path.dirname(dst), exist_ok=True)
|
||||||
call_asciidoc(src, dst)
|
call_asciidoc(src, dst)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user