Commit Graph

51 Commits

Author SHA1 Message Date
Timmy Welch
19112ac79b
Update Settings 2022-12-06 00:20:01 -08:00
Timmy Welch
ff73cbf2f9 Fix small issues
Fix spelling errors
Remove Redundant exception types
Remove dead code
Change the forum link to point to GitHub discussions
2022-06-07 20:22:33 -07:00
Timmy Welch
fd4c453854 Apply pre-commit configuration 2022-06-02 18:32:16 -07:00
lordwelch
3e3dcb03f9 Typed 2022-05-19 13:19:19 -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
Timmy Welch
95d167561d Fix locale for macOS 2022-03-20 02:10:11 -07:00
davide-romanini
91f82fd6d3
Python3 and QT5 upgrade (#109)
* Tweaked search string based on new comic vine search behavior
Placated Beaufitul Soup by passing the parser

* First cut at porting to Python 3 and PyQt5

* remove debug print

* tweaked progress dialog handling for issues on ubuntu gui

* Handle bad key more gracefullu

* More integration of unrarlib into settings and rest of app

* Better handling of "personal" unrar lib setting

* PEP 440-compliant version string

* Tuned linux rar help strings

* Got setup working again
* Attempts to build unrar on install
* Some minimal desktop integration on various platforms

* Fix wrong shortfile

* More setup.py enhancements
* Use proper temp file
* Added comment block at top

* Comment out desktop integration attempt for now

* Updated some links and info

* Fixed the html a bit

* Repaired some images that caused libpng to complain

* update readme re:  py3qt5 branch changes

* another note

* #108 feat: try to simplify windows build using only pip and python3

* #108 feat: fix python location on appveyor (try 1)

* #108 feat: use venv (try 2)

* #108 feat: use venv (try 3)

* #108 feat: update to latest pyinstaller develop branch

* #108 feat: update to latest pyinstaller develop branch (again)

* #108: add ssl libraries for windows packaging

* #108: refresh env in win build to pick the right mingw

* #108: change order of win build script operations

* #113: fix subprocess usage in pyinstaller package

* bump version
2018-09-19 22:05:39 +02:00
davide-romanini
a7288a94cc
#98 Multiplatform pyinstaller dist (#99)
Multiplatform pyinstaller dist (#98)
2018-01-14 16:41:27 +01: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
fcanc
22dbafbc00 Code cleanup, round 1
Some formatting cleanup, plus print modernization, & typos correction.
2015-02-14 00:08:07 +01:00
fcanc
0df283778c Indentation
Replaced tabs with spaces, and removed some trailing spaces.
2015-02-12 23:57:46 +01:00
beville@gmail.com
f59f5fe981 use env command to launch python
git-svn-id: http://comictagger.googlecode.com/svn/trunk@528 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-24 19:04:43 +00:00
beville@gmail.com
464e147223 back to "ctmain"
git-svn-id: http://comictagger.googlecode.com/svn/trunk@508 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-15 00:23:54 +00:00
beville@gmail.com
2d4ac84de0 app main entry point is now called "main"
git-svn-id: http://comictagger.googlecode.com/svn/trunk@492 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-13 21:55:00 +00:00
beville
c519fd33d5 fixed a bug in windows filename arg list processing
git-svn-id: http://comictagger.googlecode.com/svn/trunk@482 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-12 04:52:51 +00:00
beville@gmail.com
811759478a Function dist install on linux
git-svn-id: http://comictagger.googlecode.com/svn/trunk@457 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-07 04:19:20 +00:00
beville@gmail.com
10e6a1019e First cut at a dist-package build
git-svn-id: http://comictagger.googlecode.com/svn/trunk@454 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-07 02:39:36 +00:00
beville@gmail.com
2024555780 restructure - done, I think
git-svn-id: http://comictagger.googlecode.com/svn/trunk@453 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-07 01:20:05 +00:00
beville@gmail.com
e15c3fa3e6 restructure - almost there!
git-svn-id: http://comictagger.googlecode.com/svn/trunk@452 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-07 01:12:49 +00:00
beville@gmail.com
7d9aa70dc0 restructure
git-svn-id: http://comictagger.googlecode.com/svn/trunk@447 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-06 22:05:46 +00:00
beville@gmail.com
dfe0e74f9c Refactored code for restructure
git-svn-id: http://comictagger.googlecode.com/svn/trunk@444 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-06 22:03:53 +00:00
beville@gmail.com
50909962d3 Implemented export to zip on command line
git-svn-id: http://comictagger.googlecode.com/svn/trunk@430 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-06 00:14:37 +00:00
beville@gmail.com
5bdc40b9f5 Make sure to change codec for stderror too
git-svn-id: http://comictagger.googlecode.com/svn/trunk@428 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-05 22:47:45 +00:00
beville@gmail.com
4f3e63db07 Make a lot of print statements go to stderr
git-svn-id: http://comictagger.googlecode.com/svn/trunk@427 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-05 22:27:35 +00:00
beville
ccde71f9d0 fixed mac text encoding at always utf-8
git-svn-id: http://comictagger.googlecode.com/svn/trunk@348 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-25 06:14:51 +00:00
beville
221923607a Auto-Tag progress window added
More auto-tag and other stuff

git-svn-id: http://comictagger.googlecode.com/svn/trunk@322 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-22 04:09:08 +00:00
beville
d26441306a Added setting for rename to use the archive type
git-svn-id: http://comictagger.googlecode.com/svn/trunk@318 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-21 01:07:45 +00:00
beville@gmail.com
cfca394bcb More work on managing mutiple files in the GUI
git-svn-id: http://comictagger.googlecode.com/svn/trunk@310 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-18 00:52:42 +00:00
beville@gmail.com
8f45994b9a Added a CLI option for searching by CV issue ID, that can be used when being called by Mylar
git-svn-id: http://comictagger.googlecode.com/svn/trunk@299 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-12 01:48:34 +00:00
beville
8a8e53d9c9 A lot of unicode related fixes
git-svn-id: http://comictagger.googlecode.com/svn/trunk@289 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-30 05:06:12 +00:00
beville
ee9175087e Implemented file-renaming in GUI
git-svn-id: http://comictagger.googlecode.com/svn/trunk@273 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-19 01:37:55 +00:00
beville@gmail.com
0017903a4f Got CBL transformer working
git-svn-id: http://comictagger.googlecode.com/svn/trunk@270 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-17 21:19:21 +00:00
beville@gmail.com
3d98118fa9 Added option set CV series start year as volume
git-svn-id: http://comictagger.googlecode.com/svn/trunk@269 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-17 18:44:33 +00:00
beville
a602c42f0e new file renamer class
git-svn-id: http://comictagger.googlecode.com/svn/trunk@263 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-15 05:54:12 +00:00
beville@gmail.com
487c8a5bf4 Page list management work
git-svn-id: http://comictagger.googlecode.com/svn/trunk@238 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-08 19:57:51 +00:00
beville
ab5d8599ac Added interactive CLI session after batch saving
git-svn-id: http://comictagger.googlecode.com/svn/trunk@228 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-06 04:46:01 +00:00
beville@gmail.com
c814436899 Make sure to check writable on copy operation
git-svn-id: http://comictagger.googlecode.com/svn/trunk@222 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-05 22:15:43 +00:00
beville@gmail.com
a970ed0e36 Added tag copy copy to CLI
Added --nooverwrite option for save and copy on CLI

git-svn-id: http://comictagger.googlecode.com/svn/trunk@220 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-05 19:28:16 +00:00
beville@gmail.com
117d8d8998 Added "assume lone credit is primary" to the UI
git-svn-id: http://comictagger.googlecode.com/svn/trunk@207 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-05 00:51:30 +00:00
beville
f040f8dc74 Added a terse mode for only printing the page count and tags block types
git-svn-id: http://comictagger.googlecode.com/svn/trunk@201 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-04 05:27:32 +00:00
beville
3c2f4fa662 work on CLI mode for better output when batch processing
git-svn-id: http://comictagger.googlecode.com/svn/trunk@199 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-04 04:02:16 +00:00
beville
32aabb100b Renaming now can use filename, or specified metadata
Added an issuestring parser for complex issue numbers with suffixes

git-svn-id: http://comictagger.googlecode.com/svn/trunk@194 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-04 01:16:58 +00:00
beville@gmail.com
deeeef90a6 First cut at CoMet support
git-svn-id: http://comictagger.googlecode.com/svn/trunk@192 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-02 20:17:39 +00:00
beville@gmail.com
ad19daceb3 Removed debug print
git-svn-id: http://comictagger.googlecode.com/svn/trunk@177 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 06:03:15 +00:00
beville
e776d2fd3b Added actual file renaming
git-svn-id: http://comictagger.googlecode.com/svn/trunk@167 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 03:21:05 +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
7838710ed4 Added network communication exception handling
git-svn-id: http://comictagger.googlecode.com/svn/trunk@114 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-28 20:15:20 +00:00
beville@gmail.com
146d15ee1c Added some exception handling for file write operations
git-svn-id: http://comictagger.googlecode.com/svn/trunk@108 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-28 00:33:51 +00:00
beville@gmail.com
21154e884f First pass at file naming via CLI
git-svn-id: http://comictagger.googlecode.com/svn/trunk@98 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-27 18:55:31 +00:00
beville@gmail.com
9cf0de52bc More tweaks for running w/o pyqt
git-svn-id: http://comictagger.googlecode.com/svn/trunk@95 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-27 18:14:53 +00:00