Skip to content

A collection of packages for chess analysis grouped under a @Chess-Tools scope.

License

Notifications You must be signed in to change notification settings

gmcheems-org/chess-opening-book-reader

 
 

Repository files navigation

chess-opening-book-reader

Forked from chess-tools, the goal of this project is to provide an easy way to parse opening books of various formats.

Installation

npm install chess-opening-book-reader

Usage

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)

Supported Formats:

  • 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

References

Note: Sample Files are believed to be in the public domain or licensed under GPL. Sources are provided below.

About

A collection of packages for chess analysis grouped under a @Chess-Tools scope.

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 100.0%