From 182a292f70c55f9e52d1c1d4e95a9707498e8409 Mon Sep 17 00:00:00 2001 From: rourien <32525257+rourien@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:00:35 -0600 Subject: [PATCH] Merge 0c152cf targetsize option --- kindlecomicconverter/comic2ebook.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 1069d05..9af07cf 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -789,7 +789,9 @@ def splitProcess(path, mode): output = [] currentSize = 0 currentTarget = path - if options.webtoon: + if options.targetsize: + targetSize = options.targetsize * 1048576 + elif options.webtoon: targetSize = 104857600 else: targetSize = 419430400 @@ -920,6 +922,9 @@ def makeParser(): help="Display two not four panels in Panel View mode") mainOptions.add_option("-w", "--webtoon", action="store_true", dest="webtoon", default=False, help="Webtoon processing mode"), + mainOptions.add_option("--targetsize", type="int", dest="targetsize", default=None, + help="the maximal size of output file in MB." + " [Default=100MB for webtoon and 400MB for others]") outputOptions.add_option("-o", "--output", action="store", dest="output", default=None, help="Output generated file to specified directory or file")