From 50dc7fbffede0b775f0e812fb1f29b1914ac11ec Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Sun, 4 Aug 2019 08:40:48 +0200 Subject: Added profile label for Oasis 3 New profile is unnecessary. --- kindlecomicconverter/KCC_gui.py | 4 ++-- kindlecomicconverter/image.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'kindlecomicconverter') diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 283c41c..68fc44f 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -910,8 +910,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow): MW.resize(500, 500) self.profiles = { - "Kindle Oasis 2": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, - 'DefaultUpscale': True, 'Label': 'KO'}, + "Kindle Oasis 2/3": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, + 'DefaultUpscale': True, 'Label': 'KO'}, "Kindle Oasis": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, 'DefaultUpscale': True, 'Label': 'KV'}, "Kindle Voyage": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0, diff --git a/kindlecomicconverter/image.py b/kindlecomicconverter/image.py index 118ef3c..bc96e0c 100755 --- a/kindlecomicconverter/image.py +++ b/kindlecomicconverter/image.py @@ -83,7 +83,7 @@ class ProfileData: '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), - 'KO': ("Kindle Oasis 2", (1264, 1680), Palette16, 1.8), + 'KO': ("Kindle Oasis 2/3", (1264, 1680), Palette16, 1.8), '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), -- cgit 1.4.1 From 4c13ef0f6c17af57793cf5a6c9e2c852719329c9 Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Sun, 4 Aug 2019 09:25:32 +0200 Subject: Fixed handling filenames that start with dot (close #310) --- kindlecomicconverter/shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kindlecomicconverter') diff --git a/kindlecomicconverter/shared.py b/kindlecomicconverter/shared.py index d2a358f..507873b 100644 --- a/kindlecomicconverter/shared.py +++ b/kindlecomicconverter/shared.py @@ -47,7 +47,7 @@ class HTMLStripper(HTMLParser): def getImageFileName(imgfile): name, ext = os.path.splitext(imgfile) ext = ext.lower() - if name.startswith('.') or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp']: + if (name.startswith('.') and len(name) == 1) or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp']: return None return [name, ext] -- cgit 1.4.1 From 5f5157c1d40dfb1c8ecc33e026f3d4ef9b01c34a Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Sun, 4 Aug 2019 09:29:03 +0200 Subject: No longer modify header field 504 --- kindlecomicconverter/dualmetafix.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'kindlecomicconverter') diff --git a/kindlecomicconverter/dualmetafix.py b/kindlecomicconverter/dualmetafix.py index c05dc85..7426f93 100644 --- a/kindlecomicconverter/dualmetafix.py +++ b/kindlecomicconverter/dualmetafix.py @@ -143,14 +143,12 @@ class DualMobiMetaFix: self.datain_rec0 = readsection(self.datain, 0) # in the first mobi header - # add 501 to "EBOK", add 113 as asin, add 504 as asin + # add 501 to "EBOK", add 113 as asin rec0 = self.datain_rec0 rec0 = del_exth(rec0, 501) rec0 = del_exth(rec0, 113) - rec0 = del_exth(rec0, 504) rec0 = add_exth(rec0, 501, b'EBOK') rec0 = add_exth(rec0, 113, asin) - rec0 = add_exth(rec0, 504, asin) replacesection(self.datain, 0, rec0) ver = getint(self.datain_rec0, mobi_version) @@ -172,14 +170,12 @@ class DualMobiMetaFix: self.datain_kfrec0 = readsection(self.datain, datain_kf8) # in the second header - # add 501 to "EBOK", add 113 as asin, add 504 as asin + # add 501 to "EBOK", add 113 as asin rec0 = self.datain_kfrec0 rec0 = del_exth(rec0, 501) rec0 = del_exth(rec0, 113) - rec0 = del_exth(rec0, 504) rec0 = add_exth(rec0, 501, b'EBOK') rec0 = add_exth(rec0, 113, asin) - rec0 = add_exth(rec0, 504, asin) replacesection(self.datain, datain_kf8, rec0) self.datain.flush() -- cgit 1.4.1 From 6ce0f76fe020185aafed23b81054694d7cbc4565 Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Mon, 21 Oct 2019 13:44:49 +0200 Subject: Fixed KindleGen detection on macOS --- kcc.py | 3 ++- kindlecomicconverter/KCC_gui.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'kindlecomicconverter') diff --git a/kcc.py b/kcc.py index b334561..9c4d983 100755 --- a/kcc.py +++ b/kcc.py @@ -28,7 +28,8 @@ import os if sys.platform.startswith('darwin'): if getattr(sys, 'frozen', False): os.environ['PATH'] = os.path.dirname(os.path.abspath(sys.executable)) + \ - '/../Resources:/usr/local/bin:/usr/bin:/bin' + '/../Resources:/Applications/Kindle Comic Creator/Kindle Comic Creator.app/Contents/' \ + 'MacOS:/usr/local/bin:/usr/bin:/bin' os.chdir(os.path.dirname(os.path.abspath(sys.executable)) + '/../Resources') os.system('defaults write com.kindlecomicconverter.KindleComicConverter ApplePersistenceIgnoreState YES') os.system('defaults write com.kindlecomicconverter.KindleComicConverter NSInitialToolTipDelay -int 1000') diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 68fc44f..6020c7d 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -858,7 +858,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow): if sys.platform.startswith('win'): self.addMessage('Download it and place EXE in KCC directory.', 'error') elif sys.platform.startswith('darwin'): - self.addMessage('Install it using Brew.', 'error') + self.addMessage('Install it using Brew: brew cask install kindle-c' + 'omic-creator', 'error') else: self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error') -- cgit 1.4.1 From 67e913ed9ee2043b6401ea624f33fc20f656c5fc Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Mon, 21 Oct 2019 13:50:53 +0200 Subject: Version bump --- .gitignore | 15 +++++---------- CHANGELOG.md | 4 ++++ README.md | 8 ++++---- kcc.iss | 2 +- kcc.py | 10 +++++----- kindlecomicconverter/KCC_gui.py | 2 +- kindlecomicconverter/__init__.py | 2 +- kindlecomicconverter/image.py | 2 +- other/osx/Info.plist | 8 ++++---- setup.py | 1 + 10 files changed, 27 insertions(+), 27 deletions(-) (limited to 'kindlecomicconverter') diff --git a/.gitignore b/.gitignore index 6877d7a..3e74b4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,10 @@ *.pyc -*.cbz -*.cbr -*.spec -.idea -.DS_Store -.python-version -Thumbs.db -dist -Output -kindlegen* +Pipfile +Pipfile.lock setup.bat kindlecomicconverter/sentry.py +other/windows/kindlegen.exe +dist/ build/ KindleComicConverter.egg-info/ +.idea/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 37a65b7..de4f5b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # CHANGELOG +#### 5.5.2: +* Fixed KindleGen detection on macOS 10.15 +* Fixed multiple smaller issues + #### 5.5.1: * Fixes some stability issues diff --git a/README.md b/README.md index 32836a4..7e39ea5 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ If you find **KCC** valuable you can consider donating to the authors: ## BINARY RELEASES You can find the latest released binary at the following links: - **[Windows](http://kcc.iosphe.re/Windows/) (64-bit only)** -- **[macOS](http://kcc.iosphe.re/OSX/) (10.12+)** +- **[macOS](http://kcc.iosphe.re/OSX/) (10.13+)** - **Linux:** Currently unavailable. ## PYPI @@ -43,7 +43,7 @@ Following software is required to run Linux version of **KCC** and/or bare sourc - [PyQt5](https://pypi.python.org/pypi/PyQt5) 5.6.0+ - [Pillow](https://pypi.python.org/pypi/Pillow/) 4.0.0+ - [psutil](https://pypi.python.org/pypi/psutil) 5.0.0+ -- [python-slugify](https://pypi.python.org/pypi/python-slugify) 1.2.1+ +- [python-slugify](https://pypi.python.org/pypi/python-slugify) 1.2.1+, <3.0.0 - [raven](https://pypi.python.org/pypi/raven) 6.0.0+ On Debian based distributions these two commands should install all needed dependencies: @@ -160,7 +160,7 @@ The app relies and includes the following scripts: - Icon is by **Nikolay Verin** ([http://ncrow.deviantart.com/](http://ncrow.deviantart.com/)) and released under [CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) License. ## SAMPLE FILES CREATED BY KCC -* [Kindle Oasis 2](http://kcc.iosphe.re/Samples/Ubunchu!-KO.mobi) +* [Kindle Oasis 2 / 3](http://kcc.iosphe.re/Samples/Ubunchu!-KO.mobi) * [Kindle Paperwhite 3 / 4 / Voyage / Oasis](http://kcc.iosphe.re/Samples/Ubunchu!-KV.mobi) * [Kindle Paperwhite 1 / 2](http://kcc.iosphe.re/Samples/Ubunchu!-KPW.mobi) * [Kindle](http://kcc.iosphe.re/Samples/Ubunchu!-K578.mobi) @@ -173,7 +173,7 @@ The app relies and includes the following scripts: ## PRIVACY **KCC** is initiating internet connections in two cases: * During startup - Version check. -* When error occurs - Automatic reporting on Windows and MacOS. +* When error occurs - Automatic reporting on Windows and macOS. ## KNOWN ISSUES Please check [wiki page](https://github.com/ciromattia/kcc/wiki/Known-issues). diff --git a/kcc.iss b/kcc.iss index 699b17a..caae98d 100644 --- a/kcc.iss +++ b/kcc.iss @@ -1,5 +1,5 @@ #define MyAppName "Kindle Comic Converter" -#define MyAppVersion "5.5.1" +#define MyAppVersion "5.5.2" #define MyAppPublisher "Ciro Mattia Gonano, Paweł Jastrzębski" #define MyAppURL "http://kcc.iosphe.re/" #define MyAppExeName "KCC.exe" diff --git a/kcc.py b/kcc.py index 9c4d983..27284ce 100755 --- a/kcc.py +++ b/kcc.py @@ -42,11 +42,11 @@ elif sys.platform.startswith('win'): os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/windows/;' + os.environ['PATH'] os.chdir(os.path.dirname(os.path.abspath(__file__))) # Load additional Sentry configuration -if getattr(sys, 'frozen', False): - try: - import kindlecomicconverter.sentry - except ImportError: - pass +# if getattr(sys, 'frozen', False): +# try: +# import kindlecomicconverter.sentry +# except ImportError: +# pass from multiprocessing import freeze_support, set_start_method from kindlecomicconverter.startup import start diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 6020c7d..ea36e1e 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -953,7 +953,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): 'DefaultUpscale': False, 'Label': 'K34'}, } profilesGUI = [ - "Kindle Oasis 2", + "Kindle Oasis 2/3", "Kindle Oasis", "Kindle Voyage", "Kindle PW 3/4", diff --git a/kindlecomicconverter/__init__.py b/kindlecomicconverter/__init__.py index c0f1b84..6ad0c10 100644 --- a/kindlecomicconverter/__init__.py +++ b/kindlecomicconverter/__init__.py @@ -1,4 +1,4 @@ -__version__ = '5.5.1' +__version__ = '5.5.2' __license__ = 'ISC' __copyright__ = '2012-2019, Ciro Mattia Gonano , Pawel Jastrzebski ' __docformat__ = 'restructuredtext en' diff --git a/kindlecomicconverter/image.py b/kindlecomicconverter/image.py index bc96e0c..35fcfc8 100755 --- a/kindlecomicconverter/image.py +++ b/kindlecomicconverter/image.py @@ -358,7 +358,7 @@ class Cover: try: self.image.save(self.target, "JPEG", optimize=1, quality=85) except IOError: - raise RuntimeError('Failed to process downloaded cover.') + raise RuntimeError('Failed to save cover.') def saveToKindle(self, kindle, asin): self.image = self.image.resize((300, 470), Image.ANTIALIAS) diff --git a/other/osx/Info.plist b/other/osx/Info.plist index 54a4f19..daed678 100644 --- a/other/osx/Info.plist +++ b/other/osx/Info.plist @@ -30,7 +30,7 @@ CFBundleExecutable MacOS/Kindle Comic Converter CFBundleGetInfoString - KindleComicConverter 5.5.1, written 2012-2019 by Ciro Mattia Gonano and Pawel Jastrzebski + KindleComicConverter 5.5.2, written 2012-2019 by Ciro Mattia Gonano and Pawel Jastrzebski CFBundleIconFile comic2ebook.icns CFBundleIdentifier @@ -42,11 +42,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 5.5.1 + 5.5.2 CFBundleSignature ???? CFBundleVersion - 5.5.1 + 5.5.2 LSEnvironment PATH @@ -55,7 +55,7 @@ LSHasLocalizedDisplayName LSMinimumSystemVersion - 10.12.0 + 10.13.0 NSAppleScriptEnabled NSHumanReadableCopyright diff --git a/setup.py b/setup.py index 0868767..b21925d 100755 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ MAIN = 'kcc.py' VERSION = __version__ +# noinspection PyUnresolvedReferences class BuildBinaryCommand(distutils.cmd.Command): description = 'build binary release' user_options = [] -- cgit 1.4.1