Page 1 of 5

PGN Extract

Posted: Mon Sep 19, 2011 3:46 am
by LucenaTheLucid
Has anyone ever coded an interface for PGN extract? I think this would be an extremely useful tool. I understand that a lot of you do not mind using a command line but it is extremely painful for me. I understand that this would be a non-trivial task but never the less it would save me lots of time in cleaning PGN files.

I would code such a thing myself but alas I do not know how to program.

Or does anyone know of a database with all of the functions that PGN extract supports? I have the newest version of scid but it still seems very limited on what it can do.

Re: PGN Extract

Posted: Mon Sep 19, 2011 6:39 am
by Jim Ablett
LucenaTheLucid wrote:Has anyone ever coded an interface for PGN extract? I think this would be an extremely useful tool. I understand that a lot of you do not mind using a command line but it is extremely painful for me. I understand that this would be a non-trivial task but never the less it would save me lots of time in cleaning PGN files.

I would code such a thing myself but alas I do not know how to program.

Or does anyone know of a database with all of the functions that PGN extract supports? I have the newest version of scid but it still seems very limited on what it can do.
Hi Luis,

I wrote little batch file based tool a while back which uses PgnExtract (among other utilitities such as Norm Pollocks pgn tools)
to automatically clean pgns. Not a gui I know, but might be useful to you.

http://www.mediafire.com/?9wsibbbe66q84y1

Jim.

Re: PGN Extract

Posted: Sun Sep 25, 2011 7:01 pm
by Ferdy
LucenaTheLucid wrote:Has anyone ever coded an interface for PGN extract? I think this would be an extremely useful tool. I understand that a lot of you do not mind using a command line but it is extremely painful for me. I understand that this would be a non-trivial task but never the less it would save me lots of time in cleaning PGN files.

I would code such a thing myself but alas I do not know how to program.

Or does anyone know of a database with all of the functions that PGN extract supports? I have the newest version of scid but it still seems very limited on what it can do.
I started building one, what options do you use most or would like to be added aside from cleaning the files? I can't implement all :) not this time. It is a typical window form using ms visual c#.
What I have implemented so far are:
* no comments
* no variations
* no NAGs
* no tags
* no move numbers
* no results
* remove duplicates
* add ECO (requires eco.pgn)
* ply limit
* line length

Re: PGN Extract

Posted: Mon Sep 26, 2011 2:08 am
by LucenaTheLucid
Your generosity is plenty. I think that is probably more features than I wanted. Not that I am complaining you see. ^_^

I spent 3 hours fumbling with PGN Extract. Guess I am just not smart enough to do it. Also thought it would be a great idea if you could just specify a file directory and tick which options you wanted and pushed the "clean" button or something like that. It actually surprises me no one has done it yet.

Also Jim your tool is mighty useful. I can only get it to go 1 run though. Any 2nd PGN file I want to run through it just outputs a blank file.

Re: PGN Extract

Posted: Thu Oct 20, 2011 3:00 pm
by Ferdy
Pgn-extract Interface is now released can be found here.
https://sites.google.com/site/deuterium ... ownloads-1

Not all options are implemented though. Options implemented are:
* no comments
* no variations
* no NAGs
* no tags
* no move numbers
* no results
* remove duplicates
* add ECO (requires eco.pgn)
* ply limit
* line length
* search games by elo rating
* search games by players
* search games by year
* search games by ECO
* search games by number of moves in a game
* search games by result, 1-0, 0-1 and others
* able to separate games of a player out from the given pgn file
* able to separate games by criteria out from a given pgn file
* output games into files based on the number of games in a file
* output games into files based on ECO codes
* change move formats such as long algebraic and others
* added a tool to combined pgn files

Sample search combination can be done easily, like
search games played by Crafty as white where the result is 1-0 with opponent having a rating of 2800 and above in the year 2008-2010, limited to number of moves not more than 40, clean the output file and remove duplicates.

Be reminded to read the readme file. Also pgn-extract is not included in the package, you have to download it yourself.

Thanks to the excellent pgn-extract program file.
Thanks to Luis for giving me the drive to create this.

Re: PGN Extract

Posted: Thu Oct 20, 2011 3:28 pm
by Giorgio Medeot
Ferdy wrote:Thanks to the excellent pgn-extract program file.
Thanks to Luis for giving me the drive to create this.
And thanks to you for providing this neat interface!

Cheers,
  • Giorgio

Re: PGN Extract

Posted: Thu Oct 20, 2011 4:28 pm
by LucenaTheLucid
Thank you Ferdinand. This tool has been a great help.

Re: PGN Extract

Posted: Thu Oct 20, 2011 10:36 pm
by Adam Hair
And I will again thank you for the interface.. :)

Re: PGN Extract

Posted: Sat Oct 22, 2011 6:46 am
by JManion
2 questions

1. When I downloaded the interface and the pgn extract, I put them in the same folder. I then clicked on the pgn-interface and got the following error

unable to find a version of runtime to run this app.

2. I tried to follow the directions without the interface. I putt he pgn file in the folder. I doubled clicked on the process file. In 1 second it was done and the pgn disappeared. I checked the folders and I had all blank files.

The pgn is roughly 2 GB with plenty of games.

thanks for the help

Re: PGN Extract

Posted: Sat Oct 22, 2011 7:35 am
by LucenaTheLucid
Even though they are in the same directory you still have to point to where PGN Extract is at in the interface. You can do this by hitting the PGN-Extract button at the top.