How to stream chess positions off the internet

Discussion of chess software programming and technical issues.

Moderator: Ras

dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

How to stream chess positions off the internet

Post by dangi12012 »

I did it wrong in the past. To get chess games as a list of fens just do this!

Code: Select all

wget -qO- https://database.lichess.org/standard/lichess_db_standard_rated_2022-08.pgn.bz2 | bzip2 -dc | pgn-extract -Wfen
That makes me wonder - is there a http to uci adapter somewhere?

Some software that literally only pipes stdout and stdin over http
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: How to stream chess positions off the internet

Post by dangi12012 »

Even better:

Code: Select all

wget -qO- https://database.lichess.org/standard/lichess_db_standard_rated_2022-08.pgn.bz2 | bzip2 -dc | pgn-extract -Wfen -s | grep -v "\[" | awk '{ print $1, $2, $3, $4}' | grep "\S" | uniq -u > fens.txt
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer