Compare commits
2 Commits
4de2b8b8bb
...
6b36720c37
Author | SHA1 | Date | |
---|---|---|---|
6b36720c37 | |||
39f412c0fe |
@ -11,8 +11,8 @@ fuck.
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ ./main.py -h
|
$ ./index.py -h
|
||||||
usage: hhirlstats [-h] [-v] [-C] [-o FILE] replay [replay ...]
|
usage: hhirlstats [-h] [-v] [-C] [-t FILE] [-o FILE] replay [replay ...]
|
||||||
|
|
||||||
extracts stats from a Showdown replay
|
extracts stats from a Showdown replay
|
||||||
|
|
||||||
@ -23,6 +23,8 @@ options:
|
|||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-v, --verbose add debugging info (default: None)
|
-v, --verbose add debugging info (default: None)
|
||||||
-C, --no-cache fetch replays instead of using cache (default: False)
|
-C, --no-cache fetch replays instead of using cache (default: False)
|
||||||
|
-t FILE, --teams FILE
|
||||||
|
JSON file defining players to teams (default: teams.json)
|
||||||
-o FILE, --output FILE
|
-o FILE, --output FILE
|
||||||
output data file (default: data.db)
|
output data file (default: data.db)
|
||||||
```
|
```
|
||||||
|
@ -358,7 +358,7 @@ def fetch(replay: str, cache: bool = True) -> Replay:
|
|||||||
return Replay(**data)
|
return Replay(**data)
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog=APP,
|
prog=APP,
|
||||||
description="extracts stats from a Showdown replay",
|
description="extracts stats from a Showdown replay",
|
||||||
@ -389,7 +389,7 @@ def main(args):
|
|||||||
)
|
)
|
||||||
parser.add_argument("replay", nargs="+", help="replay ID or URL")
|
parser.add_argument("replay", nargs="+", help="replay ID or URL")
|
||||||
|
|
||||||
args = parser.parse_args(args)
|
args = parser.parse_args()
|
||||||
if args.verbose and args.verbose > 1:
|
if args.verbose and args.verbose > 1:
|
||||||
LOG.setLevel(logging.TRACE)
|
LOG.setLevel(logging.TRACE)
|
||||||
elif args.verbose:
|
elif args.verbose:
|
||||||
@ -435,4 +435,4 @@ def main(args):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(sys.argv[1:])
|
main()
|
Loading…
Reference in New Issue
Block a user