Skip to content

One manpage per subcommand output #45

@JOJ0

Description

@JOJ0

Is it possible to output multiple manpages/html pages eg for commands with multiple subcommands and a lot of options? I'd like to have the main command in a page and each subcommand in a separate page.

I try as follows but don't get the expected results.

Main command rst file - I try to remove all subcommands in the output my setting maxdepth: 0 but it does not work. Still all subcommands are included in the disco section:

.. autoprogram:: discodos.cmd.cli:ArgParse.parser
    :prog: disco
    :maxdepth: 0
    :groups:

one of the subcommand rst files - works as expected, only the disco searchcommand is shown:

.. autoprogram:: discodos.cmd.cli:ArgParse.parser
    :prog: disco
    :start_command: search
    :maxdepth: 1
    :groups

I have some index rst files too and in html output what I am trying to achieve looks quite good already, except the main command issue. These are the index files:

DiscoDOS manual
***************

.. toctree::
    :maxdepth: 2

    index_commands_reference
Commands reference
******************

.. toctree::
    :maxdepth: 1

    disco
    disco_search
    disco_mix
    disco_suggest
    disco_import
    disco_setup

In manpage output I still get one big manpage, containing all subcommands. How can I control that pages should be separated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions