Page 2 of 4

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 1:26 am
by Adam Hair
Adam Hair wrote:I think what Paul means is that he wants to order the games in his source pgn so that games 1, 6, 11, ... are eco code A, games 2, 7, 12, ... are eco B, ..., and games 5, 10, 15, .... are eco code E.

I think I have the means of doing this using pgn extract, some of Norm Pollock's tools, Unix commands, and an unreleased version of Gaviota that can match a position in an epd file to a game containing that position. It would be a convoluted process, but it might work okay.
I failed. I have an epd of the final positions sorted in the manner Paul desires. And I have a method for converting the epd into a pgn using Paul's source pgn. Unfortunately, I have no way of converting the epd into a pgn that preserves the order of the epd. Hopefully Norm can get work this out.

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 1:37 am
by PaulieD
Adam,

Thanks so much for your efforts! I appreciate the work you have put into this.

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 1:55 am
by Adam Hair
You are welcome Paul. I wish I could have completed the job.

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 3:08 am
by Norm Pollock

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 3:28 am
by reflectionofpower
Chess Assistant 13 does it easily

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 3:44 am
by Graham Banks
Hi Norm,

I'm interested in this pgn, but I can't extract it from the zip file.

Regards,
Graham.

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 3:48 am
by Norm Pollock
Graham Banks wrote:
Hi Norm,

I'm interested in this pgn, but I can't extract it from the zip file.

Regards,
Graham.
I used 7-zip with no problem.

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 4:13 am
by Graham Banks
Norm Pollock wrote:
Graham Banks wrote:
Hi Norm,

I'm interested in this pgn, but I can't extract it from the zip file.

Regards,
Graham.
I used 7-zip with no problem.
Okay. It worked this time. Sorry to bother you.

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 4:13 am
by PaulieD
Norm,

I cannot thank you enough, THIS will be a great opening suite now.
You worked hard and I really appreciate all your efforts.

Everyone enjoy!!

Re: Looking for PGN sorting but in order of my choice

Posted: Mon Jan 19, 2015 4:50 am
by Ferdy
PaulieD wrote:What happened is it put them in all A00 then all A01 and so on
I should have been more specific possibly.
Game 1 any A Eco code
Game 2 any B Eco code
Game 3 any C Eco code

It was quick I hope that file can be modified to accomplish my request.
Many Thanks.

Edit:
I tried the E1 switch and all it did was jumble all the A's to the top of the pgn.
I thought I also need this tool to my test sets, so I have done a python script together with pgn-extract to do this. Install python and rename your original pgn file to src.pgn. The script also uses system cmd and tested to work in windows 7. Note there is a sample src.pgn in the download file as a sample. Also pgn-extract-17-14 is already included.

Sample run. I use your uploaded pgn file.

Code: Select all

found src.pgn !!
Deleting existing a.pgn ... e.pgn files ...
pgn-extract-17-14 running to get a.pgn ... e.pgn ...
Count games in a.pgn ... e.pgn to get max games ...
a numgames 1458
b numgames 1100
c numgames 622
d numgames 1088
e numgames 732
max value 1458
total games 5000
Writing games please wait this may take time ...
Fixing spaces between games in output pgn file ...
Deleting unwanted files ...
time: 52.2 sec
done!! look at out.pgn

press any key to exit
Download:
http://www.mediafire.com/download/tk996 ... _games.rar