from .discover import *


def main(parser, args):
    command = CommandManager()
    command.set_args(args)
    command.listen()


def build_arg_parser(parser, desc):
    label = desc['label']
    hlp = desc['help']

    parser.description = desc['description']

    parser.add_argument(
        '-o',
        '--output',
        type=str,
        metavar=label['output'],
        help=hlp['output'],
        widget='FileChooser',
    )
    parser.add_argument(
        '--format',
        action='store',
        default="IP='{IP}', MAC='{MAC}'",
        metavar=label['format'],
        help=hlp['format'],
    )
