-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-generate manpage, help docs, etc. #552
Comments
I like this idea! I'll have a better idea about what all it would take once I finish #376 but I think it could be done. And if nothing else, it'll at least give a really good starting point that one could then tweak manually with little effort. |
Absolutely. I'm also hoping that, similar to |
I was thinking about the same thing recently and I think we can reuse much of the infrastructure done for the templated help. But I would also like to propose a different way to generate the man page (and access the completion). I am opening another issue for this. |
Addressing this issue soon. I'd like to get the ability to generate man pages, help docs, etc. For the help docs, I'd especially like to be able to generate based off a template exactly like Also, for help docs I'd like to choice to split the files or use a single document. |
@matthiasbeyer yes, this is a feature I want, but need to get 3.x out the door first because otherwise it'll just keep getting pushed off and pushed off. |
Since clap has plenty of information about the structure of commands and args and whatnot, it should be possible to build pages in the mdoc language, which is semantic (i.e. it has entities like "flags" and "commands" instead of just "bold text" etc.) |
* Adding a draft chapter about documentation with man * Fixing some wordings and typos * 🐀 and 💀 are not the same thing
- Close #24 - Reworded cut to extract in the deb `control` file and other places. - Instead of modifying a static man file, `make-deb` generates and compresses the man file. The man file created isn't perfect but it's better than having the man page to by out of sync with development. **NOTE:** With [Clap 3](clap-rs/clap#552) man pages generation should be possible.:w - Replaced clap's description string with the `crate_description` macro. The `--help` application description will be the same as the one in `Cargo.toml`. - Tweaked the wording in the `-v` option help string.
Is there any way to generate json schema from the command? |
At this time, we do not. The issue for that is #918. The |
For anyone like me who stumbles across this long issue but can't find the correct answer: the official crate is |
Maintainer notes:
I'd love to have support to generate a manpage. This would use a mechanism and infrastructure similar to #376. Additional functions to override or augment portions of the generated manpage could come later, but I think with relatively few additions this could become an incredibly useful mechanism.
bin_name
value.1
.NAME
section should default tobin_name \- about
, whereabout
is the string set by.about
.SYNOPSIS
section should contain the usage strings for the command and every subcommand.DESCRIPTION
section would need some new paragraph-style information provided (also usable as a more structured.before_help
).AUTHORS
section should contain the author information, if provided.SEE ALSO
section would need some new mechanism to populate it.I'd be happy to help with manpage markup, once I see the details of the mechanism used in #376.
The text was updated successfully, but these errors were encountered: