79 Commits
Author SHA1 Message Date
timmy 3caac771e1 Replace pycountry with isocodes
isocodes is updated more often and doesn't depend on deprecated packages
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 da8237284b Merge branch 'mizaki-gmd_list_set' into develop 2026-08-15 13:42:50 -07:00
timmy b905d837b1 Simplify ComicCacher to store a single binary data field and ID(s)
If the ComicCacher is to be a generic cache for talkers it must assume
 very little. Current assumptions:
 - There are issues that can be queried individually by an "Issue ID" and they have a relation to a single series
 - There are series that can be queried individually by an "Series ID" and they have a relation to zero or more issues
 - There are Searches that can be queried by the search term and they have a relation to zero or more series

Each series and issue have a boolean `complete` attribute which is up to the talker to decide what it means.
Data is returned as a tuple ([series, complete] or [issue, complete]) or a list of tuples
An issue consists of an ID, an series ID and a binary data attribute which is up to the talker to determine what it means.
An series consists of in ID and a binary data attribute which is up to the talker to determine what it means.

The data attribute is binary to allow for compression and efficient storage of binary data (e.g. pickle) it is suggested to store it as json or similar text format encoded with utf-8. If the talker is using a website API it is suggested to store the raw response from the server.

All caches automatically expire 7 days after insertion.
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 1293673622 Fix tests taking forever caused by f90f373d20 2026-08-15 13:39:46 -07:00
timmy 1fe8de593b Separate xlate into separate functions based on return type fixes #454
Strip strings during xlate
2026-08-15 13:39:46 -07:00
timmy 0200b0f33a Revert get_recursive_filelist Fixes #449 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 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 41142df0cb Make PyICU optional
Update README.md

Reduce startup time natsort
2026-08-15 13:39:46 -07:00
timmy b482df6183 Reduce startup time - v1 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 693c344cc1 Merge branch 'crop-border' into develop 2026-08-15 13:39:46 -07:00
timmy bba70aa98b Tidy Issue Identifier
Switch comictalker TypedDicts to dataclasses
Stop using thumb image
2026-08-15 13:39:46 -07:00
timmy d44ac65085 Change series id to strings 2026-08-15 13:39:46 -07:00
timmy 5c88cf8a96 Change issue id to strings 2026-08-15 13:39:46 -07:00
timmy d05075b593 Merge branch 'volume-to-series' into develop
fixup series
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 6cf25d5e69 fixup whitespace test 2026-08-15 11:51:53 -07:00
timmy c5a5fc8bdb Fix issue with combine_notes 2022-11-24 01:24:15 -08:00
timmy c469fdb25e Make 7zip support optional 2022-11-06 08:27:45 -08:00
timmy 685ce014b6 Fix tests for comicvinetalker 2022-11-04 16:27:30 -07:00
timmy d55d75cd79 Append notes instead of overwriting them
Add issue_id to GenericMetadata
2022-11-04 15:39:40 -07:00
timmy 4034123e6d Fix rar tests again 2022-10-02 21:47:07 -07:00
timmy 5587bfac31 Fix rar tests 2022-10-02 21:13:26 -07:00
timmy 4b6d35fd3a Fix CBL tagging 2022-10-02 19:33:12 -07:00
timmy 30dbe758d4 Fix windows tests 2022-09-19 22:52:45 -07:00
timmy 55384790f8 Forcefully raise an OSError on windows 2022-09-17 01:59:15 -07:00
timmy acaf5ed510 Fix issues with renaming
Stop a crash when renaming
Properly handle replacements on linux/macos
2022-09-17 01:28:26 -07:00
timmy 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
timmy 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
timmy be983c61bc Fix #353
The two primary cases fixed are:
Ms. Marvel
spider-man/deadpool

The first issue removed 'Ms.' which is a problem as many comics have
series that the only difference in the title is the
designation/honorific.

The second issue is that the '/' was removed and not replaced with
anything causing a search for 'mandeadpool' which will not show useful
results.

Consequently all designations/honorifics are now untouched
All punctuation is replaced with a space
2022-08-12 07:10:36 -07:00
timmy 77a53a6834 Update dependencies
Includes changes from pyupgrade
2022-08-10 20:55:46 -07:00
timmy f17f560705 Fix tests on windows
Make the speedup dependency to thefuzz optional it requires a C compiler
2022-08-08 19:03:25 -07:00
timmy aadeb07c49 Fix issues
Refactor add_to_path with tests
Fix type hints for titles_match
Use casefold in get_language
Fix using the recursive flag in cli mode
Add http status code to ComicVine exceptions
Fix parenthesis getting removed when renaming
Add more tests
2022-08-08 18:05:06 -07:00
timmy f2a68d6c8b Fix rename and add test 2022-07-29 22:05:03 -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 5a19eaf9a0 Fix serializing of sets 2022-07-25 11:22:44 -07:00
timmy 6e7660c3d9 Tests
Add tests for IssueIdentifier
Change tags to a set from a string
Add copy and replace convenience functions on GenericMetadata
Update deprecated resampling code for Pillow
Change comicvine test data to be the same as the test comic
Cleanup tests
2022-07-18 12:06:49 -07:00
timmy c0880c9afe Account for aliases field from CV 2022-07-13 23:11:14 -07:00
timmy a00891f622 Add more tests 2022-07-13 22:27:31 -07:00
timmy 46d3e99d48 Fix tests 2022-07-12 07:43:33 -07:00