mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 09:46:25 +00:00
Added support for Kindle Fire HDX
This commit is contained in:
@@ -69,7 +69,7 @@ Usage: comic2ebook.py [options] comic_file|comic_folder
|
||||
Options:
|
||||
MAIN:
|
||||
-p PROFILE, --profile=PROFILE
|
||||
Device profile (Choose one among K1, K2, K345, KDX, KDXG, KHD, KF, KFHD, KFHD8, KFA) [Default=KHD]
|
||||
Device profile (Choose one among K1, K2, K345, KDX, KDXG, KHD, KF, KFHD, KFHD8, KFHDX, KFHDX8, KFA) [Default=KHD]
|
||||
-q QUALITY, --quality=QUALITY
|
||||
Quality of Panel View. 0 - Normal 1 - High 2 - Ultra [Default=0]
|
||||
-m, --manga-style Manga style (Right-to-left reading and splitting)
|
||||
@@ -141,6 +141,8 @@ The app relies and includes the following scripts/binaries:
|
||||
* [Kindle Fire](http://kcc.vulturis.eu/Samples/Ubunchu!-KF.mobi)
|
||||
* [Kindle Fire HD](http://kcc.vulturis.eu/Samples/Ubunchu!-KFHD.mobi)
|
||||
* [Kindle Fire HD 8.9"](http://kcc.vulturis.eu/Samples/Ubunchu!-KFHD8.mobi)
|
||||
* [Kindle Fire HDX](http://kcc.vulturis.eu/Samples/Ubunchu!-KFHDX.mobi)
|
||||
* [Kindle Fire HDX 8.9"](http://kcc.vulturis.eu/Samples/Ubunchu!-KFHDX8.mobi)
|
||||
* [Kindle DX](http://kcc.vulturis.eu/Samples/Ubunchu!-KDX.mobi)
|
||||
* [Kindle DXG](http://kcc.vulturis.eu/Samples/Ubunchu!-KDXG.mobi)
|
||||
|
||||
@@ -260,6 +262,7 @@ The app relies and includes the following scripts/binaries:
|
||||
* Support for Virtual Panel View was removed
|
||||
* Margin color fill is now autodetected
|
||||
* Added support of 7z/CB7 files
|
||||
* Added Kindle Fire HDX profile
|
||||
* Profiles for Kindle Keyboard, Touch and Non-Touch are now merged
|
||||
* Windows release is now bundled with UnRAR and 7za
|
||||
* Small GUI tweaks
|
||||
|
||||
@@ -250,7 +250,7 @@ class WorkerThread(QtCore.QThread):
|
||||
mobiPath = item.replace('.epub', '.mobi')
|
||||
shutil.move(mobiPath, mobiPath + '_toclean')
|
||||
try:
|
||||
if profile in ['K345', 'KHD', 'KF', 'KFHD', 'KFHD8', 'KFA']:
|
||||
if profile in ['K345', 'KHD', 'KF', 'KFHD', 'KFHD8', 'KFHDX', 'KFHDX8', 'KFA']:
|
||||
newKindle = True
|
||||
else:
|
||||
newKindle = False
|
||||
@@ -469,13 +469,13 @@ class Ui_KCC(object):
|
||||
GUI.RotateBox.setEnabled(True)
|
||||
|
||||
def changeDevice(self, value):
|
||||
if value == 8:
|
||||
if value == 9:
|
||||
GUI.BasicModeButton.setEnabled(False)
|
||||
GUI.AdvModeButton.setEnabled(False)
|
||||
self.addMessage('<a href="https://github.com/ciromattia/kcc/wiki/NonKindle-devices">'
|
||||
'List of supported Non-Kindle devices</a>', 'info')
|
||||
self.modeExpert()
|
||||
elif value == 7:
|
||||
elif value == 8:
|
||||
GUI.BasicModeButton.setEnabled(False)
|
||||
GUI.AdvModeButton.setEnabled(False)
|
||||
self.modeExpert(True)
|
||||
@@ -483,13 +483,13 @@ class Ui_KCC(object):
|
||||
GUI.BasicModeButton.setEnabled(True)
|
||||
GUI.AdvModeButton.setEnabled(True)
|
||||
self.modeBasic()
|
||||
if value in [8, 9, 10, 11, 12]:
|
||||
if value in [9, 11, 12, 13, 14]:
|
||||
GUI.QualityBox.setCheckState(0)
|
||||
GUI.QualityBox.setEnabled(False)
|
||||
else:
|
||||
if not GUI.WebtoonBox.isChecked():
|
||||
GUI.QualityBox.setEnabled(True)
|
||||
if not value in [8]:
|
||||
if value in [3, 4, 5, 6, 8, 15]:
|
||||
GUI.NoDitheringBox.setCheckState(0)
|
||||
GUI.NoDitheringBox.setEnabled(False)
|
||||
else:
|
||||
|
||||
@@ -796,8 +796,8 @@ def main(argv=None, qtGUI=None):
|
||||
customProfileOptions = OptionGroup(parser, "CUSTOM PROFILE")
|
||||
otherOptions = OptionGroup(parser, "OTHER")
|
||||
mainOptions.add_option("-p", "--profile", action="store", dest="profile", default="KHD",
|
||||
help="Device profile (Choose one among K1, K2, K345, KDX, KDXG, KHD, KF, KFHD, KFHD8, KFA)"
|
||||
"[Default=KHD]")
|
||||
help="Device profile (Choose one among K1, K2, K345, KDX, KDXG, KHD, KF, KFHD, KFHD8, KFHDX,"
|
||||
" KFHDX8, KFA) [Default=KHD]")
|
||||
mainOptions.add_option("-q", "--quality", type="int", dest="quality", default="0",
|
||||
help="Quality of Panel View. 0 - Normal 1 - High 2 - Ultra [Default=0]")
|
||||
mainOptions.add_option("-m", "--manga-style", action="store_true", dest="righttoleft", default=False,
|
||||
@@ -935,7 +935,8 @@ def checkOptions():
|
||||
if options.black_borders:
|
||||
options.bordersColor = "black"
|
||||
# Disabling grayscale conversion for Kindle Fire family.
|
||||
if options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8' or options.forcecolor:
|
||||
if options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8' or options.profile == 'KFHDX'\
|
||||
or options.profile == 'KFHDX8' or options.forcecolor:
|
||||
options.forcecolor = True
|
||||
else:
|
||||
options.forcecolor = False
|
||||
|
||||
29
kcc/image.py
29
kcc/image.py
@@ -74,6 +74,9 @@ class ProfileData:
|
||||
0xff, 0xff, 0xff,
|
||||
]
|
||||
|
||||
PalleteNull = [
|
||||
]
|
||||
|
||||
Profiles = {
|
||||
'K1': ("Kindle 1", (600, 800), Palette4, 1.8, (900, 1200)),
|
||||
'K2': ("Kindle 2", (600, 800), Palette15, 1.8, (900, 1200)),
|
||||
@@ -81,10 +84,12 @@ class ProfileData:
|
||||
'KHD': ("Kindle Paperwhite", (758, 1024), Palette16, 1.8, (1137, 1536)),
|
||||
'KDX': ("Kindle DX", (824, 1200), Palette15, 1.8, (1236, 1800)),
|
||||
'KDXG': ("Kindle DXG", (824, 1200), Palette16, 1.8, (1236, 1800)),
|
||||
'KF': ("Kindle Fire", (600, 1024), Palette16, 1.0, (900, 1536)),
|
||||
'KFHD': ("Kindle Fire HD 7\"", (800, 1280), Palette16, 1.0, (1200, 1920)),
|
||||
'KFHD8': ("Kindle Fire HD 8.9\"", (1200, 1920), Palette16, 1.0, (1800, 2880)),
|
||||
'KFA': ("Kindle for Android", (0, 0), Palette16, 1.0, (0, 0)),
|
||||
'KF': ("Kindle Fire", (600, 1024), PalleteNull, 1.0, (900, 1536)),
|
||||
'KFHD': ("K. Fire HD 7\"", (800, 1280), PalleteNull, 1.0, (1200, 1920)),
|
||||
'KFHD8': ("K. Fire HD 8.9\"", (1200, 1920), PalleteNull, 1.0, (1800, 2880)),
|
||||
'KFHDX': ("K. Fire HDX 7\"", (1200, 1920), PalleteNull, 1.0, (1800, 2880)),
|
||||
'KFHDX8': ("K. Fire HDX 8.9\"", (1600, 2560), PalleteNull, 1.0, (2400, 3840)),
|
||||
'KFA': ("Kindle for Android", (0, 0), PalleteNull, 1.0, (0, 0)),
|
||||
'OTHER': ("Other", (0, 0), Palette16, 1.8, (0, 0)),
|
||||
}
|
||||
|
||||
@@ -96,8 +101,10 @@ class ProfileData:
|
||||
"Kindle DX": 'KDX',
|
||||
"Kindle DXG": 'KDXG',
|
||||
"Kindle Fire": 'KF',
|
||||
"Kindle Fire HD 7\"": 'KFHD',
|
||||
"Kindle Fire HD 8.9\"": 'KFHD8',
|
||||
"K. Fire HD 7\"": 'KFHD',
|
||||
"K. Fire HD 8.9\"": 'KFHD8',
|
||||
"K. Fire HDX 7\"": 'KFHDX',
|
||||
"K. Fire HDX 8.9\"": 'KFHDX8',
|
||||
"Kindle for Android": 'KFA',
|
||||
"Other": 'OTHER'
|
||||
}
|
||||
@@ -106,9 +113,10 @@ class ProfileData:
|
||||
"Kindle Paperwhite",
|
||||
"Kindle",
|
||||
"Separator",
|
||||
"Kindle Fire",
|
||||
"Kindle Fire HD 7\"",
|
||||
"Kindle Fire HD 8.9\"",
|
||||
"K. Fire HD 7\"",
|
||||
"K. Fire HD 8.9\"",
|
||||
"K. Fire HDX 7\"",
|
||||
"K. Fire HDX 8.9\"",
|
||||
"Separator",
|
||||
"Kindle for Android",
|
||||
"Other",
|
||||
@@ -116,7 +124,8 @@ class ProfileData:
|
||||
"Kindle 1",
|
||||
"Kindle 2",
|
||||
"Kindle DX",
|
||||
"Kindle DXG"
|
||||
"Kindle DXG",
|
||||
"Kindle Fire"
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user