Utility to Convert chess Database to PGN Opening Repertoire

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Spill_The_Tea
Posts: 23
Joined: Mon Dec 17, 2018 2:33 am
Full name: Jase de Lace

Utility to Convert chess Database to PGN Opening Repertoire

Post by Spill_The_Tea » Mon Apr 29, 2019 10:43 pm

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: 1243
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by xr_a_y » Thu May 02, 2019 4:20 pm

Same question ! is there a command line tool somewhere ?

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

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by Spill_The_Tea » Thu May 02, 2019 10:35 pm

xr_a_y wrote:
Thu May 02, 2019 4: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: 4285
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by Ferdy » Thu May 02, 2019 11:06 pm

Spill_The_Tea wrote:
Mon Apr 29, 2019 10:43 pm
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: 1243
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by xr_a_y » Fri May 03, 2019 4:40 am

pgn-extract can handle .ctg file ?

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

Re: Utility to Convert chess Database to PGN Opening Repertoire

Post by Spill_The_Tea » Sat May 04, 2019 3:55 am

xr_a_y wrote:
Fri May 03, 2019 4: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)?

Post Reply