Last active
February 1, 2024 14:04
-
-
Save chmeee/0bd833d52e283c7430ca8e5ea8eb512b to your computer and use it in GitHub Desktop.
Get latest SGF files from OGS
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
# OGS_ID es tu número de usuario (https://online-go.com/player/XXXXXXX) | |
# la secuencia genera números del 1 al 4 por defecto y cada página son 10 partidas | |
for i in $(seq 1 4); do | |
curl -sLk 'https://online-go.com/api/v1/players/'${OGS_ID}'/games/?ordering=-ended&page='$i \ | |
| jq -r '.results[].related.detail' | |
done | while read game; do | |
echo $game | |
curl -sLk https://online-go.com/${game}/sgf -o $(basename $game).sgf | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment