docs: rewrite, fix and improve CLI tutorial #5157
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main motivation of these changes is having a short linkable example of how to escape URLs in various command-line shells, because this question comes up often and gets incorrectly (and annoyingly) reported as a bug.
Since there'd be a lot of repetition when showing examples for different shells, I decided to add the
sphinx-design
extension, to be able to have support for tabs (and other things that might be useful in the future). It's recommended by the furo-theme author and it's maintained by the developer of themyst-parser
extension which Streamlink already uses for markdown support in the docs.https://sphinx-design.readthedocs.io/en/furo-theme/index.html
This PR also rewrites and clarifies some sections and fixes broken links. I also replaced the tutorial's example URL with something more neutral, because the previous URL was set by chrippa, who apparently was a starcraft fan in the early days of Twitch, hence the day9tv example.
The examples are not super strict, because on BASH for example, the
nullglob
option could be set, but that's mostly irrelevant for interactive use. I tried to cover the most common pitfalls though when pasting URLs.Please see the docs preview.
Both
sphinx-design
andmyst-parser
extensions are currently holding back the upgrade to Sphinx 6 if the furo-theme would get bumped to the latest version. A new release of the extensions should be coming up shortly though (highly requested by lots of people). I will have a look at bumping furo and thus Sphinx to 6.0.0 which will drop support for py37 and which will finally drop unneeded bloat like jquery and underscore. 🤮The py37 drop also made me have a look at the netlify docs-preview build config, but that one is unfortunately still stuck on py38, and they've even made their build-image repo closed source for development pace reasons, with eventual Python upgrades promised on their forums 😞.