📝 docs: generate CLI reference from the argparse parser#614
Merged
Conversation
The command line was documented only by a hand-written how-to whose flag details drifted from turbohtml.__main__._parser. Generate the exhaustive reference from the parser with sphinx-argparse-cli so it tracks the code, matching the doctest-backed "docs cannot drift" stance the rest of the docs already take. The how-to keeps the subcommand-to-API mapping and pipeline examples and now points at the generated reference for the full flag surface, so the flags live in one place.
Merging this PR will not alter performance
Comparing Footnotes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 command line was documented only by a hand-written how-to whose per-flag details drifted from the argparse parser in
turbohtml.__main__. 📝 This PR generates an exhaustive CLI reference straight from_parser()withsphinx-argparse-cli, so the documented subcommands and flags track the code the same way the doctest-run examples keep the rest of the docs honest.The new
docs/reference/cli.rstrenders the parser under aCommand linetoctree group;sphinx-argparse-cliwalks every subcommand (minify,minify-css,minify-js,detect,to-markdown,to-text,sanitize) and their options.docs/how-to/cli.rststays the task-oriented guide with the subcommand-to-API mapping and pipeline examples, and now points at the generated reference for the full flag surface, so the flags are described in one place.This is internal docs tooling, so there is no changelog fragment. The docs build passes under
-W, with the directive rendering every subcommand.