diff --git a/manatus/__main__.py b/manatus/__main__.py index b9e7ac6..b7d78f5 100644 --- a/manatus/__main__.py +++ b/manatus/__main__.py @@ -143,15 +143,26 @@ # Application status if args.subcommand == 'status': - print("These config files are loaded:") - print(f" {os.path.join(CONFIG_PATH, 'manatus.cfg')}") - print(f" {os.path.join(CONFIG_PATH, 'manatus_harvests.cfg')}") - print(f" {os.path.join(CONFIG_PATH, 'manatus_scenarios.cfg')}") - print("XML data path:") - print(f" {os.path.abspath(manatus_config[profile]['InFilePath'])}") - print("JSON data path:") - print(f" {os.path.abspath(manatus_config[profile]['OutFilePath'])}") - sys.exit(0) + if not args.preview: + print("These config files are loaded:") + print(f" {os.path.join(CONFIG_PATH, 'manatus.cfg')}") + print(f" {os.path.join(CONFIG_PATH, 'manatus_harvests.cfg')}") + print(f" {os.path.join(CONFIG_PATH, 'manatus_scenarios.cfg')}") + print("XML data path:") + print(f" {os.path.abspath(manatus_config[profile]['InFilePath'])}") + print("JSON data path:") + print(f" {os.path.abspath(manatus_config[profile]['OutFilePath'])}") + sys.exit(0) + + # Application output preview + if args.preview == 'json': + from datetime import date + print(f"{manatus_config[profile]['OutFilePath']}/{manatus_config[profile]['OutFilePrefix']}-{date.today()}.json") + sys.exit(0) + if args.preview == 'jsonl': + from datetime import date + print(f"{manatus_config[profile]['OutFilePath']}/{manatus_config[profile]['OutFilePrefix']}-{date.today()}.jsonl") + sys.exit(0) ####################### # Harvest sub-command # diff --git a/manatus/cli/__init__.py b/manatus/cli/__init__.py index 7b3daa7..4e32348 100644 --- a/manatus/cli/__init__.py +++ b/manatus/cli/__init__.py @@ -46,7 +46,9 @@ def argument_parser(): formatter_class=CustomHelpFormatter) subcommand_parsers = arg_parser.add_subparsers(help='subcommands', dest='subcommand') subcommand_parsers.required = False - subcommand_parsers.add_parser('status', help='show status') + + status_parser = subcommand_parsers.add_parser('status', help='show status') + status_parser.add_argument('--preview', choices=['json', 'jsonl'], help='preview output filename') # generic config parser # adds options to harvest & transform subcommands diff --git a/setup.py b/setup.py index 5f75abf..1e5e63b 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='manatus', - version='1.0.5', + version='1.0.6', packages=find_packages(), url='http://github.com/SunshineStateDigitalNetwork/manatus', license='MIT', diff --git a/source/conf.py b/source/conf.py index 67a83b2..0379c79 100644 --- a/source/conf.py +++ b/source/conf.py @@ -25,7 +25,7 @@ # The full version, including alpha/beta/rc tags # release = __version__ -release = '1.0.5' +release = '1.0.6' # -- General configuration ---------------------------------------------------