LichessDownloader

https://www.mediafire.com/file/g5wy1ycjcdz9i6u/LichessDownloader.zip/file

This script will prompt you for beginning and end year/month, then download everything you ask for, extract each one, and filter each one in pgn-extract according to certain criteria that can be changed.

This is what the file pgn-extract-command.txt looks like:

pgn-extract.exe {input} -t tags.txt -R roster.txt --xroster --minmoves 10 --maxmoves 150 --fixresulttags --fixtagstrings --nosetuptags -e --checkmate --plycount --evaluation -D -w9999 -o {output}

Anything from -t to -w can be changed. For instance, if you want to change the minimum and maximum moves — or to take one or both parameters out, here’s the place to do it. If you want to take out the requirement that a game end in checkmate, just take out the –checkmate option. The –evaluation option is what creates those evaluations for each move. The -w9999 is what makes each movelist one line. -D checks for doubles, -e specifies that you want ECO information and opening names. (Which is what eco.pgn is for.) If you want to change the contents of tags.txt, you’d either be changing the minimum Elo for either white or black, or the minimum time control — or taking any of those requirements out. The roster.txt file is a list of tag names, one per line, that define the order those tags go in. Specifying –xroster means that it will remove any tags *not* in the roster, as well as put them in the same order.

Because this script needs pgn-extract.exe to run, it’s necessary to keep the binary and all of its dependent files in the same directory as the script.

Leave a Reply

Your email address will not be published. Required fields are marked *