Page 1 of 1

looking for pgn- utility...

PostPosted: 08 Aug 2006, 10:26
by GenoM
hi all

i am looking for pgn-utility which can exctract games to 10th move from tournament pgn's.

thanks in advance,
Geno

Re: looking for pgn- utility...

PostPosted: 08 Aug 2006, 13:34
by George Lyapko
I have written one in 2003:http://www.geocities.com/lyapko/lgpgntr.zip

Georg Zimmerman in Winboard Forum have asked for utility, which will truncate
a PGN file that each game should be maximum X plies long. Here you are.
This is only a first approach, so it may have bugs. Please report them to me.

Known limitations/shortcuts:

a)game is truncated after comment or illegal move;
b)no long filenames support;
c)no footer result.

Usage:

LGPGNTR <InputFile> <OutputFile> <max.plies>

Enjoy,
George Lyapko

Re: looking for pgn- utility...

PostPosted: 08 Aug 2006, 20:19
by Norm Pollock
The chess engine Yace contains a utility that truncates games in a pgn file. It sounds strange, but it has worked whenever I used it.

in a command window launch: yace.exe
inside yace type:

cadiz_pgn thegamefile.pgn gamesuntill40.pgn n 40

where "thegamefile.pgn" is the original file,
"gamesuntil40.pgn" is the output file up to 40 plies,
and "40" is the number of plies which of course you can change.

Re: looking for pgn- utility...

PostPosted: 08 Aug 2006, 23:47
by GenoM
thanks George thanks Norm!