OpeningRepertoire is a command line tool that generates opening repertoires from chess games in PGN format. The output can be imported into a study tool that lets you analyze (e.g. lichess) or practice (e.g. chessable) your repertoire.
Use the package manager cargo to install opening-repertoire.
cargo install --git https://github.com/zcesur/opening-repertoire
opening-repertoire [FLAGS] [OPTIONS] --color <COLOR> --path <FILE>
FLAGS:
--disable-pruning By default, moves are pruned with respect to the repertoire color such that there is a
single response for each opponent move
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --color <COLOR> Repertoire color: either 'white' or 'black'
-d, --inode-max-depth <NUM> Maximum depth of variations that stem from internal (non-leaf) nodes [default: 8]
-m, --max-moves <NUM> Maximum number of moves [default: 10]
-t, --output-type <STRING> Type of output: either 'pgn', 'json', 'json-pretty' or 'tree' [default: pgn]
-p, --path <FILE> path/to/games.pgn
-s, --starting-moves <STRING> Filter games by some comma-separated starting moves, e.g. 'e4,c5'
Let's build a white repertoire against the Sicilian Defence (1. e4 c5):
wget https://raw.githubusercontent.com/zcesur/opening-repertoire/master/data/ericrosen-white.pgn
opening-repertoire -p ericrosen-white.pgn -c white -s e4,c5
Pull requests are welcome!
Distributed under the BSD 3-Clause License. See the LICENSE file for more information.