Forked from chess-tools, the goal of this project is to provide an easy way to parse opening books of various formats.
npm install chess-opening-book-reader
const buffer = somethingThatReturnsArrayBuffer()
import { OpeningBooks } from 'chess-opening-book-reader'
let parser = new OpeningBooks.CTG.CTGParser()
parser.on('batch', (batch) => {
// process batch of entries
// e.g. index them somewhere
})
parser.on('progress', (percentage) => {
// show percentage in UI
})
await parser.parse(buffer)
- CTG - used by products such as Chessbase
- Polyglot - used by a number of open source projects
Todo:
- ABK - used by products such as Arena
- EPD
- ECO
Note: Sample Files are believed to be in the public domain or licensed under GPL. Sources are provided below.
-
Chess Programming Wiki
-
ABK Format
-
Polyglot Format
-
CTG Format
-
CTGReader
-
EPD
-
ECO
- https://www.chessprogramming.org/ECO
- Sample ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/eco.pgn
-
Winboard/ XBoard Protocol
-
UCI