Commit Graph

8 Commits

Author SHA1 Message Date
bastimeyer b547fe41b5 docs: add support for $metadata plugin metadata
This allows plugins to optionally define which stream metadata variables
are available, with an optional comment for each variable.

`$metadata` can be repeated multiple times, once for each supported
variable, and it must be set immediately after the mandatory `$type`.

The supported variables must be defined in the following order:
- id
- author
- category
- title

The optional comment is separated by a simple space character, but it
is rendered differently in the docs.
2023-08-26 14:14:54 +02:00
bastimeyer 5e6f03c3cd chore: add "B" rules to ruff config 2023-03-24 09:41:23 -07:00
bastimeyer 0589750c8f options: deprecate global plugin arguments
- Raise `StreamlinkDeprecationWarning` when `is_global=True`
- Remove all global plugin arguments and replace them with simple
  option lookups on the Streamlink session instance
- Remove global argument detection in custom Sphinx plugins extension
- Remove supported plugins list from custom Sphinx argparse extension
  and remove respective setup from `setup_plugin_args` in the CLI module
- Add deprecation note to the docs
- Update tests
  - Check whether builtin plugins define global plugin arguments
  - Capture deprecation warnings
2023-02-03 10:21:31 -08:00
bastimeyer 749f980450 plugins: make $notes metadata repeatable 2022-11-12 13:42:11 +01:00
bastimeyer 46496db369 docs: handle suppressed plugin arguments
and remove AST parser workaround for py37, as the currently used version
of the Furo theme doesn't build on py37 anyway
2022-09-06 18:13:18 -07:00
bastimeyer b6166ad7fb docs: update plugins extension for new arguments 2022-08-18 20:27:30 -07:00
bastimeyer cc455586c5 ci: lint sphinx extensions and setup.py 2022-06-23 09:35:00 -07:00
bastimeyer d24aaa76e4 docs: dynamically build list of plugins
Implement custom "plugins" sphinx extension which parses metadata from
plugin files and which outputs a list of plugins with datalists that
include the annotated metadata in addition to plugin arguments and
links to plugin files + issues on GitHub.

Add plugin metadata linting tests and remove old plugin matrix tests.
2022-03-03 20:33:30 -08:00