X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mDoc.git/blobdiff_plain/270e19761fd3ad528231eabab63723d1a50468bc..b1996998a4d079eb7d6cffadda9dce4cbd78ba73:/python/mDoc/mdoc_extract.py diff --git a/python/mDoc/mdoc_extract.py b/python/mDoc/mdoc_extract.py index 6226d79..32a529e 100755 --- a/python/mDoc/mdoc_extract.py +++ b/python/mDoc/mdoc_extract.py @@ -8,17 +8,20 @@ import sys from mdoc import extractor import re -usage = 'mdoc-extract ' +usage = 'mdoc-extract [target]' def command_dispatch(args): # check runtime parameters if len(args) < 2: - raise RuntimeError("mdoc-extract needs 2 arguments.") + raise RuntimeError("mdoc-extract needs 2/3 arguments.") file = args[0] classs = args[1] - target = re.sub(r'\..*', '.tex', file) + if len(args) == 3: + target = args[2] + else: + target = re.sub(r'\..*', '.tex', file) return extractor.extract(file, classs, target)