-
Notifications
You must be signed in to change notification settings - Fork 19
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
Man page generation #1
Comments
I think the help generated by I think both Anyway, either way is OK for now. I prefer to leave this issue for later discussion. Maybe we should focus more on polishing the tools? |
Sphinx supports generating documentation in a variety of formats, so we wouldn't be limited to man pages (and we could host the generated HTML automatically using Read the Docs). It's also pretty popular and used in several well-known projects (the Linux kernel being one of them). A disadvantage is we would most likely need to maintain the reStructuredText files separately from the actual utilities. It might be easier to maintain the docs using the One thing worth considering as well is that the main AsciiDoc implementation is Asciidoctor, which is written in Ruby, whereas Sphinx is written in Python. Also yes, clearly the tools themselves should come first. We'll need to figure this out relatively soon though to avoid falling hopelessly behind in terms of documentation. |
clap is working on generating man page: clap-rs/clap_generate#1 But it just started, hopefully will be usable in months. Let's check it later. |
We (CLI-WG) released If it doesn't we'd love to hear from you so we can improve it further ✨ |
Great, thanks @yoshuawuyts. If I understand correctly, the |
@mssun fwiw I've tried generating man pages from clap 2 (structopt), and didn't manage to get all information I needed from it. That's why we focused on getting support for clap 3 instead. Maybe you'll be able to pull it off, but I figured it'd be useful to share regardless.
And yep, that's correct! 😁 |
Thank you. My concern is that there are tens of cli tools in our project, maintaining their man pages and args parser are painful. Do you think it's worth waiting for clap 3? Is there any estimated time for this feature in clap 3? |
I don't have an exact timeline, but I believe Clap 3 is being targeted for this fall/winter - with an alpha probably coming out before that. |
IMO we should just wait until Clap 3 unless we want to write some sort of system that generates the Clap stuff and the man page stuff at the same time (so basically wrap both Clap and |
We need to decide what documentation system to use. I assume we want support for man pages, which means we can either roll our own generator (like in
ripgrep
, which, last I checked, first generates an AsciiDoc file inbuild.rs
) or use something like Sphinx, which is used in uutils/coreutils.The text was updated successfully, but these errors were encountered: