Commit Graph

131 Commits

Author SHA1 Message Date
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
Timmy Welch
bf55037690
Make PyICU optional
Fix more locale issues
Update README.md
2023-04-18 21:03:50 -07:00
Timmy Welch
e2dfcc91ce
Revert get_recursive_filelist Fixes #449 2023-04-13 20:58:30 -06:00
Timmy Welch
4eb9e008ce
Update pre-commit 2023-02-10 00:25:20 -08:00
Timmy Welch
983937cdea
Mark internal functions in ComicVineTalker 2023-02-10 00:23:02 -08:00
Timmy Welch
e5b15abf91
clean up talker 2023-02-10 00:23:00 -08:00
Timmy Welch
4b6c9fd066
Fix comicarchive_test.py 2023-02-10 00:14:58 -08:00
Timmy Welch
ad68726e1d
Use consistent naming for settings
config: always values
setting: always the definition/description not the value
2023-02-04 11:33:21 -08:00
Mizaki
94aabcdd40 Merge branch 'develop' into talker_settings
# Conflicts:
#	comictaggerlib/ctoptions/__init__.py
#	comictaggerlib/main.py
#	comictalker/talkers/comicvine.py
2023-02-01 23:38:13 +00:00
Mizaki
0f10e6e848 Create simple dict of talkers with objects. Moved thresh setting back to talkers (general) as it is called outside of talker. 2023-01-26 00:52:02 +00:00
Mizaki
0d69ba3c49 Rename talkers_general to talkers. Moved plugin option register to own file. Due to chicken and egg, first get talker classes then create objects. 2023-01-25 19:10:58 +00:00
Timmy Welch
f6698f7f0a
Call load_archive_plugins in ComicArchive __init__ 2023-01-12 17:00:11 -08:00
Timmy Welch
712986ee69
Turn comicapi.archivers.* into plugins 2023-01-12 14:45:49 -08:00
Mizaki
5394b9f667 Fix tests. Probably not the correct way to do this? 2023-01-12 15:10:39 +00:00
Mizaki
2d8c47edca Use new settings system for plugin 2023-01-02 01:04:15 +00:00
Timmy Welch
7df2e3fdc0
Automatically crop black borders from covers 2022-12-31 11:52:23 -08:00
Timmy Welch
734b83cade
Switch comictalker TypedDicts to dataclasses 2022-12-23 01:58:10 -08:00
Timmy Welch
9f00af4bba
Change issue id and series id to strings 2022-12-23 00:09:19 -08:00
Timmy Welch
521d5634f3
Fix tests 2022-12-22 10:16:32 -08:00
Timmy Welch
1d9840913a
Change all references of volume to series 2022-12-22 10:16:05 -08:00