Commit Graph

73 Commits

Author SHA1 Message Date
9c231d7e11 Add better page info handling
Rename set_default_page_list to apply_default_page_list and apply
 during read_metadata
Add a filename attribute to the ImageMetadata class
Mark image_index as required
Always sort the page name list, a comic application will never need the
 unsorted list of names
Assign the first result from get_cover_page_index_list to coverImage in
 CoMet tags
Allow an Archiver to be passed to the ComicArchive constructor
2023-12-18 02:37:34 -08:00
ae5e246180 Add plugin support for metadata 2023-12-17 21:47:43 -08:00
bb67ab009e Ensure that all output goes through a logger before output to the user
Adds an option to output json for CLI options
2023-12-17 15:51:43 -08:00
abfd97d915 Merge branch 'protofolius_issue_scheme' into develop 2023-10-11 17:05:27 -07:00
b6d5fe7013 Improve rar error messages 2023-10-04 19:08:17 -07:00
f6be7919d7 Implement support for protofolius's permission scheme 2023-09-06 04:50:05 -04:00
548ad4a816 Fix folder archiver
Implement supports_comment and is_writable
Fix function call in ComicArchive for supports_comment
Add a menu option to open a folder as an archive
2023-07-29 00:07:25 -07:00
31cf687e2f Reduce startup time 2023-06-22 20:11:40 -07:00
14fa70e608 Separate xlate into separate functions based on return type fixes #454 2023-04-25 15:55:27 -07:00
e70c47d12a Make PyICU optional
Update README.md
2023-04-23 00:48:11 -07:00
c1aba269a9 Revert "Make PyICU optional"
This reverts commit bf55037690.
2023-04-22 21:28:14 -07:00
bf55037690 Make PyICU optional
Fix more locale issues
Update README.md
2023-04-18 21:03:50 -07:00
2491999a33 Update copyright statements to ComicTagger Authors 2023-02-16 17:23:13 -08:00
4eb9e008ce Update pre-commit 2023-02-10 00:25:20 -08:00
2c5d419ee9 Remove legacy rar settings 2023-01-31 00:32:19 -08:00
ad48ad757c Fix plugin order 2023-01-20 19:32:32 -08:00
f6698f7f0a Call load_archive_plugins in ComicArchive __init__ 2023-01-12 17:00:11 -08:00
50614d52fc Update PyInstaller hook 2023-01-12 15:47:34 -08:00
712986ee69 Turn comicapi.archivers.* into plugins 2023-01-12 14:45:49 -08:00
2f7e3921ef Separate archivers into their own packages 2023-01-12 14:45:17 -08:00
c469fdb25e Make 7zip support optional 2022-11-06 08:27:45 -08:00
4034123e6d Fix rar tests again 2022-10-02 21:47:07 -07:00
4b6d35fd3a Fix CBL tagging 2022-10-02 19:33:12 -07:00
bc25acde9f Fix sorting
Switch natsort to use os_sorted
Remove directories when returning a list of files in a comic
Update tests to account for '!cover.jpg'
2022-09-10 19:48:50 -07:00
03677ce4b8 Fix renaming
Make ComicArchive.path always absolute
Fix unique_file not preserving the extension
Fix incorrect output when renaming in CLI mode
Fix handling of platform when renaming
2022-08-19 20:20:37 -07:00
77a53a6834 Update dependencies
Includes changes from pyupgrade
2022-08-10 20:55:46 -07:00
f2a68d6c8b Fix rename and add test 2022-07-29 22:05:03 -07:00
40314367c9 Improve formatting and consistency 2022-07-18 12:17:13 -07:00
a3e1153283 Improve rar executable handling
Show a message when a CBR/RAR archive is added and rar is not available
Ensure that an empty value for the rar executable becomes 'rar'
2022-07-10 15:21:15 -07:00
ccb461ae76 Improve rename
Implement rename on ComicArchive
Simplify unique_file with pathlib
Fix issues during renaming and simplify with pathlib
Allow exporting as zip to export 7-zip archives
2022-07-09 23:13:18 -07:00
68efcc74fb Updates
Use casefold in place of lower
Make lint job fail if errors are detected
Use join instead of utils.list_to_string
Simplify get_recursive_filelist with the glob library
Fix handling of un-parseable numbers in xlate
2022-07-01 16:22:01 -07:00
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
ce693b55f1 Fix file write semantics for Windows 2022-06-07 12:53:27 -07:00
04409a55c7 Handle more exceptions
Handle exceptions during metadata save fixes #309
Handle exceptions during metadata read fixes #126 and #309
2022-06-06 20:04:51 -07:00
e8fa51ad45 Ensure comicapi is as consistent as possible 2022-06-02 18:32:33 -07:00
fd4c453854 Apply pre-commit configuration 2022-06-02 18:32:16 -07:00
c19ed49e05 Move to argparse for argument parsing 2022-06-02 18:28:54 -07:00
d33fb6ef31 Fix build errors
Add wordninja to requirements.txt
Fix typing to allow unrar-cffi to be optional
2022-05-19 18:08:05 -07:00
4201558483 Merge branch 'wordSplit' into develop 2022-05-19 17:58:45 -07:00
3e3dcb03f9 Typed 2022-05-19 13:19:19 -07:00
205d337751 Add new filename parser
I created a new, mostly over complicated, filename parser
The new parser works well in many cases and will collect more data than
the original parser but will sometimes give odd results because of how
complicated it has been made e.g.
'100 page giant' will cause issues however '100-page giant' will not

Remove the parse scan info setting as it was not respected in many cases
2022-05-06 00:30:33 -07:00
135544c0db Code cleanup 2022-04-20 13:13:03 -07:00
0fe881df59 Code cleanup 2022-04-18 19:40:04 -07:00
49210e67c5 Fix rar_support variable 2022-04-14 16:25:25 -07:00
4f08610a28 Fix CI 2022-04-14 13:16:51 -07:00
f3095144f5 Merge branch 'feature/149-add-tests' into develop 2022-04-12 15:20:58 -07:00
6da177471b Fix #242
Fix file encoding inconsistencies, windows defaults to cp1252, which is
not Unicode compatible.
Add logging for all exceptions in the comicapi package
Ensure that all exceptions are logged and shown to the user
2022-04-11 14:52:41 -07:00
c50cef568e Add basic logging 2022-04-04 19:10:22 -07:00
593f568ea7 method renamed to match new changes. 2022-04-03 15:39:03 -04:00
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