~nighthawk/pkg2wordlist

edb921a12ac1e0bcff1692bbf46fe3577f285c8c — Frank Brodbeck 4 months ago 97276d6
more traditional help message
1 files changed, 13 insertions(+), 5 deletions(-)

M pkg2wordlist.py
M pkg2wordlist.py => pkg2wordlist.py +13 -5
@@ 64,16 64,24 @@ def main(args):
        print(line.rstrip())

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description = 'Felch package contents')
    parser.add_argument('-o', help = "distribution/os name", required = True, 
    parser = argparse.ArgumentParser(description = 'Felch package contents', add_help = False)

    # just give me one anonymous argument group
    myargs = parser.add_argument_group()

    # optional args
    myargs.add_argument('-h', help = "show this help message", action = "help")
    myargs.add_argument('-a', help = "arch", required = False, dest = 'arch', default = 'all')

    # required args
    myargs.add_argument('-o', help = "distribution/os name", required = True, 
            choices = [
                'ubuntu',
                'debian',
                'arch',
            ],
            dest = 'osname')
    parser.add_argument('-r', help = "release / repository (e.g. arch)", required = True, dest = 'release')
    parser.add_argument('-p', help = "packagename", required = True, dest = 'pkg')
    parser.add_argument('-a', help = "arch", required = False, dest = 'arch', default = 'all')
    myargs.add_argument('-r', help = "release / repository (e.g. arch)", required = True, dest = 'release')
    myargs.add_argument('-p', help = "packagename", required = True, dest = 'pkg')

    main(parser.parse_args())