1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-11 15:33:17 +00:00

make it an option

This commit is contained in:
Alex Xu
2026-07-10 18:32:44 -07:00
parent 3c66aa9a67
commit 11be0dffcc
5 changed files with 1602 additions and 1575 deletions
+1
View File
@@ -293,6 +293,7 @@ OUTPUT SETTINGS:
-t TITLE, --title TITLE -t TITLE, --title TITLE
Comic title [Default=filename or directory name] Comic title [Default=filename or directory name]
--metadatatitle Write title using ComicInfo.xml or other embedded metadata. 0: Don't use Title from metadata 1: Combine Title with default schema 2: Use Title only [Default=0] --metadatatitle Write title using ComicInfo.xml or other embedded metadata. 0: Don't use Title from metadata 1: Combine Title with default schema 2: Use Title only [Default=0]
--keepcomicinfo Keep any original ComicInfo.xml files [Default=0]
-a AUTHOR, --author AUTHOR -a AUTHOR, --author AUTHOR
Author name [Default=KCC] Author name [Default=KCC]
--language EPUB language [Default=en-US] --language EPUB language [Default=en-US]
+916 -904
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -346,6 +346,8 @@ class WorkerThread(QThread):
options.metadatatitle = 1 options.metadatatitle = 1
elif GUI.metadataTitleBox.checkState() == Qt.CheckState.Checked: elif GUI.metadataTitleBox.checkState() == Qt.CheckState.Checked:
options.metadatatitle = 2 options.metadatatitle = 2
if GUI.keepComicInfoBox.isChecked():
options.keepcomicinfo = True
if GUI.deleteBox.isChecked(): if GUI.deleteBox.isChecked():
options.delete = True options.delete = True
if GUI.tempDirBox.isChecked(): if GUI.tempDirBox.isChecked():
@@ -1112,6 +1114,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
'smartCoverCropBox': GUI.smartCoverCropBox.checkState(), 'smartCoverCropBox': GUI.smartCoverCropBox.checkState(),
'coverFillBox': GUI.coverFillBox.checkState(), 'coverFillBox': GUI.coverFillBox.checkState(),
'metadataTitleBox': GUI.metadataTitleBox.checkState(), 'metadataTitleBox': GUI.metadataTitleBox.checkState(),
'keepComicInfoBox': GUI.keepComicInfoBox.checkState(),
'mozJpegBox': GUI.mozJpegBox.checkState(), 'mozJpegBox': GUI.mozJpegBox.checkState(),
'forcePngRgbBox': GUI.forcePngRgbBox.checkState(), 'forcePngRgbBox': GUI.forcePngRgbBox.checkState(),
'webpBox': GUI.webpBox.checkState(), 'webpBox': GUI.webpBox.checkState(),
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1160,8 +1160,8 @@ def getMetadata(path, originalpath):
options.summary = xml.data['Summary'] options.summary = xml.data['Summary']
if xml.data['Series']: if xml.data['Series']:
options.series = xml.data['Series'] options.series = xml.data['Series']
# ComicInfo.xml in output may break old Kindles and Kobos, keep only for OTHER profile # ComicInfo.xml in output may break readers like the Kobo native CBZ reader
if options.isOther and options.format == 'CBZ': if options.keepcomicinfo and options.format == 'CBZ':
with open(xmlPath, 'rb') as f: with open(xmlPath, 'rb') as f:
options.comicinfo_xml = f.read() options.comicinfo_xml = f.read()
os.remove(xmlPath) os.remove(xmlPath)
@@ -1480,6 +1480,8 @@ def makeParser():
output_options.add_argument("--metadatatitle", type=int, dest="metadatatitle", default=0, output_options.add_argument("--metadatatitle", type=int, dest="metadatatitle", default=0,
help="Write title using ComicInfo.xml or other embedded metadata. 1: Combine Title with default schema " help="Write title using ComicInfo.xml or other embedded metadata. 1: Combine Title with default schema "
"2: Use Title only") "2: Use Title only")
output_options.add_argument("--keepcomicinfo", type=int, dest="keepcomicinfo", default=0,
help="Keep any original ComicInfo.xml files")
output_options.add_argument("-a", "--author", action="store", dest="author", default="defaultauthor", output_options.add_argument("-a", "--author", action="store", dest="author", default="defaultauthor",
help="Author name [Default=KCC]") help="Author name [Default=KCC]")
output_options.add_argument("--language", action="store", dest="language", default="en-US", output_options.add_argument("--language", action="store", dest="language", default="en-US",
@@ -1590,8 +1592,6 @@ def checkOptions(options):
options.iskindle = True options.iskindle = True
else: else:
options.isKobo = True options.isKobo = True
# remember before custom width/height overrides profile to 'Custom'
options.isOther = options.profile == 'OTHER'
if options.lightnovel: if options.lightnovel:
options.noKepub = True options.noKepub = True