mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 18:56:28 +00:00
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,15 +1,10 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.cbz
|
Pipfile
|
||||||
*.cbr
|
Pipfile.lock
|
||||||
*.spec
|
|
||||||
.idea
|
|
||||||
.DS_Store
|
|
||||||
.python-version
|
|
||||||
Thumbs.db
|
|
||||||
dist
|
|
||||||
Output
|
|
||||||
kindlegen*
|
|
||||||
setup.bat
|
setup.bat
|
||||||
kindlecomicconverter/sentry.py
|
kindlecomicconverter/sentry.py
|
||||||
|
other/windows/kindlegen.exe
|
||||||
|
dist/
|
||||||
build/
|
build/
|
||||||
KindleComicConverter.egg-info/
|
KindleComicConverter.egg-info/
|
||||||
|
.idea/
|
||||||
21
.travis.yml
21
.travis.yml
@@ -2,16 +2,10 @@ matrix:
|
|||||||
include:
|
include:
|
||||||
- os: osx
|
- os: osx
|
||||||
language: generic
|
language: generic
|
||||||
osx_image: xcode9.2
|
osx_image: xcode11.1
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- brew update
|
|
||||||
- brew upgrade python3
|
|
||||||
- brew uninstall node
|
|
||||||
- travis_wait 30 brew install node@6
|
|
||||||
- brew link node@6 --force --overwrite
|
|
||||||
- pip3 install --upgrade pip setuptools wheel
|
- pip3 install --upgrade pip setuptools wheel
|
||||||
- openssl aes-256-cbc -K $encrypted_a95564d8ff0d_key -iv $encrypted_a95564d8ff0d_iv -in other/osx/sentry.py.enc -out kindlecomicconverter/sentry.py -d
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip3 install -r requirements.txt
|
- pip3 install -r requirements.txt
|
||||||
@@ -25,13 +19,12 @@ before_deploy:
|
|||||||
- rm -r dist/!(*.deb|*.dmg)
|
- rm -r dist/!(*.deb|*.dmg)
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: s3
|
provider: gcs
|
||||||
skip_cleanup: true
|
access_key_id: GOOG1EC62457RKUYFR2TIZUWV4EFSV2EP5LVLPPFXUAKADWJFDYPFW63BQSLA
|
||||||
access_key_id: AKIAIQNL5R4FI4C4NJYQ
|
|
||||||
secret_access_key:
|
secret_access_key:
|
||||||
secure: X66hYplxB4QSueljwvDfamNH/MQmHjo3mCofBcaTHAr7n2fp+yd2NzD2yy9h8NbsL0LWwx9wtJa/jpkIE02ZDfi9NrMLvKKFazzdpiyTMN5Yh85lHHyD1XIOCZRd4igaZ+O8975tJAEaEOPS+PE9XGZcRBh+y/eSJ+fMEgohaJ1MtDFbQR7X1cEw3iqbjrV2rlghZNCk/9mZEfObzAEjQiSDpv5G0IuIPRvYg/BgZt8chHVAe03B6oqcBa7uCBCTlfHIiNh1MWtP0B3NNBq3dcu9QHOFri1YqoZKuaPVCf6TFQL/NW5dFihegev2t9IwFyaBxytiT8fBkgQhP0VX8cuCwBAfnQGIogAu0eLSPp+E6dB/7Cpt2GDCk39+As8WKqt9hCRHmrvYhPA1Mq9QyEgKy/TKKKfDby3qVTIqYOQYpuQ1B7sIU651L5A+hBvZ1dqWIUz25h0zqjjeSFrcfNnf1e4tkk0QJvvnKqz0xsVaJxA2p07VJMRn8SlZQIJ2GEbMDeB5jxYtf5JzXywChP9adlPNjLna9G8ScnGSU1f7ZhsBQUEgY5jBlnX1lveyl3DUe6NP+qOTyljLWYwjx3AF4Zg10LYSecRS6hnqAUrGRmibDCIYclUzlJkVyjKGJ9uEyrUiCp0P0IsAzE1XhPVAWEyGUcWWGJG+jgmohSk=
|
secure: sxYjeho7U3im0Ezf6cz6TjYDiLvf0kAM2ETQHYoFNbD1VVvhJJyymDCnPH80zpFKmhc1MWTB6ndwsrPfcyZDLR2meSdWGPjZfFPY3RcrfImndKi7ln+mYQDBQ7W1lGit4YcH3Ju7LHceaTbRA7fVTX8pWKOcbXL2oM+lQxTJHH32+crVma+ChhbjzTWsSLRoakt3Nhiveec5p/qSW7AFe4Zq+b3C85IgwjSJI/xVwzaWrs6p915h1zZi7KL7YCMIxfQFrvRPFR2KTbh/DoLCCrqfbD4qh0PVy1li51Ac3hd/u3foiNnTNchzgE3Nv/nbKmtFU6huuLNgzkQGuLA+yn7mKYzBwA3ZmFgoimdH9+yRCMkZ8B5VHpvfN1hgpJcyEl1T98Kv4cdtRYNB4w9iAMy1qSVxhjeI+2rjuWGoXro0lU6L4LIRCOruY3AuLCAKG8Qw5Ak9ksmIKBhZ9soxpoIwu/TYDUQkFj29IrUQucg9TEp7uAoxu8/7EHxB7hWnBRaBAAQbMuIRg7yysT3FT0Os6SB0t9+RBsVMSPuIti9JJZ2Lu0uRI1+Se+g7ItzYtJoPhBJAzAa+J9OONj0RNj2z8Vq2oIBhH4z6b6zTRMVroos3cdfYl5qIKs9SQ7rmeHoPRROcqpCznsUZ/ESa4f2MewFU/7AYcEnCesZV4xg=
|
||||||
bucket: kcc-deploy
|
bucket: kcc-deploy
|
||||||
region: eu-central-1
|
local-dir: dist
|
||||||
local_dir: dist
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
repo: AcidWeb/kcc
|
repo: AcidWeb/KCC
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
#### 5.5.2:
|
||||||
|
* Fixed KindleGen detection on macOS 10.15
|
||||||
|
* Fixed multiple smaller issues
|
||||||
|
|
||||||
#### 5.5.1:
|
#### 5.5.1:
|
||||||
* Fixes some stability issues
|
* Fixes some stability issues
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ If you find **KCC** valuable you can consider donating to the authors:
|
|||||||
## BINARY RELEASES
|
## BINARY RELEASES
|
||||||
You can find the latest released binary at the following links:
|
You can find the latest released binary at the following links:
|
||||||
- **[Windows](http://kcc.iosphe.re/Windows/) (64-bit only)**
|
- **[Windows](http://kcc.iosphe.re/Windows/) (64-bit only)**
|
||||||
- **[macOS](http://kcc.iosphe.re/OSX/) (10.12+)**
|
- **[macOS](http://kcc.iosphe.re/OSX/) (10.14+)**
|
||||||
- **Linux:** Currently unavailable.
|
- **Linux:** Currently unavailable.
|
||||||
|
|
||||||
## PYPI
|
## 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+
|
- [PyQt5](https://pypi.python.org/pypi/PyQt5) 5.6.0+
|
||||||
- [Pillow](https://pypi.python.org/pypi/Pillow/) 4.0.0+
|
- [Pillow](https://pypi.python.org/pypi/Pillow/) 4.0.0+
|
||||||
- [psutil](https://pypi.python.org/pypi/psutil) 5.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+
|
- [raven](https://pypi.python.org/pypi/raven) 6.0.0+
|
||||||
|
|
||||||
On Debian based distributions these two commands should install all needed dependencies:
|
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.
|
- 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
|
## 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 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 Paperwhite 1 / 2](http://kcc.iosphe.re/Samples/Ubunchu!-KPW.mobi)
|
||||||
* [Kindle](http://kcc.iosphe.re/Samples/Ubunchu!-K578.mobi)
|
* [Kindle](http://kcc.iosphe.re/Samples/Ubunchu!-K578.mobi)
|
||||||
@@ -173,7 +173,7 @@ The app relies and includes the following scripts:
|
|||||||
## PRIVACY
|
## PRIVACY
|
||||||
**KCC** is initiating internet connections in two cases:
|
**KCC** is initiating internet connections in two cases:
|
||||||
* During startup - Version check.
|
* During startup - Version check.
|
||||||
* When error occurs - Automatic reporting on Windows and MacOS.
|
* When error occurs - Automatic reporting on Windows and macOS.
|
||||||
|
|
||||||
## KNOWN ISSUES
|
## KNOWN ISSUES
|
||||||
Please check [wiki page](https://github.com/ciromattia/kcc/wiki/Known-issues).
|
Please check [wiki page](https://github.com/ciromattia/kcc/wiki/Known-issues).
|
||||||
|
|||||||
17
appveyor.yml
17
appveyor.yml
@@ -2,24 +2,13 @@ environment:
|
|||||||
PYTHON: "C:\\Python37-x64"
|
PYTHON: "C:\\Python37-x64"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- set PATH="%PYTHON%\\Scripts";"C:\\Program Files (x86)\\Inno Setup 5";%PATH%
|
- set PATH="%PYTHON%\\Scripts";%PATH%
|
||||||
- "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel"
|
- "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel"
|
||||||
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
|
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
|
||||||
- "%PYTHON%\\python.exe -m pip install certifi https://github.com/pyinstaller/pyinstaller/archive/develop.zip"
|
- "%PYTHON%\\python.exe -m pip install certifi https://github.com/pyinstaller/pyinstaller/archive/develop.zip"
|
||||||
- nuget install secure-file -ExcludeVersion
|
|
||||||
- secure-file\tools\secure-file -decrypt other\windows\sentry.py.enc -out kindlecomicconverter\sentry.py -secret %ENCRYPTION%
|
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- "%PYTHON%\\python.exe setup.py build_binary"
|
- "%PYTHON%\\python.exe setup.py build_binary"
|
||||||
|
|
||||||
after_build:
|
artifacts:
|
||||||
- ps: Get-ChildItem .\dist\KCC* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
- path: dist\KCC*
|
||||||
|
|
||||||
deploy:
|
|
||||||
provider: S3
|
|
||||||
access_key_id:
|
|
||||||
secure: pWfyU8wtAHt354mBILwM41TemOjb+My9n3CRMnrpLzI=
|
|
||||||
secret_access_key:
|
|
||||||
secure: G0Xpxe355LMqV3s8v+TsdJYdmhFoKKA+mxK37Tlu8yNwKXKJgcnY7pcFKSdX5xS5
|
|
||||||
bucket: kcc-deploy
|
|
||||||
region: eu-central-1
|
|
||||||
|
|||||||
2
kcc.iss
2
kcc.iss
@@ -1,5 +1,5 @@
|
|||||||
#define MyAppName "Kindle Comic Converter"
|
#define MyAppName "Kindle Comic Converter"
|
||||||
#define MyAppVersion "5.5.1"
|
#define MyAppVersion "5.5.2"
|
||||||
#define MyAppPublisher "Ciro Mattia Gonano, Paweł Jastrzębski"
|
#define MyAppPublisher "Ciro Mattia Gonano, Paweł Jastrzębski"
|
||||||
#define MyAppURL "http://kcc.iosphe.re/"
|
#define MyAppURL "http://kcc.iosphe.re/"
|
||||||
#define MyAppExeName "KCC.exe"
|
#define MyAppExeName "KCC.exe"
|
||||||
|
|||||||
15
kcc.py
15
kcc.py
@@ -28,10 +28,9 @@ import os
|
|||||||
if sys.platform.startswith('darwin'):
|
if sys.platform.startswith('darwin'):
|
||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
os.environ['PATH'] = os.path.dirname(os.path.abspath(sys.executable)) + \
|
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.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')
|
|
||||||
else:
|
else:
|
||||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||||
elif sys.platform.startswith('win'):
|
elif sys.platform.startswith('win'):
|
||||||
@@ -41,11 +40,11 @@ elif sys.platform.startswith('win'):
|
|||||||
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/windows/;' + os.environ['PATH']
|
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/windows/;' + os.environ['PATH']
|
||||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||||
# Load additional Sentry configuration
|
# Load additional Sentry configuration
|
||||||
if getattr(sys, 'frozen', False):
|
# if getattr(sys, 'frozen', False):
|
||||||
try:
|
# try:
|
||||||
import kindlecomicconverter.sentry
|
# import kindlecomicconverter.sentry
|
||||||
except ImportError:
|
# except ImportError:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
from multiprocessing import freeze_support, set_start_method
|
from multiprocessing import freeze_support, set_start_method
|
||||||
from kindlecomicconverter.startup import start
|
from kindlecomicconverter.startup import start
|
||||||
|
|||||||
@@ -857,7 +857,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
if sys.platform.startswith('win'):
|
if sys.platform.startswith('win'):
|
||||||
self.addMessage('Download it and place EXE in KCC directory.', 'error')
|
self.addMessage('Download it and place EXE in KCC directory.', 'error')
|
||||||
elif sys.platform.startswith('darwin'):
|
elif sys.platform.startswith('darwin'):
|
||||||
self.addMessage('Install it using <a href="http://brew.sh/">Brew</a>.', 'error')
|
self.addMessage('Install it using <a href="http://brew.sh/">Brew</a>: <i>brew cask install kindle-c'
|
||||||
|
'omic-creator</i>', 'error')
|
||||||
else:
|
else:
|
||||||
self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error')
|
self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error')
|
||||||
|
|
||||||
@@ -909,8 +910,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
MW.resize(500, 500)
|
MW.resize(500, 500)
|
||||||
|
|
||||||
self.profiles = {
|
self.profiles = {
|
||||||
"Kindle Oasis 2": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
"Kindle Oasis 2/3": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||||
'DefaultUpscale': True, 'Label': 'KO'},
|
'DefaultUpscale': True, 'Label': 'KO'},
|
||||||
"Kindle Oasis": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
"Kindle Oasis": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||||
'DefaultUpscale': True, 'Label': 'KV'},
|
'DefaultUpscale': True, 'Label': 'KV'},
|
||||||
"Kindle Voyage": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
"Kindle Voyage": {'PVOptions': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||||
@@ -951,7 +952,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
'DefaultUpscale': False, 'Label': 'K34'},
|
'DefaultUpscale': False, 'Label': 'K34'},
|
||||||
}
|
}
|
||||||
profilesGUI = [
|
profilesGUI = [
|
||||||
"Kindle Oasis 2",
|
"Kindle Oasis 2/3",
|
||||||
"Kindle Oasis",
|
"Kindle Oasis",
|
||||||
"Kindle Voyage",
|
"Kindle Voyage",
|
||||||
"Kindle PW 3/4",
|
"Kindle PW 3/4",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
__version__ = '5.5.1'
|
__version__ = '5.5.2'
|
||||||
__license__ = 'ISC'
|
__license__ = 'ISC'
|
||||||
__copyright__ = '2012-2019, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>'
|
__copyright__ = '2012-2019, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|||||||
@@ -143,14 +143,12 @@ class DualMobiMetaFix:
|
|||||||
self.datain_rec0 = readsection(self.datain, 0)
|
self.datain_rec0 = readsection(self.datain, 0)
|
||||||
|
|
||||||
# in the first mobi header
|
# 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 = self.datain_rec0
|
||||||
rec0 = del_exth(rec0, 501)
|
rec0 = del_exth(rec0, 501)
|
||||||
rec0 = del_exth(rec0, 113)
|
rec0 = del_exth(rec0, 113)
|
||||||
rec0 = del_exth(rec0, 504)
|
|
||||||
rec0 = add_exth(rec0, 501, b'EBOK')
|
rec0 = add_exth(rec0, 501, b'EBOK')
|
||||||
rec0 = add_exth(rec0, 113, asin)
|
rec0 = add_exth(rec0, 113, asin)
|
||||||
rec0 = add_exth(rec0, 504, asin)
|
|
||||||
replacesection(self.datain, 0, rec0)
|
replacesection(self.datain, 0, rec0)
|
||||||
|
|
||||||
ver = getint(self.datain_rec0, mobi_version)
|
ver = getint(self.datain_rec0, mobi_version)
|
||||||
@@ -172,14 +170,12 @@ class DualMobiMetaFix:
|
|||||||
self.datain_kfrec0 = readsection(self.datain, datain_kf8)
|
self.datain_kfrec0 = readsection(self.datain, datain_kf8)
|
||||||
|
|
||||||
# in the second header
|
# 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 = self.datain_kfrec0
|
||||||
rec0 = del_exth(rec0, 501)
|
rec0 = del_exth(rec0, 501)
|
||||||
rec0 = del_exth(rec0, 113)
|
rec0 = del_exth(rec0, 113)
|
||||||
rec0 = del_exth(rec0, 504)
|
|
||||||
rec0 = add_exth(rec0, 501, b'EBOK')
|
rec0 = add_exth(rec0, 501, b'EBOK')
|
||||||
rec0 = add_exth(rec0, 113, asin)
|
rec0 = add_exth(rec0, 113, asin)
|
||||||
rec0 = add_exth(rec0, 504, asin)
|
|
||||||
replacesection(self.datain, datain_kf8, rec0)
|
replacesection(self.datain, datain_kf8, rec0)
|
||||||
|
|
||||||
self.datain.flush()
|
self.datain.flush()
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class ProfileData:
|
|||||||
'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8),
|
'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8),
|
||||||
'KPW': ("Kindle Paperwhite 1/2", (758, 1024), 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),
|
'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),
|
'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.8),
|
||||||
'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8),
|
'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8),
|
||||||
'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.8),
|
'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.8),
|
||||||
@@ -358,7 +358,7 @@ class Cover:
|
|||||||
try:
|
try:
|
||||||
self.image.save(self.target, "JPEG", optimize=1, quality=85)
|
self.image.save(self.target, "JPEG", optimize=1, quality=85)
|
||||||
except IOError:
|
except IOError:
|
||||||
raise RuntimeError('Failed to process downloaded cover.')
|
raise RuntimeError('Failed to save cover.')
|
||||||
|
|
||||||
def saveToKindle(self, kindle, asin):
|
def saveToKindle(self, kindle, asin):
|
||||||
self.image = self.image.resize((300, 470), Image.ANTIALIAS)
|
self.image = self.image.resize((300, 470), Image.ANTIALIAS)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class HTMLStripper(HTMLParser):
|
|||||||
def getImageFileName(imgfile):
|
def getImageFileName(imgfile):
|
||||||
name, ext = os.path.splitext(imgfile)
|
name, ext = os.path.splitext(imgfile)
|
||||||
ext = ext.lower()
|
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 None
|
||||||
return [name, ext]
|
return [name, ext]
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>MacOS/Kindle Comic Converter</string>
|
<string>MacOS/Kindle Comic Converter</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>KindleComicConverter 5.5.1, written 2012-2019 by Ciro Mattia Gonano and Pawel Jastrzebski</string>
|
<string>KindleComicConverter 5.5.2, written 2012-2019 by Ciro Mattia Gonano and Pawel Jastrzebski</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>comic2ebook.icns</string>
|
<string>comic2ebook.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@@ -42,20 +42,20 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>5.5.1</string>
|
<string>5.5.2</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>5.5.1</string>
|
<string>5.5.2</string>
|
||||||
<key>LSEnvironment</key>
|
<key>LSEnvironment</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>PATH</key>
|
<key>PATH</key>
|
||||||
<string>./../Resources:/usr/local/bin:/usr/bin:/bin</string>
|
<string>./../Resources:/Applications/Kindle Comic Creator/Kindle Comic Creator.app/Contents/MacOS:/usr/local/bin:/usr/bin:/bin</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>LSHasLocalizedDisplayName</key>
|
<key>LSHasLocalizedDisplayName</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.12.0</string>
|
<string>10.14.0</string>
|
||||||
<key>NSAppleScriptEnabled</key>
|
<key>NSAppleScriptEnabled</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
@@ -64,5 +64,9 @@
|
|||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>NSRequiresAquaSystemAppearance</key>
|
||||||
|
<string>false</string>
|
||||||
|
<key>NSInitialToolTipDelay</key>
|
||||||
|
<integer>1000</integer>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
<EFBFBD>d<EFBFBD>7<EFBFBD><EFBFBD>э<><D18D>|l<>z6<7A>n<EFBFBD>I_<49><5F><EFBFBD><1E>:<3A><>-<2D>!<21>n<EFBFBD>BCD<43>}f<>zIe|<7C><><EFBFBD><EFBFBD>\9KW<01>f<EFBFBD>H[<5B>Y<EFBFBD>LY<19>7^<5E>@m<>*<2A>Ym<10>_z`3<>WSD{<7B>"<22><>a@><3E>;}\<07><0F>,D<><44><16><>·<EFBFBD>!yX<79><58>薁<EFBFBD>~<7E>~Y_<59>xd<78><64> B<1A><>T
|
|
||||||
B<EFBFBD>𢯣
|
|
||||||
u<EFBFBD>|91u~<7E>Pa<50><61>LD<4C>jh
|
|
||||||
1
setup.py
1
setup.py
@@ -22,6 +22,7 @@ MAIN = 'kcc.py'
|
|||||||
VERSION = __version__
|
VERSION = __version__
|
||||||
|
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
class BuildBinaryCommand(distutils.cmd.Command):
|
class BuildBinaryCommand(distutils.cmd.Command):
|
||||||
description = 'build binary release'
|
description = 'build binary release'
|
||||||
user_options = []
|
user_options = []
|
||||||
|
|||||||
Reference in New Issue
Block a user