raccrompton / BookBuilder

An automatic Chess opening repertoire Builder
GNU General Public License v3.0
126 stars 18 forks source link

Output a PGN tree instead of multiple separate lines #11

Open kamekura opened 2 years ago

kamekura commented 2 years ago

PGN supports variations, so the natural way of storing an opening book is via a tree. Instead of writing a separate line for each variation, BookBuilder should write a tree.

LouisDeconinck commented 1 year ago

I support this request. It would make it easier to analyze lines using Lichess.

Lukwrt commented 1 year ago

A quick research on github https://github.com/search?q=merge+pgn gives a few repos.

I think we can integrate https://github.com/permutationlock/merge-pgn to this repo.

For now you can do python merge-pgn.py yourgeneratedfile.py >>> merged_file.py to have what you want.

The repo I quoted only merges all the games in one pgn with all the variations but doesn't take annotations or evaluations into account I think so we might have to work on this if we want to properly integrate it.