1
0
mirror of https://github.com/ciromattia/kcc synced 2026-02-01 18:07:41 +00:00

add --nosplitrotate option (is the name right?)

This commit is contained in:
Frédéric Devernay
2013-03-05 17:58:24 +01:00
parent 751e6eb4e7
commit 5d3b7e83f5
2 changed files with 10 additions and 1 deletions

View File

@@ -277,7 +277,10 @@ def dirImgProcess(path):
else:
print ".",
img = image.ComicPage(os.path.join(dirpath, afile), options.profile)
split = img.splitPage(dirpath, options.righttoleft, options.rotate)
if options.nosplitrotate:
split = None
else:
split = img.splitPage(dirpath, options.righttoleft, options.rotate)
if split is not None:
if options.verbose:
print "Splitted " + afile
@@ -407,6 +410,8 @@ def main(argv=None):
+ "is not like the device's one [default=False]")
parser.add_option("--no-cut-page-numbers", action="store_false", dest="cutpagenumbers", default=True,
help="Do not try to cut page numbering on images [default=True]")
parser.add_option("--nosplitrotate", action="store_true", dest="nosplitrotate", default=False,
help="Disable splitting and rotation [default=False]")
parser.add_option("--rotate", action="store_true", dest="rotate", default=False,
help="Rotate landscape pages instead of splitting them [default=False]")
parser.add_option("-o", "--output", action="store", dest="output", default=None,

View File

@@ -89,6 +89,7 @@ class MainWindow:
self.options = {
'epub_only': IntVar(None, 0),
'image_preprocess': IntVar(None, 1),
'nosplitrotate': IntVar(None, 0),
'rotate': IntVar(None, 0),
'cut_page_numbers': IntVar(None, 1),
'mangastyle': IntVar(None, 0),
@@ -100,6 +101,7 @@ class MainWindow:
self.optionlabels = {
'epub_only': "Generate ePub only (does not call 'kindlegen')",
'image_preprocess': "Apply image optimizations",
'nosplitrotate': "Disable splitting and rotation",
'rotate': "Rotate landscape images instead of splitting them",
'cut_page_numbers': "Cut page numbers",
'mangastyle': "Manga-style (right-to-left reading, applies to reading and splitting)",
@@ -140,6 +142,8 @@ class MainWindow:
argv = ["-p", profilekey]
if self.options['image_preprocess'].get() == 0:
argv.append("--no-image-processing")
if self.options['nosplitrotate'].get() == 1:
argv.append("--nosplitrotate")
if self.options['rotate'].get() == 1:
argv.append("--rotate")
if self.options['cut_page_numbers'].get() == 0: