Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAuto-generate manpage, help docs, etc. #552
Comments
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
Absolutely. I'm also hoping that, similar to |
This comment has been minimized.
This comment has been minimized.
|
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. |
kbknapp
changed the title
Auto-generate manpage
Auto-generate manpage, help docs, etc.
Nov 2, 2016
This comment has been minimized.
This comment has been minimized.
|
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. |
kbknapp
added
C: help pages gen
D: intermediate
and removed
D: hard
labels
Nov 2, 2016
kbknapp
moved this from Triaged
to Up Next
in Status
Feb 12, 2017
kbknapp
moved this from Up Next
to Triaged
in Status
Mar 27, 2017
kbknapp
added
W: 3.x blocker
and removed
W: 2.x
labels
May 9, 2017
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@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. |
kbknapp
added
W: 3.x
and removed
W: 3.x blocker
labels
Feb 5, 2018
This was referenced Feb 20, 2018
dwijnand
referenced this issue
Apr 11, 2018
Merged
tweak test/bench's help around filtering & libtest #5341
This comment has been minimized.
This comment has been minimized.
myfreeweb
commented
Jun 26, 2018
|
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.) |
kbknapp
added this to the v3.0 milestone
Jul 22, 2018
This comment has been minimized.
This comment has been minimized.
yoshuawuyts
commented
Jul 22, 2018
|
Heya, on the CLI WG repo we've been working on this! It's a bit rough, but I reckon we might be able to create a compelling story!
ScreenshotStructured man page, generated by the
|
This comment has been minimized.
This comment has been minimized.
|
@yoshuawuyts this is awesome! My thoughts were to place the manpage generation into the If you'd like I'd be more than willing to add people to the org and repo! So we can make it official. |
This comment has been minimized.
This comment has been minimized.
yoshuawuyts
commented
Jul 24, 2018
|
@kbknapp oh awesome, that def seems like the right way forward! Would be happy to join in! Also cc/ @spacekookie here (she wrote all the |
yoshuawuyts
referenced this issue
Jul 24, 2018
Closed
Move clap v3 -> man glue code to clap_generate #9
This comment has been minimized.
This comment has been minimized.
killercup
commented
Jul 24, 2018
|
@kbknapp not sure if you've seen it yet but I spend an hour yesterday to throw https://github.com/rust-clique/clap-md together -- its goal is to render Markdown documentation for clap applications. Feel free to move this to clap-generate, too! (I'd be sad to see that crate name go, though) |
This comment has been minimized.
This comment has been minimized.
|
@killercup I love it! This is something I've been thinking about in the back of my mind that I'd love to put some time into! I've been passively looking at things like flatdoc and how other projects with large CLIs have provided docs (ones like Docker, etc.) to see if there is something we could use. But it's been on the back burner with this 3.x work I've sent out the invites to the clap-rs org to the three of you above, and yeah I'd love to move that to the org as well! |

joshtriplett commentedJun 30, 2016
•
edited
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_namevalue.1.NAMEsection should default tobin_name \- about, whereaboutis the string set by.about.SYNOPSISsection should contain the usage strings for the command and every subcommand.DESCRIPTIONsection would need some new paragraph-style information provided (also usable as a more structured.before_help).AUTHORSsection should contain the author information, if provided.SEE ALSOsection 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.