Commit Graph

19 Commits

Author SHA1 Message Date
Mizaki
f977e70562 Rename min ct required var. Use a minimum version only check instead of full spec 2023-12-01 01:23:46 +00:00
Mizaki
12dd06c558 Add CT verion check against talker requirements 2023-11-30 01:50:28 +00:00
Mizaki
df3e7912b3 Add talker information in setting window 2023-09-17 18:26:06 +01:00
Timmy Welch
bf2b4ab268 Rename check_api_key to check_status
Parameter is changed to a settings dict so that a Talker can retrieve any info it needs
Change issue_id type annotation to str
2023-09-06 02:59:59 -04: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
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
2e01672e68 Fix #485
As mentioned in the comment in comictaggerlib/main.py:186
The default value should be None not the empty string.
We also check if the given value is the default or the empty string and
 the setting is unset so the default value is not saved in the settings
 file.
The default_api_url is shown in the GUI Settings Window it is not
 currently show in the cli help.
2023-06-23 17:48:18 -07:00
Mizaki
4218e3558b Add url 2023-03-05 18:58:06 +00:00
Mizaki
271bfac834 Do not fail when talker key is missing 2023-03-03 00:07:49 +00:00
Timmy Welch
9bf998ca9e
Remove check_api_url and fix docstrings 2023-02-27 22:29:23 -08:00
Timmy Welch
5b2a06870a
Fix talker settings validation 2023-02-27 22:21:56 -08:00
Mizaki
b4a3e8c2ee Add missing tool tips to labels
Change metadata select label
Use named tuple for talker tabs
Retrun a string and bool for api check
2023-02-24 00:06:48 +00:00
Mizaki
118429f84c Change source term to metadata
Generate API text field in their own function
API tests return string message of result
Add help to text field lables
2023-02-23 00:42:48 +00:00
Mizaki
33ea8da5bc Merge branch 'develop' into talker_settings_generator
# Conflicts:
#	comictaggerlib/settingswindow.py
#	comictalker/talkers/comicvine.py
2023-02-21 00:50:06 +00:00
Timmy Welch
fb83863654
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
2023-02-20 16:02:15 -08:00
Timmy Welch
2491999a33
Update copyright statements to ComicTagger Authors 2023-02-16 17:23:13 -08:00
Mizaki
6a6a3320cb Move talker settings menu generator to a separate file 2023-02-14 01:32:56 +00: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