1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

Removed redundant output

This commit is contained in:
Paweł Jastrzębski
2014-01-27 20:51:13 +01:00
parent 63d752280a
commit 27e5cc3b00
3 changed files with 4 additions and 12 deletions

View File

@@ -105,7 +105,6 @@ Options:
Replace screen height provided by device profile
OTHER:
-v, --verbose Verbose output
-h, --help Show this help message and exit
```

View File

@@ -371,10 +371,6 @@ def fileImgProcess(work):
dirpath = work[1]
opt = work[2]
output = []
if opt.verbose:
print("Optimizing " + afile + " for " + opt.profile)
else:
print(".", end=' ')
img = image.ComicPage(os.path.join(dirpath, afile), opt.profileData)
if opt.quality == 2:
wipe = False
@@ -385,8 +381,6 @@ def fileImgProcess(work):
else:
splitter = img.splitPage(dirpath, opt.righttoleft, opt.rotate)
if splitter is not None:
if opt.verbose:
print("Splitted " + afile)
img0 = image.ComicPage(splitter[0], opt.profileData)
applyImgOptimization(img0, opt)
output.append(img0.saveToDir(dirpath, opt.forcepng, opt.forcecolor))
@@ -933,8 +927,6 @@ def main(argv=None, qtGUI=None):
help="Replace screen width provided by device profile")
customProfileOptions.add_option("--customheight", type="int", dest="customheight", default=0,
help="Replace screen height provided by device profile")
otherOptions.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False,
help="Verbose output")
otherOptions.add_option("-h", "--help", action="help",
help="Show this help message and exit")
parser.add_option_group(mainOptions)
@@ -953,6 +945,7 @@ def main(argv=None, qtGUI=None):
parser.print_help()
return
path = getWorkFolder(args[0])
print("\nChecking images...")
detectCorruption(path + "/OEBPS/Images/", args[0])
checkComicInfo(path + "/OEBPS/Images/", args[0])
if options.webtoon:

View File

@@ -123,7 +123,6 @@ def splitImage(work):
# Harcoded opttions
threshold = 1.0
delta = 15
print(".", end=' ')
fileExpanded = os.path.splitext(name)
filePath = os.path.join(path, name)
image = Image.open(filePath)
@@ -236,15 +235,15 @@ def main(argv=None, qtGUI=None):
if options.height > 0:
options.sourceDir = args[0]
options.targetDir = args[0] + "-Splitted"
print("\nSplitting images...")
if os.path.isdir(options.sourceDir):
rmtree(options.targetDir, True)
copytree(options.sourceDir, options.targetDir)
work = []
pagenumber = 0
pagenumber = 1
splitWorkerOutput = []
splitWorkerPool = Pool()
if options.merge:
print("\nMerging images...")
directoryNumer = 1
mergeWork = []
mergeWorkerOutput = []
@@ -267,6 +266,7 @@ def main(argv=None, qtGUI=None):
if len(mergeWorkerOutput) > 0:
rmtree(options.targetDir, True)
raise RuntimeError("One of workers crashed. Cause: " + mergeWorkerOutput[0])
print("\nSplitting images...")
for root, dirs, files in os.walk(options.targetDir, False):
for name in files:
if getImageFileName(name) is not None: