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:
@@ -293,6 +293,7 @@ OUTPUT SETTINGS:
|
||||
-t TITLE, --title TITLE
|
||||
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]
|
||||
--keepcomicinfo Keep any original ComicInfo.xml files [Default=0]
|
||||
-a AUTHOR, --author AUTHOR
|
||||
Author name [Default=KCC]
|
||||
--language EPUB language [Default=en-US]
|
||||
|
||||
+916
-904
File diff suppressed because it is too large
Load Diff
@@ -346,6 +346,8 @@ class WorkerThread(QThread):
|
||||
options.metadatatitle = 1
|
||||
elif GUI.metadataTitleBox.checkState() == Qt.CheckState.Checked:
|
||||
options.metadatatitle = 2
|
||||
if GUI.keepComicInfoBox.isChecked():
|
||||
options.keepcomicinfo = True
|
||||
if GUI.deleteBox.isChecked():
|
||||
options.delete = True
|
||||
if GUI.tempDirBox.isChecked():
|
||||
@@ -1112,6 +1114,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
||||
'smartCoverCropBox': GUI.smartCoverCropBox.checkState(),
|
||||
'coverFillBox': GUI.coverFillBox.checkState(),
|
||||
'metadataTitleBox': GUI.metadataTitleBox.checkState(),
|
||||
'keepComicInfoBox': GUI.keepComicInfoBox.checkState(),
|
||||
'mozJpegBox': GUI.mozJpegBox.checkState(),
|
||||
'forcePngRgbBox': GUI.forcePngRgbBox.checkState(),
|
||||
'webpBox': GUI.webpBox.checkState(),
|
||||
|
||||
+678
-667
File diff suppressed because it is too large
Load Diff
@@ -1160,8 +1160,8 @@ def getMetadata(path, originalpath):
|
||||
options.summary = xml.data['Summary']
|
||||
if xml.data['Series']:
|
||||
options.series = xml.data['Series']
|
||||
# ComicInfo.xml in output may break old Kindles and Kobos, keep only for OTHER profile
|
||||
if options.isOther and options.format == 'CBZ':
|
||||
# ComicInfo.xml in output may break readers like the Kobo native CBZ reader
|
||||
if options.keepcomicinfo and options.format == 'CBZ':
|
||||
with open(xmlPath, 'rb') as f:
|
||||
options.comicinfo_xml = f.read()
|
||||
os.remove(xmlPath)
|
||||
@@ -1480,6 +1480,8 @@ def makeParser():
|
||||
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 "
|
||||
"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",
|
||||
help="Author name [Default=KCC]")
|
||||
output_options.add_argument("--language", action="store", dest="language", default="en-US",
|
||||
@@ -1590,8 +1592,6 @@ def checkOptions(options):
|
||||
options.iskindle = True
|
||||
else:
|
||||
options.isKobo = True
|
||||
# remember before custom width/height overrides profile to 'Custom'
|
||||
options.isOther = options.profile == 'OTHER'
|
||||
|
||||
if options.lightnovel:
|
||||
options.noKepub = True
|
||||
|
||||
Reference in New Issue
Block a user