From 73907d5f71f926725c3c3eb6d1716f0a3eb4d159 Mon Sep 17 00:00:00 2001 From: Calum Andrew Morrell Date: Wed, 22 Nov 2023 13:40:44 +0000 Subject: [PATCH] updated parsers --- .idea/misc.xml | 3 +++ dgcm/main.py | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index f9fb4b6..5f4c4f0 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,7 @@ + + \ No newline at end of file diff --git a/dgcm/main.py b/dgcm/main.py index 48a8d13..06ceb76 100644 --- a/dgcm/main.py +++ b/dgcm/main.py @@ -3,7 +3,9 @@ import argparse def main(): - parser = argparse.ArgumentParser(prog='dgcm') + parser = argparse.ArgumentParser(prog='dgcm', + # usage='dgcm [OPTIONS]...', + description='The Dazed Gerbil Connection Manager') command_group = parser.add_argument_group('Command options') command_group.add_argument('-a', '--add', action='store_true', help='add a new connection') @@ -18,8 +20,9 @@ def main(): connection_group.add_argument('-P', '--port', help='specify the port if non-standard') connection_group.add_argument('-S', '--shortname', help='provide a short name for faster access') - parser.add_argument('-v', '--verbose', action='count', default=0, help='increase output verbosity') - parser.add_argument('-q', '--quiet', action='store_true', help='disable output') + mutually_exclusive_group = parser.add_mutually_exclusive_group() + mutually_exclusive_group.add_argument('-v', '--verbose', action='count', default=0, help='increase output verbosity') + mutually_exclusive_group.add_argument('-q', '--quiet', action='store_true', help='disable output') # parser.add_argument('connection', help='shortname of the connection to use')