Commit Graph

111 Commits

Author SHA1 Message Date
Timmy Welch
4c9096a11b Implement the most basic local plugin isolation possible
Remove modules belonging to local plugins after loading
Remove sys.path entry after loading

This means that multiple local plugins can be installed with the same import path and should work correctly
This does not allow loading a local plugin that has the same import path as an installed plugin
2024-09-15 17:09:33 -07:00
Timmy Welch
fab30f3f29 Add experimental quick-tag 2024-08-18 19:16:55 -07:00
Timmy Welch
b8728c5eed Improve performance when re-tagging file based tags in zip archives 2024-08-03 14:41:04 -07:00
Timmy Welch
e452fa153b Fix issues from static analysis 2024-06-22 20:21:01 -07:00
Timmy Welch
69a9566f42 Update all references of saved 'matadata' to 'tags' 2024-06-20 16:47:10 -07:00
Timmy Welch
e864e2db48 Re-arrange settings 2024-05-21 19:57:47 -07:00
Mizaki
8b0683f67c Add OverlayMode options for read style and data source 2024-05-11 01:56:06 +01:00
Timmy Welch
a1e4cec94f Log file path to plugin when it fails to load and remove debug statements 2024-02-11 13:18:03 -08:00
Timmy Welch
8ec16528ab Implement local plugins 2024-02-10 21:00:24 -08:00
pre-commit-ci[bot]
df762746ec [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-01-29 17:14:26 +00:00
Timmy Welch
addddaf44e List metadata styles when listing plugins 2023-12-18 02:37:40 -08:00
Timmy Welch
da373764e0 Let the original ComicRack metadata be disabled
Ensure metadata styles can be overridden by other plugins
2023-12-17 21:47:44 -08:00
Timmy Welch
ae5e246180 Add plugin support for metadata 2023-12-17 21:47:43 -08:00
Timmy Welch
50859d07c4 Set the return code to 3 if any results are not successful 2023-12-17 18:17:19 -08:00
Timmy Welch
45643cc594 Add integration tests 2023-12-17 16:24:32 -08:00
Timmy Welch
ab6b970063 Create an Action tuple for determining the current command 2023-12-17 16:16:21 -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
Mizaki
70541cc9ee Encode pathlib.Path for the settings file. Validate types from the JSON settings file after loaded. JSON.decoder not used due to its limitation with context. 2023-11-28 23:21:04 +00:00
Timmy Welch
9dc6f8914f Upgrade settings to 0.8.0 2023-11-19 23:14:40 -08:00
Timmy Welch
10776dbb07 Fix flake8 issues 2023-11-09 18:23:57 -08:00
Timmy Welch
96c5c4aa28 Fix pyinstaller build
Fix exception when PyQt is not installed
2023-10-07 11:49:30 -07:00
Timmy Welch
5bc44650d6 Change --only-set-cv-key to --only-save-config 2023-09-05 03:56:56 -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
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
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
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
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
Timmy Welch
e5b15abf91
clean up talker 2023-02-10 00:23:00 -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
Timmy Welch
d987a811e3
Consolidate plugin code 2023-02-03 20:13:58 -08:00
Mizaki
d12325b7f8 Simplify parse_settings. Prefix talker_ to group name. Add back setting CV key via commandline. Other small changes as requested. 2023-02-02 00:53:13 +00: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
Timmy Welch
7c4e5b775b
Merge branch 'plugableArchivers' into develop 2023-01-31 19:44:07 -08:00
Timmy Welch
46899255c8
Generate settings for an archivers executable 2023-01-30 21:36:47 -08:00
Mizaki
6a650514fa Rename new settings talker methods. Move parse_settings for talkers to earlier and only pass talkers own settings. 2023-01-30 01:59:23 +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
92eb79df71
Fix console_scripts entry point 2023-01-21 00:27:39 -08:00
Mizaki
100e0f2101 Load plugins in init. 2023-01-15 17:38:50 +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
Timmy Welch
80f42fdc3f
Move log header to execute immediately after the log is configured 2023-01-12 14:43:12 -08:00
Mizaki
fad103a7ad Use setting option for talker selection 2023-01-07 00:29:12 +00:00
Mizaki
2d8c47edca Use new settings system for plugin 2023-01-02 01:04:15 +00:00
Timmy Welch
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
Timmy Welch
e5c3692bb9
Fail if an error occurs when loading settings 2022-12-15 18:58:53 -08:00