From dfca136a2decfedf74a167fece40a83938d1f714 Mon Sep 17 00:00:00 2001 From: darodi <4682830+darodi@users.noreply.github.com> Date: Thu, 2 Mar 2023 17:15:30 +0100 Subject: [PATCH] comic2ebook/func: Add a delete option and function (closes #458) --- README.md | 4 ++++ kindlecomicconverter/comic2ebook.py | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1879063..fd52703 100644 --- a/README.md +++ b/README.md @@ -180,12 +180,16 @@ Options: page numbers [Default=2] --cp=CROPPINGP, --croppingpower=CROPPINGP Set cropping power [Default=1.0] + --cm=CROPPINGM, --croppingminimum=CROPPINGM + Set cropping minimum area ratio [Default=0.0] --blackborders Disable autodetection and force black borders --whiteborders Disable autodetection and force white borders --forcecolor Don't convert images to grayscale --forcepng Create PNG files instead JPEG --mozjpeg Create JPEG files using mozJpeg --maximizestrips Turn 1x4 strips to 2x2 strips + -d, --delete Delete source file(s) or a directory. It's not + recoverable. CUSTOM PROFILE: --customwidth=CUSTOMWIDTH diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 0274e22..2b25596 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -967,8 +967,6 @@ def makeParser(): outputOptions.add_option("-b", "--batchsplit", type="int", dest="batchsplit", default="0", help="Split output into multiple files. 0: Don't split 1: Automatic mode " "2: Consider every subdirectory as separate volume [Default=0]") - outputOptions.add_option("-d", "--delete", action="store_true", dest="delete", default=False, - help="Delete source file(s) or a directory. It's not recoverable.") processingOptions.add_option("-n", "--noprocessing", action="store_true", dest="noprocessing", default=False, help="Do not modify image and ignore any profil or processing option") @@ -998,6 +996,9 @@ def makeParser(): help="Create JPEG files using mozJpeg") processingOptions.add_option("--maximizestrips", action="store_true", dest="maximizestrips", default=False, help="Turn 1x4 strips to 2x2 strips") + processingOptions.add_option("-d", "--delete", action="store_true", dest="delete", default=False, + help="Delete source file(s) or a directory. It's not recoverable.") + customProfileOptions.add_option("--customwidth", type="int", dest="customwidth", default=0, help="Replace screen width provided by device profile") customProfileOptions.add_option("--customheight", type="int", dest="customheight", default=0,