diff --git a/hanabi/hanabi_cli.py b/hanabi/cli.py similarity index 99% rename from hanabi/hanabi_cli.py rename to hanabi/cli.py index 13872c8..ee1406c 100755 --- a/hanabi/hanabi_cli.py +++ b/hanabi/cli.py @@ -11,10 +11,13 @@ from hanabi.live import compress from hanabi.database import init_database """ +Commands supported: + init db + populate tables download games of variant download single game analyze single game + """ @@ -145,7 +148,3 @@ def hanabi_cli(): method_args.pop('command') method_args.pop('verbose') switcher[args.command](**method_args) - - -if __name__ == "__main__": - hanabi_cli() diff --git a/hanabi_cli.py b/hanabi_cli.py new file mode 100755 index 0000000..6b8724d --- /dev/null +++ b/hanabi_cli.py @@ -0,0 +1,10 @@ +#!/bin/bash/python3 + +""" +Short executable file to start the command-line-interface for the hanabi package. +Note this is not part of the package itself +""" + +from hanabi import cli + +cli.hanabi_cli() diff --git a/test.py b/test.py index 4a8420e..698ef17 100644 --- a/test.py +++ b/test.py @@ -4,7 +4,7 @@ from hanabi.live.download_data import download_games, detailed_export_game from hanabi.database.database import conn, cur from hanabi.database import init_database -from hanabi.hanabi_cli import hanabi_cli +from hanabi.cli import hanabi_cli def find_double_dark_games(): cur.execute("SELECT variants.id, variants.name, count(suits.id) from variants "