diff --git a/esds/__main__.py b/esds/__main__.py index 5e818de..35637c1 100644 --- a/esds/__main__.py +++ b/esds/__main__.py @@ -1,5 +1,6 @@ import sys, argparse, os from esds.helpers.platform import YAMLPlatformFile +from esds import __version__ # Allow importlib to import file from current working directory sys.path.insert(0, os.getcwd()) @@ -17,13 +18,17 @@ def run(arguments): def main(): ##### Parse arguments parser = argparse.ArgumentParser( - description='ESDS Simulator CLI toolbox. Allow you to run simulations and perform various tasks.') - parser.add_argument("command", help="Execute the specified command", nargs=argparse.REMAINDER) + description='ESDS simulator command line interface. Run simulations and perform various simulation tasks.', + formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument("command", help="Execute the specified command.\nAvailable commands are: run", nargs=argparse.REMAINDER) + parser.add_argument("--version", help="Show esds version", action="store_true") args = parser.parse_args() ##### Run commands if args.command: if args.command[0] == "run": run(args.command) + elif args.version: + print("ESDS v"+__version__) else: parser.print_help()