Commit Graph

24 Commits

Author SHA1 Message Date
Timmy Welch
fd4c453854 Apply pre-commit configuration 2022-06-02 18:32:16 -07:00
Timmy Welch
e10f7dd7a7 Code cleanup
Remove no longer used google scripts
Remove convenience files from comicataggerlib and import comicapi directly
Add type-hints to facilitate auto-complete tools
Make PyQt5 code more compatible with PyQt6

Implement automatic tooling
isort and black for code formatting
Line length has been set to 120
flake8 for code standards with exceptions:
E203 - Whitespace before ':'  - format compatiblity with black
E501 - Line too long          - flake8 line limit cannot be set
E722 - Do not use bare except - fixing bare except statements is a
                                lot of overhead and there are already
                                many in the codebase

These changes, along with some manual fixes creates much more readable code.
See examples below:

diff --git a/comicapi/comet.py b/comicapi/comet.py
index d1741c5..52dc195 100644
--- a/comicapi/comet.py
+++ b/comicapi/comet.py
@@ -166,7 +166,2 @@ class CoMet:

-            if credit['role'].lower() in set(self.editor_synonyms):
-                ET.SubElement(
-                    root,
-                    'editor').text = "{0}".format(
-                    credit['person'])

@@ -174,2 +169,4 @@ class CoMet:
         self.indent(root)
+            if credit["role"].lower() in set(self.editor_synonyms):
+                ET.SubElement(root, "editor").text = str(credit["person"])

diff --git a/comictaggerlib/autotagmatchwindow.py b/comictaggerlib/autotagmatchwindow.py
index 4338176..9219f01 100644
--- a/comictaggerlib/autotagmatchwindow.py
+++ b/comictaggerlib/autotagmatchwindow.py
@@ -63,4 +63,3 @@ class AutoTagMatchWindow(QtWidgets.QDialog):
             self.skipButton, QtWidgets.QDialogButtonBox.ActionRole)
-        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(
-            "Accept and Write Tags")
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Ok).setText("Accept and Write Tags")

diff --git a/comictaggerlib/cli.py b/comictaggerlib/cli.py
index 688907d..dbd0c2e 100644
--- a/comictaggerlib/cli.py
+++ b/comictaggerlib/cli.py
@@ -293,7 +293,3 @@ def process_file_cli(filename, opts, settings, match_results):
                 if opts.raw:
-                    print((
-                        "{0}".format(
-                            str(
-                                ca.readRawCIX(),
-                                errors='ignore'))))
+                    print(ca.read_raw_cix())
                 else:
2022-04-02 14:21:37 -07:00
lordwelch
aedc5bedb4 Update build
Separate dependencies into files and add optional dependencies
Update natsort usage to be compliant with the latest version (#203)
Set PyQt5 to 5.15.3, 5.15.4 has issues with pyinstaller
Add pyproject.toml with setuptools, isort and black configuration
Add optional dependencies (#191)
Update README (#174)
2021-10-23 21:39:58 -07:00
davide-romanini
cec585f8e0
Changed: use unrar-cffi for cbr handling (#151) 2019-10-05 23:59:52 +02:00
Davide Romanini
06ff25550e use setuptools_scm to handle version 2019-09-28 14:59:36 +02:00
davide-romanini
d0918c92e4
#87 Update comic vine url and ssl config (#93)
* #87 fix ssl comicvine communication

* handle missing libunrar. update macos makefile. remove version check window. bump version.

* update release notes

* #87 fix ssl context in several places. update comicvine api url.

* fix drag and drop issues on macOS

* bump version to 1.1.16-beta-rc2

* use PNG conversion for Windows build
2017-12-21 15:19:45 +01:00
beville
08cc4a1acb Use pip-installed pyinstaller
git-svn-id: http://comictagger.googlecode.com/svn/trunk@732 6c5673fe-1810-88d6-992b-cd32ca31540c
2014-06-13 06:25:35 +00:00
beville
57c1efdab9 makefile TAGGER_BASE can be set in the environment
git-svn-id: http://comictagger.googlecode.com/svn/trunk@649 6c5673fe-1810-88d6-992b-cd32ca31540c
2014-01-31 04:43:22 +00:00
beville
cbe3f5a2dc some commented out lines for building on 64-bit snow leopard
git-svn-id: http://comictagger.googlecode.com/svn/trunk@533 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-25 07:01:42 +00:00
beville@gmail.com
ab3e3b40c4 Added a script to thin out fat binaries
git-svn-id: http://comictagger.googlecode.com/svn/trunk@526 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-21 22:40:00 +00:00
beville@gmail.com
188024c2db Make sure the mac bundle Info.plist has the version string set
git-svn-id: http://comictagger.googlecode.com/svn/trunk@524 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-19 22:15:24 +00:00
beville@gmail.com
c2ff11fab7 make sure the release folder always exists during build process
git-svn-id: http://comictagger.googlecode.com/svn/trunk@474 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-08 22:14:18 +00:00
beville@gmail.com
fa309cfcef Got mac build working with new structure
git-svn-id: http://comictagger.googlecode.com/svn/trunk@461 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-07 17:35:25 +00:00
beville@gmail.com
584f78bc3c Added a link to Applications folder in the Mac DMG
git-svn-id: http://comictagger.googlecode.com/svn/trunk@252 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-12 23:23:08 +00:00
beville
7eb8ad6824 release notes in windows installer
makefiles push installer to release folder

git-svn-id: http://comictagger.googlecode.com/svn/trunk@173 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 05:30:03 +00:00
beville
b838b8df65 repaired the mac dmg icon
git-svn-id: http://comictagger.googlecode.com/svn/trunk@171 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 05:28:47 +00:00
beville@gmail.com
c445cdddd9 Lots of lil fixes
git-svn-id: http://comictagger.googlecode.com/svn/trunk@166 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 02:14:06 +00:00
beville@gmail.com
391986b322 some minor fixes to mac makefile
git-svn-id: http://comictagger.googlecode.com/svn/trunk@107 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-27 23:20:50 +00:00
beville@gmail.com
e37612ffeb Renamed tagger.py to comictagger.py
Added check for Qt libs, and run in CLI-only mode if not found

git-svn-id: http://comictagger.googlecode.com/svn/trunk@90 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-27 17:59:08 +00:00
beville@gmail.com
85d1eaa18a some tweaks to mac makefile
git-svn-id: http://comictagger.googlecode.com/svn/trunk@71 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-20 19:20:02 +00:00
beville@gmail.com
8202c97ad3 Some visual tweaks
git-svn-id: http://comictagger.googlecode.com/svn/trunk@69 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-20 17:26:15 +00:00
beville@gmail.com
318a1dd23b update package makes for graphic locations
git-svn-id: http://comictagger.googlecode.com/svn/trunk@52 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-16 22:42:47 +00:00
beville@gmail.com
cd39847aa8 Get the version from py file for dmg build
git-svn-id: http://comictagger.googlecode.com/svn/trunk@45 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-15 07:38:42 +00:00
beville@gmail.com
448e2a9d89 Got mac freeze and packaging working
git-svn-id: http://comictagger.googlecode.com/svn/trunk@34 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-13 21:25:15 +00:00