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-01 16:50:46 -07:00
|
|
|
---------------------------------
|
|
|
|
1.1.16-beta-rc - 07-Apr-2017
|
|
|
|
---------------------------------
|
|
|
|
* Fix ComicVine SSL problems (issue #87)
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.15-beta - 13-Jun-2014
|
|
|
|
---------------------------------
|
|
|
|
* WebP support
|
|
|
|
* Added user-configurable API key for Comic Vine access
|
|
|
|
* Experimental option to wait and retry after exceeding Comic Vine rate limit
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.14-beta - 13-Apr-2014
|
|
|
|
---------------------------------
|
|
|
|
* Make sure app gets raised when enforcing single instance
|
|
|
|
* Added warning dialog for when opening rar files, and no (un)rar tool
|
|
|
|
* remove pil from python package requirements
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.13-beta - 9-Apr-2014
|
|
|
|
---------------------------------
|
|
|
|
* Handle non-ascii user names properly
|
|
|
|
* better parsing of html table in summary text, and optional removal
|
|
|
|
* Python package should auto-install requirements
|
|
|
|
* Specify default GUI tag style on command-line
|
|
|
|
* enforce single GUI instance
|
|
|
|
* new CBL transform to copy story arcs to generic tags
|
|
|
|
* Persist some auto-tag settings
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.12-beta - 23-Mar-2014
|
|
|
|
---------------------------------
|
|
|
|
* Fixed noisy version update error
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.11-beta - 23-Mar-2014
|
|
|
|
---------------------------------
|
|
|
|
* Updated unrar library to hand Rar tools 5.0 and greater
|
|
|
|
* Other misc bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.10-beta - 30-Jan-2014
|
|
|
|
---------------------------------
|
|
|
|
* Updated series query to match changes on Comic Vine side
|
|
|
|
* Added a message when not able to open a file or folder
|
|
|
|
* Fixed an issue where series names with periods would fail on search
|
|
|
|
* Other misc bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.9-beta - 8-May-2013
|
|
|
|
---------------------------------
|
|
|
|
* Filename parser and identification enhancements
|
|
|
|
* Misc bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.8-beta - 21-Apr-2013
|
|
|
|
---------------------------------
|
|
|
|
* Handle occasional error 500 from Comic Vine by retrying a few times
|
|
|
|
* Nicer handling of colon (":") in file rename
|
|
|
|
* Fixed command-line option parsing issue for add-on scripts
|
|
|
|
* Misc bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.7-beta - 12-Apr-2013
|
|
|
|
---------------------------------
|
|
|
|
* Added description and cover date to issue selection dialogs
|
|
|
|
* Added notification of new version
|
|
|
|
* Added setting to attempt to parse scan info from file name
|
|
|
|
* Last sorted column in the file list is now remembered
|
|
|
|
* Added CLI option ('-1') to assume issue #1 if not found/parsed
|
|
|
|
* Misc bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.6-beta - 3-Apr-2013
|
|
|
|
---------------------------------
|
|
|
|
* More ComicVine API-related fixes
|
|
|
|
* More efficient automated search using new CV API issue filters
|
|
|
|
* Minor bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.5-beta - 30-Mar-2013
|
|
|
|
---------------------------------
|
|
|
|
* More updates for handling changes to ComicVine API and result sets
|
|
|
|
* Even better handling of non-numeric issue "numbers" ("½", "X")
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.4-beta - 27-Mar-2013
|
|
|
|
---------------------------------
|
|
|
|
* Updated to match the changes to the ComicVine API and result sets
|
|
|
|
* Better handling of weird issue numbers ("0.1", "6au")
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.3-beta - 25-Feb-2013
|
|
|
|
---------------------------------
|
|
|
|
Bug Fixes:
|
|
|
|
* Fixed a bug when renaming on non-English systems
|
|
|
|
* Fixed issue when saving settings on non-English systems
|
|
|
|
* Fixed a bug when comic contains non-RGB images
|
|
|
|
* Fixed a rare crash when comic image is not-RGB format
|
|
|
|
* Fixed sequence order of ComicInfo.xml items
|
|
|
|
|
|
|
|
Note:
|
|
|
|
New requirement for users of the python package: "configparser"
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.2-beta - 14-Feb-2013
|
|
|
|
---------------------------------
|
|
|
|
Changes:
|
|
|
|
* Source is now packaged using Python distutils
|
|
|
|
* Recursive mode for CLI
|
|
|
|
* Run custom add-on scripts from CLI
|
|
|
|
* Minor UI tweaks
|
|
|
|
* Misc bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.1.0-beta - 06-Feb-2013
|
|
|
|
---------------------------------
|
|
|
|
Changes:
|
|
|
|
* Enhanced identification process to use alternative covers from ComicVine
|
|
|
|
* Post auto-tag manual matching now includes single low-confidence matches (CLI & GUI)
|
|
|
|
* Page and cover view mini-browser available throughout app. Most images can be
|
|
|
|
double-clicked for enlarged view
|
|
|
|
* Export-to-zip in CLI (very handy in scripts!)
|
|
|
|
* More rename template variables
|
|
|
|
* Misc GUI & CLI Tweaks
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.0.3-beta - 31-Jan-2013
|
|
|
|
---------------------------------
|
|
|
|
Changes:
|
|
|
|
Misc bug fixes and enhancements
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.0.2-beta - 25-Jan-2013
|
|
|
|
---------------------------------
|
|
|
|
Changes:
|
|
|
|
More verbose logging during auto-tag
|
|
|
|
Added %month% and %month_name% for renaming
|
|
|
|
Better parsing of volume numbers in file name
|
|
|
|
Bugs:
|
|
|
|
Better exception handling with corrupted image data
|
|
|
|
Fixed issues with RAR reading on OS X
|
|
|
|
Other minor bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.0.1-beta - 24-Jan-2013
|
|
|
|
---------------------------------
|
|
|
|
Bug Fix:
|
|
|
|
Fixed an issue where unicode strings can't be printed to OS X Console
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
1.0.0-beta - 23-Jan-2013
|
|
|
|
---------------------------------
|
|
|
|
Version 1! New multi-file processing in GUI!
|
|
|
|
|
|
|
|
GUI Changes:
|
|
|
|
Open multiple files and/or folders via drag/drop or file dialog
|
|
|
|
File management list for easy viewing and selection
|
|
|
|
Batch tag remove
|
|
|
|
Batch export as zip
|
|
|
|
Batch rename
|
|
|
|
Batch tag copy
|
|
|
|
Batch auto-tag (automatic identification and save!)
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
0.9.5-beta - 16-Jan-2013
|
|
|
|
---------------------------------
|
|
|
|
Changes:
|
|
|
|
Added CLI option to search by Comic Vine issue ID
|
|
|
|
Some image loading optimizations
|
|
|
|
Bug Fix: Some CBL fields that should have been ints were written as strings
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
0.9.4-beta - 7-Jan-2013
|
|
|
|
---------------------------------
|
|
|
|
Changes:
|
|
|
|
Better handling of non-ascii characters in file names and data
|
|
|
|
Add CBL Transform to copy Web Link and Notes to comments
|
|
|
|
Minor bug fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
0.9.3-beta - 19-Dec-2012
|
|
|
|
---------------------------------
|
|
|
|
Changes:
|
|
|
|
File rename in GUI
|
|
|
|
Setting for file rename
|
|
|
|
Option to use series start year as volume
|
|
|
|
Added "CBL Transform" to handle primary credits copying data into the generic tags field
|
|
|
|
Bug Fix: unicode characters in credits caused crash
|
|
|
|
Bug Fix: bad or non-image data in file caused crash
|
|
|
|
|
|
|
|
Note:
|
|
|
|
The user should clear the cache and delete the existing settings when first running this version.
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
0.9.2-beta - 13-Dec-2012
|
|
|
|
---------------------------------
|
|
|
|
Page List/Type editing in GUI
|
|
|
|
File globbing for windows CLI (i.e. use of wildcards like '*.cbz')
|
|
|
|
Fixed RAR writing bug on windows
|
|
|
|
Minor bug and crash fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
0.9.1-beta - 07-Dec-2012
|
|
|
|
---------------------------------
|
|
|
|
Export as ZIP Archive
|
|
|
|
Added help menu option for websites
|
|
|
|
Added Primary Credit Flag editing
|
|
|
|
Menu enhancements
|
|
|
|
CLI Enhancements:
|
|
|
|
Interactive selection of matches
|
|
|
|
Tag copy
|
|
|
|
Better output
|
|
|
|
CoMet support
|
|
|
|
Minor bug and crash fixes
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
0.9.0-beta - 30-Nov-2012
|
|
|
|
---------------------------------
|
|
|
|
Initial beta release
|