From f36f9b5803866bbe4b9cc8506cfe9449ceac3773 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 10 Dec 2020 21:59:47 -0800 Subject: [PATCH] add bitelab as a script to get installed, display usage if no commands.. --- bitelab/__main__.py | 3 +++ setup.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/bitelab/__main__.py b/bitelab/__main__.py index af2971e..95adc71 100644 --- a/bitelab/__main__.py +++ b/bitelab/__main__.py @@ -159,6 +159,9 @@ async def real_main(): brd = Board.parse_obj(res.json()) output_board(brd) + else: + parser.print_usage() + sys.exit(5) finally: await client.aclose() diff --git a/setup.py b/setup.py index b8f270f..967b30c 100644 --- a/setup.py +++ b/setup.py @@ -30,4 +30,9 @@ setup( extras_require = { 'dev': [ 'coverage' ], }, + entry_points={ + 'console_scripts': [ + 'bitelab = bitelab.__main__:main', + ] + } )