diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 15322d2..659428e 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -25,6 +25,7 @@ __docformat__ = 'restructuredtext en' import os import sys +from glob import glob from json import loads from urllib.request import Request, urlopen from re import split, sub, compile @@ -57,10 +58,17 @@ def main(argv=None): parser = makeParser() options, args = parser.parse_args(argv) checkOptions() - if len(args) != 1: + if len(args) == 0: parser.print_help() return - outputPath = makeBook(args[0]) + sources = [source for arg in args for source in glob(arg)] + if len(sources) == 0: + print('No matching files found.') + return + for source in sources: + if len(sources) > 1: + print('\nWorking on {}...'.format(source)) + outputPath = makeBook(source) return outputPath @@ -1257,4 +1265,4 @@ def makeMOBI(work, qtGUI=None): makeMOBIWorkerPool.apply_async(func=makeMOBIWorker, args=(i, ), callback=makeMOBIWorkerTick) makeMOBIWorkerPool.close() makeMOBIWorkerPool.join() - return makeMOBIWorkerOutput \ No newline at end of file + return makeMOBIWorkerOutput