Utility to Convert chess Database to PGN Opening Repertoire

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Spill_The_Tea
Posts: 24
Joined: Mon Dec 17, 2018 3:33 am
Full name: Jase de Lace

Utility to Convert chess Database to PGN Opening Repertoire

Post by Spill_The_Tea »

Hi all,

I often find opening books in pgn format, such as Balsa Opening Suite for example:
https://sites.google.com/site/computers ... test-suite

Does anyone know if there is a utility to make something similar, from a database of chess games? Essentially polyglot, but remaining in pgn format.
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by xr_a_y »

Same question ! is there a command line tool somewhere ?
Spill_The_Tea
Posts: 24
Joined: Mon Dec 17, 2018 3:33 am
Full name: Jase de Lace

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by Spill_The_Tea »

xr_a_y wrote: Thu May 02, 2019 6:20 pm Same question ! is there a command line tool somewhere ?
Since I posted this, I learned about using the --plylimit option flag from pgn-extract.

In theory, you could successively use pgn-extract to first
1. Limit Ply (--plylimit), Remove All tags (--notags)
2. Remove Duplicates (-D), Add 7-tag Roster (-7) and ECO Codes (-e) Back to Games, and (if desired) output on a single line (-w1000)
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by Ferdy »

Spill_The_Tea wrote: Tue Apr 30, 2019 12:43 am Hi all,

I often find opening books in pgn format, such as Balsa Opening Suite for example:
https://sites.google.com/site/computers ... test-suite

Does anyone know if there is a utility to make something similar, from a database of chess games? Essentially polyglot, but remaining in pgn format.
What do you mean by essentially polyglot?
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by xr_a_y »

pgn-extract can handle .ctg file ?
Spill_The_Tea
Posts: 24
Joined: Mon Dec 17, 2018 3:33 am
Full name: Jase de Lace

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by Spill_The_Tea »

xr_a_y wrote: Fri May 03, 2019 6:40 am pgn-extract can handle .ctg file ?
No, I don't believe so. I don't use chessbase, but from my understanding, ctg is a book file (analogous to polyglot bin opening books), not a database (cbh)?