From 18cdd1dd468f1dea98b046dee69396d9df2d7143 Mon Sep 17 00:00:00 2001 From: Sebastian Lenzlinger Date: Wed, 8 May 2024 03:53:17 +0200 Subject: [PATCH] Add help text to subcommands. This way they appear better in the console. --- code/iottb/__main__.py | 3 ++- code/iottb/subcommands/add_device.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/iottb/__main__.py b/code/iottb/__main__.py index e5569ee..a14754a 100644 --- a/code/iottb/__main__.py +++ b/code/iottb/__main__.py @@ -21,7 +21,8 @@ def setup_argparse(): # Utility to list interfaces directly with iottb instead of relying on external tooling - interfaces_parser = subparsers.add_parser('list-interfaces', aliases=['li', 'if']) + interfaces_parser = subparsers.add_parser('list-interfaces', aliases=['li', 'if'], + help='List available network interfaces.') interfaces_parser.set_defaults(func=list_interfaces) return root_parser diff --git a/code/iottb/subcommands/add_device.py b/code/iottb/subcommands/add_device.py index 05f0be6..d3fb9f8 100644 --- a/code/iottb/subcommands/add_device.py +++ b/code/iottb/subcommands/add_device.py @@ -10,7 +10,8 @@ logger.setLevel(logging.INFO) # Since module currently passes all tests def setup_init_device_root_parser(subparsers): - parser = subparsers.add_parser('add-device', aliases=['add-device-root', 'add']) + parser = subparsers.add_parser('add-device', aliases=['add-device-root', 'add'], + help='Initialize a folder for a device.') parser.add_argument('--root_dir', type=pathlib.Path, default=pathlib.Path.cwd()) group = parser.add_mutually_exclusive_group() group.add_argument('--guided', action='store_true', help='Guided setup', default=False)