Commit Graph

150 Commits

Author SHA1 Message Date
Timmy Welch
a7a9d38428 Make ImageMetadata a dataclass 2024-07-27 19:23:37 -07:00
Timmy Welch
76a92c8431 Fix test 2024-06-23 00:04:33 -07:00
Timmy Welch
3389c72a63 Merge branch 'help-messages' into develop 2024-06-21 19:53:30 -07:00
Timmy Welch
69a9566f42 Update all references of saved 'matadata' to 'tags' 2024-06-20 16:47:10 -07:00
Timmy Welch
6132af3bb5 Support niquests 2024-06-09 13:09:26 -07:00
Timmy Welch
e864e2db48 Re-arrange settings 2024-05-21 19:57:47 -07:00
Mizaki
a40438d38c Separate list merge into a separate option (lordwelch) 2024-05-11 16:42:24 +01:00
Mizaki
3d443e0908 lordwelch rewrite 2024-05-11 02:04:43 +01:00
Mizaki
71b79bdc91 Move some overlay test data to testing/comicdata.py 2024-05-11 02:02:01 +01:00
Mizaki
8b0683f67c Add OverlayMode options for read style and data source 2024-05-11 01:56:06 +01:00
Mizaki
0bbdaa96cf Split command line `--type arg into --type-modify for modify styles and --type-read for read styles 2024-04-29 00:51:40 +01:00
Timmy Welch
d63123b77b Add tests for prepare_metadata 2024-04-28 13:53:41 -07:00
Timmy Welch
8b4bf8d51f Allow preserving the original filename when moving 2024-04-27 19:25:33 -07:00
Timmy Welch
064795fac9 Fix prepare_metadata 2024-04-27 16:43:51 -07:00
Timmy Welch
8bcd51f49b Improve commandline metadata override
Change parse_metadata_from_string to yaml syntax
Add a special value to remove existing values when metadata is overlayed
2024-04-06 12:03:01 -07:00
Timmy Welch
de084ffff9 Fix string value of GenericMetadata 2024-04-06 12:02:21 -07:00
Timmy Welch
bad8b85874 Fix tests 2024-02-24 18:30:41 -08:00
Timmy Welch
f382c2f814 Update Tests 2024-02-23 20:47:22 -08:00
Timmy Welch
2eca743f20 Fix #602
Tests were not made correctly to catch the change in 2c3a2566cc
This has now been corrected
2024-02-18 17:31:00 -08:00
Timmy Welch
8ec16528ab Implement local plugins 2024-02-10 21:00:24 -08:00
Timmy Welch
69615c6c07 Fix hash and test 2024-02-10 15:02:24 -08:00
Timmy Welch
bb1a83b4ba Fix the rename command 2024-01-21 14:01:11 -08:00
Timmy Welch
539aac1307 Fix clearing lists via the '-m' option Fixes #587 2024-01-14 13:38:11 -08:00
Timmy Welch
c3a8221d99 Return an empty object if an archive does not have the requested style 2023-12-18 16:59:31 -08:00
Timmy Welch
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
Timmy Welch
ae5e246180 Add plugin support for metadata 2023-12-17 21:47:43 -08:00
Timmy Welch
45643cc594 Add integration tests 2023-12-17 16:24:32 -08:00
Timmy Welch
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
Timmy Welch
1ff6f1768b Use importlib.resources instead of __file__ 2023-11-25 12:32:50 -08:00
Timmy Welch
65948cd9cd Merge branch 'bump-settngs' into develop 2023-11-23 16:06:01 -08:00
Timmy Welch
128cab077c Replace pycountry with isocodes
isocodes is updated more often and doesn't depend on deprecated packages
2023-11-23 14:21:21 -08:00
Timmy Welch
9dc6f8914f Upgrade settings to 0.8.0 2023-11-19 23:14:40 -08:00
Timmy Welch
29ddc3779a Ensure FilenameInfo is always filled out fixes #556 2023-10-23 21:08:55 -07:00
Timmy Welch
abfd97d915 Merge branch 'protofolius_issue_scheme' into develop 2023-10-11 17:05:27 -07:00
Mizaki
058651cc29 Change metadata lists to sets. Changed CV talker to reflect and tidied 2023-09-24 14:33:57 +01:00
Timmy Welch
f6be7919d7 Implement support for protofolius's permission scheme 2023-09-06 04:50:05 -04:00
Timmy Welch
05e6eaf88e 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 much hard-coded strings as possible
Add a --list-plugins commandline option
2023-09-05 03:55:12 -04:00
Timmy Welch
7a63474769 Fix cbr tests and update pre-commit 2023-09-04 19:56:18 -05:00
Timmy Welch
f72ebdb149 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.
2023-08-05 03:02:12 -07:00
Timmy Welch
611c40fe0b Add test for split 2023-08-03 01:06:10 -07:00
Timmy Welch
2c3a2566cc 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.
2023-08-02 09:00:04 -07:00
Timmy Welch
1b6307f9c2 Merge branch 'mizaki-tidy_ii' into develop 2023-07-30 16:24:13 -07:00
Timmy Welch
6c07fab985 Fix tests taking forever caused by f90f373d20 2023-07-28 23:25:12 -07:00
Mizaki
3119d68ea2 Remove used issue id from get_issue_cover_match_score and fix test 2023-07-18 01:14:32 +01:00
Timmy Welch
4a7aae4045 Add tests for fix_url 2023-06-23 17:10:40 -07:00
Timmy Welch
31cf687e2f Reduce startup time 2023-06-22 20:11:40 -07:00
Timmy Welch
783e10a9a1 Generate a namespace object for typing settngs 2023-06-09 16:20:00 -07:00
Timmy Welch
14fa70e608
Separate xlate into separate functions based on return type fixes #454 2023-04-25 15:55:27 -07:00
Timmy Welch
e70c47d12a
Make PyICU optional
Update README.md
2023-04-23 00:48:11 -07:00
Timmy Welch
c1aba269a9
Revert "Make PyICU optional"
This reverts commit bf55037690.
2023-04-22 21:28:14 -07:00