sphinx-contrib / sphinx-contrib/autoprogram

Subparsers help is not shown

Open
#46 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
48
Forks
24
Avg merge
2h 15m
Merged PRs (30d)
1

Description

Usually I describe in short what a subcommand does by putting a text into a subparsers help argument. Argparser renders it like this:

$ disco -h
usage: disco [-h] [-v] [-o] {search,mix,suggest,import,setup} ...

positional arguments:
  {search,mix,suggest,import,setup}
    search              searches for releases and tracks in the Discogs
                        collection. Several actions can be executed on the
                        found items, eg. adding to a mix, updating track info
                        from Discogs or fetching additional information from
                        MusicBrainz/AcousticBrainz. View this subcommand's
                        help: disco search -h.
    mix                 manages your mixes. View this subcommand's help:
                        "disco mix -h."       
...          

This help is not shown anywhere in autoprogram generated manpages or html pages. How could I enable it so it is included in the main command section similar to how argparser shows it in main command --help?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing autoprogram's generation of manpages and HTML pages, then find where argparse subparser descriptions are handled for the main command section. Compare that output with the shown argparse help and verify that subparser help appears in both generated formats without losing existing command documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.