1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +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):
global options
global splitCount
splitCount = 0
global options, splitCount
if options.righttoleft:
facing = "right"
else:
@@ -428,7 +426,7 @@ def Usage():
def main(argv=None):
global parser, options, epub_path
global parser, options, epub_path, splitCount
usage = "Usage: %prog [options] comic_file|comic_folder"
parser = OptionParser(usage=usage, version=__version__)
parser.add_option("-p", "--profile", action="store", dest="profile", default="KHD",
@@ -467,6 +465,7 @@ def main(argv=None):
path = getWorkFolder(args[0])
if options.title == 'defaulttitle':
options.title = os.path.splitext(os.path.basename(args[0]))[0]
splitCount = 0
if options.imgproc:
print "Processing images..."
dirImgProcess(path + "/OEBPS/Images/")