move executable cli file outside of package structure

This commit is contained in:
Maximilian Keßler 2023-07-05 19:00:50 +02:00
parent 8a2774bf93
commit f94fe23f60
Signed by: max
GPG key ID: BCC5A619923C0BA5
3 changed files with 14 additions and 5 deletions

View file

@ -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()

10
hanabi_cli.py Executable file
View file

@ -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()

View file

@ -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 "