diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 0249a84..1cfdd9a 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -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, diff --git a/kcc/gui.py b/kcc/gui.py index c1156b4..beb44e0 100644 --- a/kcc/gui.py +++ b/kcc/gui.py @@ -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: