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

option to generate single html/man page #1227

Open
maxandersen opened this issue Oct 25, 2020 · 7 comments
Open

option to generate single html/man page #1227

maxandersen opened this issue Oct 25, 2020 · 7 comments
Labels
status: help-wanted 🆘 theme: codegen An issue or change related to the picocli-codegen module type: doc 📘 type: enhancement ✨
Milestone

Comments

@maxandersen
Copy link
Contributor

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: jbangdev/jbang#444

@remkop
Copy link
Owner

remkop commented Oct 25, 2020

This looks very interesting and I am certainly open to improving this.

Anyone able to provide a pull request?

@remkop
Copy link
Owner

remkop commented Oct 25, 2020

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?

@maxandersen
Copy link
Contributor Author

Includes would work as long as follow same convention.

My thinking is to get to something like manual at cli.github.com.

@remkop
Copy link
Owner

remkop commented Oct 25, 2020

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 jbangdev/jbang#363 and jbangdev/jbang#444, would you be interested in upstreaming some of your work to do this in picocli-codegen directly?

@remkop
Copy link
Owner

remkop commented Mar 5, 2021

Note that #1340 will improve this a little bit in the upcoming picocli release.

@bentatham
Copy link

This would be great for a single PDF file, as well as single-page HTML.

@remkop
Copy link
Owner

remkop commented Sep 2, 2022

@bentatham Do you feel like providing a pull request for this?

@remkop remkop modified the milestones: 4.7, 4.8 Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help-wanted 🆘 theme: codegen An issue or change related to the picocli-codegen module type: doc 📘 type: enhancement ✨
Projects
None yet
Development

No branches or pull requests

3 participants