diff --git a/README.md b/README.md index 5364110..4b47393 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,19 @@ Pokemon Showdown data processing, mostly for HHIRLLL's Pokemon league. Ugly as fuck. + +## Requirements + +- Python with sqlite +- requests + +## Usage + +```sh +$ ./main.py -h +usage: hhirlstats [-h] [-v] [-c] [-Q {gametime,moves,nicknames,playtime,usage}] [replay ...] +``` + +Recommended to cache replays (`-c`) to save issuing requests to Showdown on every query. + +Run the program once with all your replays (or once for each replay), then start querying. diff --git a/main.py b/main.py index 4ceba45..5cb27d8 100755 --- a/main.py +++ b/main.py @@ -284,6 +284,11 @@ def main(): if args.query: query(args.query, db) else: + if not args.replay: + parser.print_usage() + print(f"{APP}: error: either query or replay arguments are required") + sys.exit(1) + for r in args.replay: try: replay = fetch(r, cache=args.cache)