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 man page and/or markdown #176

Open
nomeata opened this issue Jan 2, 2016 · 6 comments
Open

Generate man page and/or markdown #176

nomeata opened this issue Jan 2, 2016 · 6 comments

Comments

@nomeata
Copy link

nomeata commented Jan 2, 2016

Hi,

given the highly structured and detailed data a well-polished option parser, one would really like to be able to use it to also create other bits of reference documentation that one would expect, in particular a manpage and maybe also markdown snippets to put into the README.

Such a feature would likely pull in pandoc, and hence be better put into a package of its own. This way, the dependency could be just of a special “man-page generating” executable and not bloat the real thing.

I’m not sure if the current API is well suited for this task.

Thanks,
Joachim

@HuwCampbell
Copy link
Collaborator

Hi,
I would imagine this it very possible. Internally we use treeMapParser to make our usage texts, which is very extendable.
You're right though, I can't put pandoc deps in this library however as it would kill our wide dep range.

@ababkin
Copy link

ababkin commented Apr 13, 2017

Hi,
I would also vote for having an auto-generated man page, even if it is rudimentary. It seems that a lot of the puzzle-pieces are already completed for the -h option, the remaining thing is to traverse the tree of sub-parsers and generate a somewhat coherent man page.
If nothing like that is available, I can take a stab at it, but would appreciate some guidance of folks who have intimate familiarity with the codebase
Thanks
Alex

@ip1981
Copy link

ip1981 commented Jun 14, 2017

There is the help2man utility ;)
Though, optparse-applicative output is not perfectly friendly to it.

@shmish111
Copy link

Would pandoc really be necessary? ansi-wl-pprint is already a dependency, wouldn't this be enough to create nice man pages?

@hasufell
Copy link

hasufell commented Sep 3, 2021

@HuwCampbell
Copy link
Collaborator

Ta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants