Commit Graph

118 Commits

Author SHA1 Message Date
29ddc3779a Ensure FilenameInfo is always filled out fixes #556 2023-10-23 21:08:55 -07:00
abfd97d915 Merge branch 'protofolius_issue_scheme' into develop 2023-10-11 17:05:27 -07:00
058651cc29 Change metadata lists to sets. Changed CV talker to reflect and tidied 2023-09-24 14:33:57 +01:00
f6be7919d7 Implement support for protofolius's permission scheme 2023-09-06 04:50:05 -04:00
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
7a63474769 Fix cbr tests and update pre-commit 2023-09-04 19:56:18 -05:00
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
611c40fe0b Add test for split 2023-08-03 01:06:10 -07:00
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
1b6307f9c2 Merge branch 'mizaki-tidy_ii' into develop 2023-07-30 16:24:13 -07:00
6c07fab985 Fix tests taking forever caused by f90f373d20 2023-07-28 23:25:12 -07:00
3119d68ea2 Remove used issue id from get_issue_cover_match_score and fix test 2023-07-18 01:14:32 +01:00
4a7aae4045 Add tests for fix_url 2023-06-23 17:10:40 -07:00
31cf687e2f Reduce startup time 2023-06-22 20:11:40 -07:00
783e10a9a1 Generate a namespace object for typing settngs 2023-06-09 16:20:00 -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
e2dfcc91ce Revert get_recursive_filelist Fixes #449 2023-04-13 20:58:30 -06:00
4eb9e008ce Update pre-commit 2023-02-10 00:25:20 -08:00
983937cdea Mark internal functions in ComicVineTalker 2023-02-10 00:23:02 -08:00
e5b15abf91 clean up talker 2023-02-10 00:23:00 -08:00
4b6c9fd066 Fix comicarchive_test.py 2023-02-10 00:14:58 -08:00
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
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
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
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
f6698f7f0a Call load_archive_plugins in ComicArchive __init__ 2023-01-12 17:00:11 -08:00
712986ee69 Turn comicapi.archivers.* into plugins 2023-01-12 14:45:49 -08:00
5394b9f667 Fix tests. Probably not the correct way to do this? 2023-01-12 15:10:39 +00:00
2d8c47edca Use new settings system for plugin 2023-01-02 01:04:15 +00:00
7df2e3fdc0 Automatically crop black borders from covers 2022-12-31 11:52:23 -08:00
734b83cade Switch comictalker TypedDicts to dataclasses 2022-12-23 01:58:10 -08:00
9f00af4bba Change issue id and series id to strings 2022-12-23 00:09:19 -08:00
521d5634f3 Fix tests 2022-12-22 10:16:32 -08:00
1d9840913a Change all references of volume to series 2022-12-22 10:16:05 -08:00
440479da8c Update to settngs 0.3.0
Use the namespace instead of a dictionary
Cleanup setting names
2022-12-15 20:10:35 -08:00
103379e548 Split settings out into a separate package 2022-12-14 23:16:54 -08:00
18566a0592 Fix setting cmdline arguments 2022-12-13 08:50:08 -08:00
f3917c6e4d Add comments to tests 2022-12-10 18:05:27 -08:00
e9cef87154 Move test cases to the testing package
Add comments to tests
2022-12-06 17:00:21 -08:00
53445759f7 Add tests 2022-12-06 00:22:51 -08:00
0302511f5f Settings tests 2022-12-06 00:22:48 -08:00
19112ac79b Update Settings 2022-12-06 00:20:01 -08:00
fc4eb4f002 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
2022-11-25 19:22:01 -08:00
005d7b72f4 Fix tests 2022-11-25 19:21:54 -08:00
91b863fcb1 Merge branch 'mizaki-infosources' into dev 2022-11-25 19:21:25 -08:00
c5a5fc8bdb Fix issue with combine_notes 2022-11-24 01:24:15 -08:00
093d20a52b Remove all the cool settings changes. 2022-11-18 23:18:41 +00:00