- Remove support for custom player arguments from `--player`
- Set the `--player` argument's `type` to `pathlib.Path`
- Set return type of `find_default_player()` to `pathlib.Path`
- Update `--player` and `--player-args` help texts accordingly
- Update `PlayerOutput`:
- Update constructor signature and add typing information
- Rename `cmd` to `path` and remove support for player arguments
- Always build list of arguments and remove Windows-specific logic
- Properly tokenize player input value in `--player-args`
- Log player argv instead of the player command-line string
- Fix now unneeded passthrough URL quotation in `streamlink_cli.main`
- Update docs and fix argparse docs extension
- Update tests and remove Windows-specific player argument tests
- 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
This will make the documentation more clear and informative both on the
rendered webpages and in the manpage as well as the "--help" content.
- On webpages, we will get inline code blocks;
- In the manpage, we will get emphasized words (bold);
- In the help content, we will get words enclosed in single backticks.
This will help us remove reStructuredText markups from the docs.
About "\$A":
"\\$A" has been put into a code block, so the single backslash will be
displayed correctly in the help content. For rendered docs, escaping
backslashes is now no longer required since we did it automatically.
---
A useless non-capturing group has been removed as per the suggestion:
https://github.com/streamlink/streamlink/pull/4659#pullrequestreview-1042428950
Thus,
Co-authored-by: bastimeyer <mail@bastimeyer.de>
There are some lines starting with two or more spaces contain the
options should be links. To achieve it, the following types of lines
should not be processed:
- Starting with two or more spaces followed by a "%(prog)s";
- Starting with two or more spaces followed by a full-length option;
- Starting with an "Example: ".
- Use a custom mapping of parent->child argument group relations
instead of calling `group.add_argument_group()` for creating
a tree structure of argument groups (deprecated in Python 3.11)
- Override `parser.add_argument_group()` and add the `parent` keyword
for being able to have nested argument group defintions
- Update custom `--help` format output
- Update the argparser Sphinx extension
- Fix tests
- refactor streamlink_cli.main.{setup_logging,setup_console}
and split into setup_logger_and_console and setup_signals
- add LOG_DIR to streamlink_cli.constants
- pass filename to logger.basicConfig
- re-use write stream of logger in ConsoleOutput
- fix escaped chars for percent-formatted argparse help strings in docs
- add tests
This adds a second layer of plugin argument groups, so that the docs can
show menu items for each plugin which makes finding them is easier.
- make the doc's argparse extension read argparse groups recursively
- override argparse.ArgumentParser.format_help and show nested groups
- fix/update tests
instead of separating them with a comma, so that it adds anchors to
secondary arguments. The rendered manpage already splits arguments into
multiple rows if there are multiple arguments for a specific command.
Fix CSS of the rtd_theme_violet theme and hide empty argument values.
- Add `is_global` parameter to `streamlink.options.Argument`
Global plugin arguments reference Streamlink's global arguments by
name and cannot receive any other parameters, like `required`, etc.
- In `streamlink_cli.main.setup_plugin_args`, find the global argument
references of each plugin, set the available default values and add
the plugin to the argument's `plugins` list, which will be read by
the docs generator
- In `streamlink_cli.main.setup_plugin_options`, set the provided
global argument values on the plugin's `options` dictionary
- Refactor docs/ext_argparse
- Don't override argparse.ArgumentParser when importing the parser
- Add list of supported plugins to the parameter description if the
`plugins` list is set on the argparse action object
- Add/improve/fix tests
* plugins: PluginArguments API
Allow plugins to specify arguments within the Plugin class.
This makes it easier to add and test plugin specific arguments, as well
as enabling sideloaded plugins to support command line arguments.
* update docs build to work with the new plugin arguments
* fix argument name override for funimation and ustream
* add some more tests for options/arguments
* rebase with abweb plugin
* switch to RuntimeException for py2 compat
* fix bug where required arguments were not prompted
* bug fixes for option names in plugins, should match existing names
* restore "normal" exception messages
* missed a RecursionError -> RuntimeError
* updated the api slightly with better (I think) argument name
added some docs for the Argument and Arguments classes
* options/args: normalise option names to replace - with _, and ensure the defaults are set
* normalise the plugin module name, replacing _ with -
* style issues pointed out by @back-to
* plugin.btsports: update to use PluginArguments
* plugins.bbciplayer: add hd argument
* plugins.twitch: move --twitch-oauth-authenticate back to argparser
Moved the option back to argparser as it's a special case.
* test: fixed typo
Sphinx has deprecated sphinx.util.compat.Directive.
Use the class in docutils as recommended by Sphinx.
Sphinx warning was: /usr/lib/python3/dist-packages/sphinx/util/compat.py:40:
RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated and will
be removed in Sphinx 1.7, please use docutils' instead.
RemovedInSphinx17Warning)
Minor tweaks to the docs. Fixed all the warnings and enabled "Fail on warning" option so that problems with the docs will cause the build to fail on warning, the docs are also built for every commit and PR.
Restructured the travis script/after_success so that the docs are only pushed if the build was successful (only master branch and no PRs).