1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-15 10:46:40 +00:00

Fixed splitCount global

This commit is contained in:
Paweł Jastrzębski
2013-03-08 17:05:17 +01:00
parent 81509012b4
commit b6fa993c17

View File

@@ -266,9 +266,7 @@ def applyImgOptimization(img, isSplit=False, toRight=False):
def dirImgProcess(path): def dirImgProcess(path):
global options global options, splitCount
global splitCount
splitCount = 0
if options.righttoleft: if options.righttoleft:
facing = "right" facing = "right"
else: else:
@@ -428,7 +426,7 @@ def Usage():
def main(argv=None): def main(argv=None):
global parser, options, epub_path global parser, options, epub_path, splitCount
usage = "Usage: %prog [options] comic_file|comic_folder" usage = "Usage: %prog [options] comic_file|comic_folder"
parser = OptionParser(usage=usage, version=__version__) parser = OptionParser(usage=usage, version=__version__)
parser.add_option("-p", "--profile", action="store", dest="profile", default="KHD", parser.add_option("-p", "--profile", action="store", dest="profile", default="KHD",
@@ -467,6 +465,7 @@ def main(argv=None):
path = getWorkFolder(args[0]) path = getWorkFolder(args[0])
if options.title == 'defaulttitle': if options.title == 'defaulttitle':
options.title = os.path.splitext(os.path.basename(args[0]))[0] options.title = os.path.splitext(os.path.basename(args[0]))[0]
splitCount = 0
if options.imgproc: if options.imgproc:
print "Processing images..." print "Processing images..."
dirImgProcess(path + "/OEBPS/Images/") dirImgProcess(path + "/OEBPS/Images/")