Open maxandersen opened 4 years ago
This looks very interesting and I am certainly open to improving this.
Anyone able to provide a pull request?
I haven’t given any thought to what the structure of the generated AsciiDoc would become. Simple concatenation? What about nested sub-subcommands?
What about links, simply make all command names links to other sections in the same document? Do subcommands link back to their parent?
Anything else worth considering that doesn’t come up for single command doc pages?
Includes would work as long as follow same convention.
My thinking is to get to something like manual at cli.github.com.
Looking at https://cli.github.com/manual/ , I see each command and subcommand has a separate page, and the Table of Contents (TOC) navigation bar on the left brings them all together. The TOC especially is nice: it expresses the command hierarchy and is intuitive to navigate.
One way I can see this can be done with AsciiDocter is to have a single document for each top-level command. This doc can have a section for each subcommand, sub-sections for each sub-subcommand, etc.
AsciiDocter's table of contents feature would generate the navigation bar on the left.
The contents of that document could be just titles for each section and subsection, and the contents of each of these sections could be an include that points to the file currently generated by picocli-codegen
.
@grumpyf0x48 I see you have been working on https://github.com/jbangdev/jbang/issues/363 and https://github.com/jbangdev/jbang/pull/444, would you be interested in upstreaming some of your work to do this in picocli-codegen directly?
Note that https://github.com/remkop/picocli/pull/1340 will improve this a little bit in the upcoming picocli release.
This would be great for a single PDF file, as well as single-page HTML.
@bentatham Do you feel like providing a pull request for this?
would be awesome if the man page generator would be able to generate a single html page instead of per subcommand. The current end result ends up being very fragmented.
reason: https://github.com/jbangdev/jbang/pull/444