From 850dca6374fdfc88d87173845c205a6c1ef5e5c6 Mon Sep 17 00:00:00 2001 From: herbert koelman Date: Thu, 5 Dec 2019 10:53:25 +0100 Subject: [PATCH] refs #22 --- artifacts/__init__.py | 3 ++- artifacts/main.py | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 artifacts/main.py diff --git a/artifacts/__init__.py b/artifacts/__init__.py index ebb3d5f..f01107a 100644 --- a/artifacts/__init__.py +++ b/artifacts/__init__.py @@ -2,4 +2,5 @@ from .package import * from .repository import * from .requirements import * -from .version import __version__ \ No newline at end of file +from .version import __version__ +from .main import * \ No newline at end of file diff --git a/artifacts/main.py b/artifacts/main.py new file mode 100644 index 0000000..1f6aa64 --- /dev/null +++ b/artifacts/main.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +import artifacts +import argparse + +""" +This is the main command that dispatches commands. +""" + +def artifacts_command(): + parser = argparse.ArgumentParser( + prefix_chars='-', + formatter_class=argparse.RawTextHelpFormatter, + description='handles artifacts (deploy, list, copy, search, ...).', + epilog="program version: {version}".format(version=artifacts.__version__) + + ) +if __name__ == '__main__': + artifacts_command()