23 lines
599 B
Python
23 lines
599 B
Python
#!/usr/bin/env python3
|
|
|
|
import argparse
|
|
import sys
|
|
|
|
|
|
VERSION="0.0.1"
|
|
|
|
if __name__ == '__main__':
|
|
parser = {}
|
|
|
|
parser['main'] = argparse.ArgumentParser(
|
|
description="ungleich cli {}".format(VERSION) )
|
|
parser['main'].add_argument(
|
|
'-V', '--version', help='Show version.', action='version',
|
|
version='%(prog)s ' + VERSION)
|
|
parser['sub'] = parser['main'].add_subparsers(
|
|
title="Commands", dest="command")
|
|
|
|
parser['register'] = parser['sub'].add_parser(
|
|
'register')
|
|
|
|
parser_args = parser['main'].parse_args(sys.argv[1:])
|