Last active
April 8, 2020 13:46
-
-
Save demaniak/1130309474635a82353f4c846a4a9912 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# | |
# Simple wrapper script for the python visualizer created by [Kobus van Schoor](https://gist.github.com/kobus-v-schoor) | |
# Runs the visualizer in a docker container | |
# | |
if [ ! -f viz.py ]; then | |
curl -L https://gist.github.com/kobus-v-schoor/ec1923bb09858a5037df21444aeabbcd/raw/7c282e7fac668e1771d0ccd29dc583cb7738430c/viz.py > viz.py | |
chmod +x viz.py | |
fi | |
PATH_TO_LOGS=$(readlink -f $1) | |
echo "Target folder is $PATH_TO_LOGS" | |
# Comment out/remove the next two lines if you do not gzip your match logs | |
echo unzipping $PATH_TO_LOGS | |
gunzip -r $PATH_TO_LOGS | |
docker run -it --rm -v "$PATH_TO_LOGS:/src" -v "$PWD/viz.py:/src/viz.py" -w /src python:3.8.2 /src/viz.py | |
# Comment out/remove the next 2 lines if you do not gzip your match logs | |
echo zip it again | |
gzip -r $PATH_TO_LOGS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run like so: