argparse-manpage icon indicating copy to clipboard operation
argparse-manpage copied to clipboard

Something like `argparse.build_manpages` dict

Open praiskup opened this issue 8 years ago • 3 comments

It could look like

argparse.build_manpages = {
    'ENVIRONMENT' = {
        'description': """ The description... """,
        'vars': {
            'CONFIG_FOO': "Description for CONFIG_FOO",
        }
    },
}

Each item could mean new section?

praiskup avatar Nov 23 '17 09:11 praiskup

I think I would prefer something like this:

class ManpageMetadata:
    description = None
    section = None
 
    def __init__(self, parser):
        parser._some_private_pointer = self

The ManpageMetadata could have any continuously growing API, in a "declarative" manner. The Manpage then could on its own identify the parser._some_private_pointer and use the provided data.

praiskup avatar Oct 27 '22 15:10 praiskup

Does --include replace this?

rrthomas avatar Apr 12 '23 09:04 rrthomas

This RFE still seems appealing to me, even if we have --include. My plan was to migrate the https://github.com/fedora-copr/copr utilities to argparse-manpage generator, and see if this is or isn't needed.

praiskup avatar Apr 12 '23 13:04 praiskup