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

Manpage: missing sections #82

Open
volans- opened this issue Oct 5, 2017 · 4 comments
Open

Manpage: missing sections #82

volans- opened this issue Oct 5, 2017 · 4 comments

Comments

@volans-
Copy link

volans- commented Oct 5, 2017

I cannot find manpage sections listed in the source code at _construct_manpage_specific_structure() in the generated manpage. Am I missing some configuration by any chance?

The generated manpage has those sections:

NAME
POSITIONAL ARGUMENTS
NAMED ARGUMENTS
AUTHOR
COPYRIGHT

While from the source code and usual best practices in manpage generation I was expecting to have:

  • a SYNOPSIS section with the synopsis of the command
  • a DESCRIPTION section with the description taken from the argparse parser
  • an OPTION section with what is now in the NAMED ARGUMENTS and maybe POSITIONAL ARGUMENTS too? I'm not sure if usually the positional arguments are documented inside the DESCRIPTION section.

I'm not familiar with docutils library, so I'm not sure if those were meant to be subtitles inside the section, but the final results doesn't seems to follow best practices and the docstring in the code.

Versions used:

Sphinx==1.6.4
sphinx-argparse==0.2.1
docutils==0.14
``
@hstock
Copy link
Contributor

hstock commented Feb 21, 2019

Did you add the :manpage: parameter?

I had to add it like so:

ots manpage
===========

.. argparse::
   :module: otsclient.args
   :func: make_common_options_arg_parser
   :prog: ots
   :manpage: 

Seems this is missing from the docs.

@rite2hhh
Copy link

@hstock, after adding the :manpage: sub directive, My arguments are not documented anymore.

@hstock
Copy link
Contributor

hstock commented Aug 1, 2019

Currently not working on the project that needed this - but I'll get back to this for debian packaging of opentimestamps. (I am not directly involved in sphinx-argparse)

@paravoid
Copy link

I bumped into this bug while trying to generate tox's manpage using sphinx-argparse. I suspect the culprit is the usage of action groups in combination with a bug in the code. I think in this section of the code:
https://github.com/ribozz/sphinx-argparse/blob/178672cd5c846440ff7ecd695e3708feea13e4b4/sphinxarg/ext.py#L310-L312
…the second line should read if 'options' in action_group instead, no?

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

4 participants