update readme
This commit is contained in:
parent
757a17a7ca
commit
fb91302032
16
README.md
16
README.md
@ -2,3 +2,19 @@
|
|||||||
|
|
||||||
Pokemon Showdown data processing, mostly for HHIRLLL's Pokemon league. Ugly as
|
Pokemon Showdown data processing, mostly for HHIRLLL's Pokemon league. Ugly as
|
||||||
fuck.
|
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.
|
||||||
|
5
main.py
5
main.py
@ -284,6 +284,11 @@ def main():
|
|||||||
if args.query:
|
if args.query:
|
||||||
query(args.query, db)
|
query(args.query, db)
|
||||||
else:
|
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:
|
for r in args.replay:
|
||||||
try:
|
try:
|
||||||
replay = fetch(r, cache=args.cache)
|
replay = fetch(r, cache=args.cache)
|
||||||
|
Loading…
Reference in New Issue
Block a user