Created
May 31, 2022 03:27
-
-
Save roryk/ba72531b3b0f423dc8b9bd69beb63f8e to your computer and use it in GitHub Desktop.
Download a range of PGN files from The Week In Chess
This file contains hidden or 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 | |
TMPDIR=download | |
START=1161 | |
END=1438 | |
mkdir -p ${TMPDIR} | |
parallel -j 4 wget -P download https://theweekinchess.com/zips/twic{}g.zip ::: $(seq ${START} ${END}) | |
unzip -d ${TMPDIR} ${TMPDIR}/'*.zip' | |
cat ${TMPDIR}/*.pgn > twic_pgn_${START}_${END}.pgn | |
zip twic_pgn_${START}_${END}.zip twic_pgn_${START}_${END}.pgn | |
rm twic_pgn_${START}_${END}.pgn | |
rm -r ${TMPDIR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment