Skip to content
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

Generate Markdown from clap docs #256

Closed
PSeitz opened this issue Jul 9, 2021 · 4 comments
Closed

Generate Markdown from clap docs #256

PSeitz opened this issue Jul 9, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@PSeitz
Copy link
Contributor

PSeitz commented Jul 9, 2021

Currently the docs for the markdown are manually created and update. It would be better to generate a md page from the clap docs.

I didn't find something exact as solution, but a hook to generate stuff exists (https://github.com/clap-rs/clap/blob/master/clap_generate/src/lib.rs).

There is also an abandoned project (https://github.com/rust-cli/clap-md) and an open issue for generation of man pages etc. (clap-rs/clap#552)

@PSeitz PSeitz added the enhancement New feature or request label Jul 9, 2021
@fulmicoton
Copy link
Contributor

We rely on yaml, so maybe we can do something with some template tech.

@evanxg852000
Copy link
Collaborator

There seems to be a work started on this but currently, only the bash completion is generated.
This doc also looks confusing as gen_manuals is not available in any clap_generate rust-cli/book#61

@fulmicoton fulmicoton assigned PSeitz and unassigned evanxg852000 Mar 29, 2022
@fulmicoton
Copy link
Contributor

What is the status of this? I think you implemented something @PSeitz

@PSeitz
Copy link
Contributor Author

PSeitz commented Mar 29, 2022

Yes, the generate_markdown.rs generates markdown from the clap parameters

https://github.com/quickwit-oss/quickwit/blob/8d9a1a1a661ca096b74a81c3af5eb7a0ecc96742/CONTRIBUTING.md#generating-the-cli-docs

@PSeitz PSeitz closed this as completed Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants