65 Commits
Author SHA1 Message Date
timmy 9f5275a29e Fix a crash when fetching images during auto-tag in the gui
CI / lint (ubuntu-latest, 3.9) (push) Waiting to run
CI / build-and-test (macos-11, 3.9) (push) Waiting to run
CI / build-and-test (ubuntu-latest, 3.9) (push) Waiting to run
CI / build-and-test (windows-latest, 3.9) (push) Waiting to run
2026-08-16 13:06:44 -07:00
timmy 0f82ec8340 Merge branch 'bump-settngs' into develop 2026-08-16 13:06:44 -07:00
timmy bbe6891d54 Merge branch 'mizaki/settings_encoder' into develop 2026-08-16 13:05:46 -07:00
timmy 08d6ee2346 Add a filename parser preview in settings 2026-08-15 13:42:50 -07:00
timmy 0727c4f11e Fix issue padding validation fixes #513 2026-08-15 13:42:50 -07:00
timmy df9d1f5c23 Fix generation and saving of talker settings fixes #515 #514 2026-08-15 13:42:50 -07:00
timmy c367695477 Merge branch 'protofolius_issue_scheme' into develop
Ensure FilenameInfo is always filled out fixes #556
2026-08-15 13:42:50 -07:00
timmy 4351f929e5 Update setting group names
Make group names presentable to users and add builtin plugins during namespace generation.
Revamp talkeruigenerator.py to use generated group and setting names and remove as many hard-coded strings as possible
Add a --list-plugins commandline option
2026-08-15 13:42:50 -07:00
timmy ec40116398 Use importlib.resources instead of __file__ 2026-08-15 13:42:50 -07:00
timmy 47be75375c Convert ComicIssue into GenericMetadata
I could not find a good reason for ComicIssue to exist other than that
 it had more attributes than GenericMetadata, so it has been replaced.
New attributes for GenericMetadata:
  series_id:        a string uniquely identifying the series to tag_origin
  series_aliases:   alternate series names that are not the canonical name
  title_aliases:    alternate issue titles that are not the canonical name
  alternate_images: a list of urls to alternate cover images

Updated attributes for GenericMetadata:
  genre        -> genres:        str -> list[str]
  comments     -> description:   str -> str
  story_arc    -> story_arcs:    str -> list[str]
  series_group -> series_groups: str -> list[str]
  character    -> characters:    str -> list[str]
  team         -> teams:         str -> list[str]
  location     -> locations:     str -> list[str]
  tag_origin   -> tag_origin:    str -> TagOrigin (tuple[str, str])

ComicSeries has been relocated to the ComicAPI package, currently has no
 usage within ComicAPI.
CreditMetadata has been renamed to Credit and has replaced Credit from
 ComicTalker.
fetch_series has been added to ComicTalker, this is currently only used
 in the GUI when a series is selected and does not already contain the
 needed fields, this function should always be cached.

A new split function has been added to ComicAPI, all uses of split on
 single characters have been updated to use this

cleanup_html and the corresponding setting are now only used in
 ComicTagger proper, for display we want any html directly from the
 upstream. When applying the metadata we then strip the description of
 any html.

A new conversion has been added to the MetadataFormatter:
  j: joins any lists into a string with ', '. Note this is a valid
     operation on strings as well, it will add ', ' in between every
     character.

parse_settings now assigns the given ComicTaggerPaths object to the
 result ensuring that the correct path is always used.

Add test for split

Fix attribute names

Fix cbr tests
2026-08-15 13:39:46 -07:00
timmy 4fdb49a5cd Update settngs to typed version fixes #453
Generate a namespace object for typing settngs
2026-08-15 13:39:46 -07:00
timmy fb176a272c Fix talker settings validation settings window 2026-08-15 13:39:46 -07:00
timmy 1c1de5bd99 Merge branch 'mizaki-talker_settings_generator' into develop
Merge branch 'mizaki-talkeruigen_fix' into develop
2026-08-15 13:39:46 -07:00
timmy 0ab55da52e Update plugin settings
Make "runtime" a persistent group, allows normalizing without losing validation
Simplify archiver setting generation
Generate options for setting a url and key for all talkers
Return validated talker settings
Require that the talker id must match the entry point name
Add api_url and api_key as default attributes on talkers
Add default handling of api_url and api_key to register_settings
Update settngs to 0.6.2 to be able to add settings to a group and
  use the display_name attribute
Error if no talkers are loaded
Update talker entry point to comictagger.talker

Merge branch 'mizaki-talker_parse_key' into develop

Fix fix_url

Add tests for fix_url

Fix talker settings validation
2026-08-15 13:39:46 -07:00
timmy 60e3497818 Automate contributions
docs(contributor): contrib-readme-action has updated readme

Update AUTHORS

Update copyright statements to ComicTagger Authors

Update AUTHORS

Restrict contributions updates to only run on pushes to develop

Fix actions failure when there are no new contributors
2026-08-15 13:39:46 -07:00
timmy bcff17b081 Merge branch 'talker-cleanup' into develop 2026-08-15 13:39:46 -07:00
timmy 4a3194cb85 Merge branch 'settings-consistency' into develop 2026-08-15 13:39:46 -07:00
timmy cf4e940360 Merge branch 'mizaki-talker_settings' into develop 2026-08-15 13:39:46 -07:00
timmy a9a81a9c65 Turn comicapi.archivers.* into plugins 2026-08-15 13:39:46 -07:00
timmy 2951dc40b9 Merge branch 'settings' into develop
Merge branch 'mizaki-rename_namespace_fix' into develop
2026-08-15 13:39:46 -07:00
timmy 81ee456fe7 Merge branch 'mizaki-infosources' into dev
Fix tests

Stop setting the notes field in map_comic_issue_to_metadata

Make errors loading the ComicVineTalker object explicit

Re-add --only-set-cv-key feature

Cleanup

Move most options passed in to ComicVineTalker to ComicTalker
Give ComicCacher and ComicTalker a version argument to remove all
  references to comictaggerlib
Update default arguments to reflect what is required to use these classes
2026-08-15 13:39:46 -07:00
timmy 2d7a434460 fixup whitespace gui 2026-08-15 10:29:26 -07:00
timmy aad83c8c03 Update PyInstaller usage
Switch to rapidfuzz from thefuzz
Add associations to macOS app bundle
2022-10-25 21:48:01 -07:00
timmy 94be266e17 Handle the 'primary' key missing in get_primary_credit
Fixes #342
Add better exception handling for the formatter
2022-07-27 23:24:34 -07:00
timmy 40314367c9 Improve formatting and consistency 2022-07-18 12:17:13 -07:00
timmy 947dc81c74 use thefuzz
use thefuzz

use thefuzz
2022-07-13 23:11:17 -07:00
timmy 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
timmy 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
Mizaki b72fcaa9a9 Add source field to cache DB.
Add source to cache db.

Rename comicvinecacher to comiccacher and update refs.

Fix comment spacing.

Move source_name to end to reduce changes.

Move source_name to end to reduce changes. Fixed.

Fix syntax.

Fix various issues with DB changes.

Move new source_name to bottom.

Remove source_name from CV_.

Revert id to volume_id
2022-07-05 11:29:10 -07:00
timmy 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
timmy 95643fdace Fix community rating
The user rating control is replaced with critical rating which is now
represented as a float.
utils.xlate has been updated to have an is_float parameter
Metadata is reloaded on save so that changes can be seen
e.g. for CBL tags the critical rating field only stores integers
2022-06-23 13:18:42 -07:00
timmy d9c02b0115 Allow changing the ComicVine URL fixes #104 2022-06-10 15:23:58 -07:00
timmy 4c9fa4f716 Update template help and default template 2022-06-02 18:32:41 -07:00
timmy fd4c453854 Apply pre-commit configuration 2022-06-02 18:32:16 -07:00
timmy c5772c75e5 Cleanup setCheckState
Fix word splitting when auto-tagging
Remove commented code
2022-05-24 11:38:10 -07:00
timmy 3e3dcb03f9 Typed 2022-05-19 13:19:19 -07:00
timmy 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
timmy 049971a78a Merge branch 'removeRenamer' into develop 2022-04-29 23:29:24 -07:00
timmy 052e95e53b Remove old file renamer
Use PureWindowsPath objects in templates and tests, this allows both
path separators to be used and compared regardless of platform
2022-04-29 23:27:58 -07:00
MichaelFitzurka 84b762877f Changes as per comments 2022-04-27 10:15:53 -04:00
MichaelFitzurka 552a319298 Adding CommunityRating. fitxes #258 2022-04-22 09:39:32 -04:00
timmy 135544c0db Code cleanup 2022-04-20 13:13:03 -07:00
timmy f18513fd0e Fix Template help 2022-04-19 00:44:29 -07:00
timmy 7037877a77 Add a strict mode to file renaming
Strict renaming removes all reserved names and characters regardless
 of operating system, with out strict mode only for the current
 Operating System
Add more edge cases to smart cleanup
Add more tests for file renaming
2022-04-18 22:55:13 -07:00
timmy 6cccf22d54 Allow switching between old and new rename templates
Show a message dialog explaining that there is a new template format
Add a dynamic label to show the effect of a rename
Add tests for FileRenamer
Remove the filename parameter from the determine_name function
2022-04-18 20:12:20 -07:00
timmy 028b728d82 Improve file renaming
Moves to Python format strings for renaming, handles directory
structures, moving of files to a destination directory, sanitizes
file paths with pathvalidate and takes a different approach to
smart filename cleanup using the Python string.Formatter class

Moving to Python format strings means we can point to python
documentation for syntax and all we have to do is document the
properties and types that are attached to the GenericMetadata class.

Switching to pathvalidate allows comictagger to more simply handle both
directories and symbols in filenames.

The only changes to the string.Formatter class is:
1. format_field returns
an empty string if the value is none or an empty string regardless of
the format specifier.
2. _vformat drops the previous literal text if the field value
is an empty string and lstrips the following literal text of closing
special characters.
2022-04-18 18:52:53 -07:00
timmy c50cef568e Add basic logging 2022-04-04 19:10:22 -07:00
timmy 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 b62e291749 Cleanup settings from #200
Rename blacklist to filter to be more accurate
2022-01-22 15:00:22 -08:00
thFrgttn a66b5ea0e3 Series sorting filtering (#200)
Because additional series results are now returned due to #143 the series selection window can with a large number of results that are not usually sorted in a useful way.

I've created 3 settings that can help finding the corect series quickly

use the publisher black list - can be toggled from the series selction screen, as well as a setting for is default behaviour
a setting to make the result initially sorted by start year instead of the default no of issues
a setting to initially put exact and near matches at the top of the list
2022-01-22 14:40:45 -08:00