diff --git a/README.md b/README.md index d98da76a..2d7c8b1a 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ sudo apt-get install python3 p7zip-full python3-pil python3-psutil python3-slugi ``` 'K1': ("Kindle 1", (600, 670), Palette4, 1.8), - 'K11': ("Kindle 11/12", (1072, 1448), Palette16, 1.8), + 'K11': ("Kindle 11", (1072, 1448), Palette16, 1.8), 'K2': ("Kindle 2", (600, 670), Palette15, 1.8), 'K34': ("Kindle Keyboard/Touch", (600, 800), Palette16, 1.8), 'K578': ("Kindle", (600, 800), Palette16, 1.8), @@ -107,9 +107,7 @@ sudo apt-get install python3 p7zip-full python3-pil python3-psutil python3-slugi 'KPW': ("Kindle Paperwhite 1/2", (758, 1024), Palette16, 1.8), 'KV': ("Kindle Paperwhite 3/4/Voyage/Oasis", (1072, 1448), Palette16, 1.8), 'KPW5': ("Kindle Paperwhite 5/Signature Edition", (1236, 1648), Palette16, 1.8), - 'KPW6': ("Kindle Paperwhite 6", (1264, 1680), Palette16, 1.8), - 'KCS12': ("Kindle Colorsoft", (1264, 1680), Palette16, 1.8), - 'KO': ("Kindle Oasis 2/3", (1264, 1680), Palette16, 1.8), + 'KO': ("Kindle Oasis 2/3/Paperwhite 12/Colorsoft 12", (1264, 1680), Palette16, 1.8), 'KS': ("Kindle Scribe", (1860, 2480), Palette16, 1.8), 'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.8), 'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8), diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 64f7337c..880ca0be 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -928,17 +928,17 @@ def __init__(self, kccapp, kccwindow): "Kindle Scribe": { 'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': False, 'ForceColor': False, 'Label': 'KS', }, - "Kindle 11/12": { + "Kindle 11": { 'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'ForceColor': False, 'Label': 'K11', }, "Kindle PW 11": { 'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KPW5', }, "Kindle PW 12": { - 'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KPW6', + 'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KO', }, "Kindle CS 12": { - 'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'ForceColor': True, 'Label': 'KCS12', + 'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'ForceColor': True, 'Label': 'KO', }, "Kindle PW 7/10": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KV'}, @@ -994,10 +994,11 @@ def __init__(self, kccapp, kccwindow): 'Label': 'OTHER'}, } profilesGUI = [ - "Kindle Scribe", - "Kindle 11/12", - "Kindle PW 12", "Kindle CS 12", + "Kindle PW 12", + "Kindle Scribe", + "Kindle PW 11", + "Kindle 11", "Kindle Oasis 9/10", "Separator", "Kobo Clara 2E", @@ -1010,7 +1011,6 @@ def __init__(self, kccapp, kccwindow): "Separator", "Other", "Separator", - "Kindle PW 11", "Kindle Oasis 8", "Kindle PW 7/10", "Kindle Voyage", diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 544400e0..2719ca7f 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -957,8 +957,7 @@ def makeParser(): help="Full path to comic folder or file(s) to be processed.") main_options.add_argument("-p", "--profile", action="store", dest="profile", default="KV", - help="Device profile (Available options: K1, K2, K34, K578, KDX, KPW, KPW5, KPW6, KCS12, KV, KO, " - "K11, KS, KoMT, KoG, KoGHD, KoA, KoAHD, KoAH2O, KoAO, KoN, KoC, KoCC, KoL, KoLC, KoF, KoS, KoE)" + help=f"Device profile (Available options: {', '.join(image.ProfileData.Profiles.keys())})" " [Default=KV]") main_options.add_argument("-m", "--manga-style", action="store_true", dest="righttoleft", default=False, help="Manga style (right-to-left reading and splitting)") @@ -1046,16 +1045,15 @@ def checkOptions(options): options.kfx = False options.supportSyntheticSpread = False if options.format == 'Auto': - if options.profile in ['K1', 'K2', 'K34', 'K578', 'KPW', 'KPW5', 'KPW6', 'KCS12', 'KV', 'KO', 'K11', 'KS']: + if options.profile in ['KDX']: + options.format = 'CBZ' + elif options.profile in image.ProfileData.ProfilesKindle.keys(): options.format = 'MOBI' - elif options.profile in ['OTHER', 'KoMT', 'KoG', 'KoGHD', 'KoA', 'KoAHD', 'KoAH2O', 'KoAO', - 'KoN', 'KoC', 'KoCC', 'KoL', 'KoLC', 'KoF', 'KoS', 'KoE']: + else: options.format = 'EPUB' - elif options.profile in ['KDX']: - options.format = 'CBZ' - if options.profile in ['K1', 'K2', 'K34', 'K578', 'KPW', 'KPW5', 'KPW6', 'KCS12', 'KV', 'KO', 'K11', 'KS']: + if options.profile in image.ProfileData.ProfilesKindle.keys(): options.iskindle = True - elif options.profile in ['OTHER', 'KoMT', 'KoG', 'KoGHD', 'KoA', 'KoAHD', 'KoAH2O', 'KoAO', 'KoN', 'KoC', 'KoCC', 'KoL', 'KoLC', 'KoF', 'KoS', 'KoE']: + else: options.isKobo = True # Other Kobo devices probably support synthetic spreads as well, but # they haven't been tested. diff --git a/kindlecomicconverter/image.py b/kindlecomicconverter/image.py index c867280b..4080e727 100755 --- a/kindlecomicconverter/image.py +++ b/kindlecomicconverter/image.py @@ -78,20 +78,29 @@ def __init__(self): PalleteNull = [ ] - Profiles = { + ProfilesKindleEBOK = { 'K1': ("Kindle 1", (600, 670), Palette4, 1.8), - 'K11': ("Kindle 11/12", (1072, 1448), Palette16, 1.8), 'K2': ("Kindle 2", (600, 670), Palette15, 1.8), + 'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8), 'K34': ("Kindle Keyboard/Touch", (600, 800), Palette16, 1.8), 'K578': ("Kindle", (600, 800), Palette16, 1.8), - 'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8), 'KPW': ("Kindle Paperwhite 1/2", (758, 1024), Palette16, 1.8), 'KV': ("Kindle Paperwhite 3/4/Voyage/Oasis", (1072, 1448), Palette16, 1.8), + } + + ProfilesKindlePDOC = { + 'KO': ("Kindle Oasis 2/3/Paperwhite 12/Colorsoft 12", (1264, 1680), Palette16, 1.8), + 'K11': ("Kindle 11", (1072, 1448), Palette16, 1.8), 'KPW5': ("Kindle Paperwhite 5/Signature Edition", (1236, 1648), Palette16, 1.8), - 'KPW6': ("Kindle Paperwhite 6", (1264, 1680), Palette16, 1.8), - 'KCS12': ("Kindle Colorsoft", (1264, 1680), Palette16, 1.8), - 'KO': ("Kindle Oasis 2/3", (1264, 1680), Palette16, 1.8), 'KS': ("Kindle Scribe", (1860, 2480), Palette16, 1.8), + } + + ProfilesKindle = { + **ProfilesKindleEBOK, + **ProfilesKindlePDOC + } + + ProfilesKobo = { 'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.8), 'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8), 'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.8), @@ -107,6 +116,11 @@ def __init__(self): 'KoF': ("Kobo Forma", (1440, 1920), Palette16, 1.8), 'KoS': ("Kobo Sage", (1440, 1920), Palette16, 1.8), 'KoE': ("Kobo Elipsa", (1404, 1872), Palette16, 1.8), + } + + Profiles = { + **ProfilesKindle, + **ProfilesKobo, 'OTHER': ("Other", (0, 0), Palette16, 1.8), }