Created
January 13, 2021 02:48
-
-
Save ZephyrBlu/f24ea40eb38127640194691959f957f6 to your computer and use it in GitHub Desktop.
Simple script for analyzing your replays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from zephyrus_sc2_parser import parse_replay | |
# change this to match the directory you're using | |
replays = Path('replays') | |
def recurse(dir_path): | |
""" | |
Recursively searches directories to parse replay files | |
""" | |
for obj_path in dir_path.iterdir(): | |
if obj_path.is_file(): | |
replay = parse_replay(obj_path) | |
# do stuff with the data | |
elif obj_path.is_dir(): | |
recurse(obj_path) | |
recurse(replays) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment