diff --git a/.gitignore b/.gitignore index 33eb4d4..1e49dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ KindleComicConverter*.egg-info/ /kindlegen* /kcc.bat mozjpeg_lossless_optimization-*.whl +.DS_Store diff --git a/README.md b/README.md index 29371ea..f2f0dd3 100644 --- a/README.md +++ b/README.md @@ -39,18 +39,14 @@ You can find the latest binary at the following link: - flatpak : https://flathub.org/apps/details/io.github.ciromattia.kcc - Docker: https://github.com/ciromattia/kcc/pkgs/container/kcc -~~- **[Windows](http://kcc.iosphe.re/Windows/) (64-bit only)**~~ -~~- **[macOS](http://kcc.iosphe.re/OSX/) (10.14+)**~~ -~~- **Linux:** Currently unavailable.~~ - more information on [installation](https://github.com/ciromattia/kcc/wiki/Installation) ### DEPENDENCIES Following software is required to run Linux version of **KCC** and/or bare sources: - Python 3.3+ -- [PyQt5](https://pypi.python.org/pypi/PyQt5) 5.6.0+ (only needed for GUI) +- [PySide6](https://pypi.org/project/PySide6/) 6.5.1+ (only needed for GUI) - [Pillow](https://pypi.python.org/pypi/Pillow/) 4.0.0+ (5.2.0+ needed for WebP support) -- [psutil](https://pypi.python.org/pypi/psutil) 5.0.0+ +- [psutil](https://pypi.python.org/pypi/psutil) 5.9.5+ - [python-slugify](https://pypi.python.org/pypi/python-slugify) 1.2.1+, <8.0.0 - [raven](https://pypi.python.org/pypi/raven) 6.0.0+ (only needed for GUI) diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 1b325b1..e1d0f13 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -771,23 +771,23 @@ class KCCGUI(KCC_ui.Ui_mainWindow): self.settings.setValue('currentFormat', GUI.formatBox.currentIndex()) self.settings.setValue('startNumber', self.startNumber + 1) self.settings.setValue('windowSize', str(MW.size().width()) + 'x' + str(MW.size().height())) - self.settings.setValue('options', {'mangaBox': GUI.mangaBox.checkState(), - 'rotateBox': GUI.rotateBox.checkState(), - 'qualityBox': GUI.qualityBox.checkState(), - 'gammaBox': GUI.gammaBox.checkState(), - 'croppingBox': GUI.croppingBox.checkState(), + self.settings.setValue('options', {'mangaBox': GUI.mangaBox.checkState().value, + 'rotateBox': GUI.rotateBox.checkState().value, + 'qualityBox': GUI.qualityBox.checkState().value, + 'gammaBox': GUI.gammaBox.checkState().value, + 'croppingBox': GUI.croppingBox.checkState().value, 'croppingPowerSlider': float(self.croppingPowerValue) * 100, - 'upscaleBox': GUI.upscaleBox.checkState(), - 'borderBox': GUI.borderBox.checkState(), - 'webtoonBox': GUI.webtoonBox.checkState(), - 'outputSplit': GUI.outputSplit.checkState(), - 'colorBox': GUI.colorBox.checkState(), - 'disableProcessingBox': GUI.disableProcessingBox.checkState(), - 'mozJpegBox': GUI.mozJpegBox.checkState(), + 'upscaleBox': GUI.upscaleBox.checkState().value, + 'borderBox': GUI.borderBox.checkState().value, + 'webtoonBox': GUI.webtoonBox.checkState().value, + 'outputSplit': GUI.outputSplit.checkState().value, + 'colorBox': GUI.colorBox.checkState().value, + 'disableProcessingBox': GUI.disableProcessingBox.checkState().value, + 'mozJpegBox': GUI.mozJpegBox.checkState().value, 'widthBox': GUI.widthBox.value(), 'heightBox': GUI.heightBox.value(), - 'deleteBox': GUI.deleteBox.checkState(), - 'maximizeStrips': GUI.maximizeStrips.checkState(), + 'deleteBox': GUI.deleteBox.checkState().value, + 'maximizeStrips': GUI.maximizeStrips.checkState().value, 'gammaSlider': float(self.gammaValue) * 100}) self.settings.sync() self.tray.hide() @@ -874,7 +874,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): self.setupUi(MW) self.editor = KCCGUI_MetaEditor() self.icons = Icons() - self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter') + self.settings = QtCore.QSettings('ciromattia', 'kcc') self.settingsVersion = self.settings.value('settingsVersion', '', type=str) self.lastPath = self.settings.value('lastPath', '', type=str) self.lastDevice = self.settings.value('lastDevice', 0, type=int) @@ -1116,7 +1116,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): else: try: if eval('GUI.' + str(option)).isEnabled(): - eval('GUI.' + str(option)).setCheckState(QtCore.CheckState(self.options[option])) + eval('GUI.' + str(option)).setCheckState(Qt.CheckState(self.options[option])) except AttributeError: pass self.worker.sync() diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index be0b8bc..d8d6d97 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -627,7 +627,7 @@ def getWorkFolder(afile): path = cbx.extract(workdir) except OSError as e: rmtree(workdir, True) - raise UserWarning(e.strerror) + raise UserWarning(e) else: raise UserWarning("Failed to open source file/directory.") sanitizePermissions(path) diff --git a/kindlecomicconverter/metadata.py b/kindlecomicconverter/metadata.py index 9d60616..51ade3b 100644 --- a/kindlecomicconverter/metadata.py +++ b/kindlecomicconverter/metadata.py @@ -46,7 +46,7 @@ class MetadataParser: self.rawdata = cbx.extractMetadata() self.format = cbx.type except OSError as e: - raise UserWarning(e.strerror) + raise UserWarning(e) if self.rawdata: self.parseXML() @@ -121,5 +121,5 @@ class MetadataParser: cbx = comicarchive.ComicArchive(self.source) cbx.addFile(tmpXML) except OSError as e: - raise UserWarning(e.strerror) + raise UserWarning(e) rmtree(workdir) diff --git a/requirements.txt b/requirements.txt index add0904..ed565a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -PySide6 +PySide6>=6.5.1 Pillow>=5.2.0 psutil>=5.9.5 python-slugify>=1.2.1