argparse-manpage
argparse-manpage copied to clipboard
Something like `argparse.build_manpages` dict
It could look like
argparse.build_manpages = {
'ENVIRONMENT' = {
'description': """ The description... """,
'vars': {
'CONFIG_FOO': "Description for CONFIG_FOO",
}
},
}
Each item could mean new section?
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.
Does --include replace this?
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.