1
0
mirror of https://github.com/ciromattia/kcc synced 2026-01-31 09:27:45 +00:00

Merge branch 'multifile' of git://github.com/theaquamarine/kcc into 4.x

This commit is contained in:
Paweł Jastrzębski
2014-10-29 07:14:39 +01:00

View File

@@ -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
return makeMOBIWorkerOutput