This directory contains the C source code and win32 binary for version 16.7 of the pgn-extract program. This is a command-line program for manipulating chess games recorded in the Portable Game Notation (PGN). This program is made available under the terms of the GNU General Public License.
These are the C sources and win32 binary for a program to extract selected games from a PGN format data file. There are several ways to specify the criteria on which to extract: for instance, textual move sequences, the position reached after a sequence of moves, information in the tag fields, and material balance in the ending. The program includes a semantic analyser which will report errors in game scores and it is also able to detect duplicate games found in its input files.
The range of input move formats accepted is fairly wide and includes recognition of lower-case piece letters for English and upper-case piece letters for Dutch and German. The output is normally in English Standard Algebraic Notation (SAN), but this can be varied.
Extracted games may be written out either including or excluding comments, NAGs, variations, move numbers, tags and/or results. Games may be given ECO classifications derived from the accompanying file eco.pgn, or a customised version provided by the user.
A full description of pgn-extract's functionality is available and included with the sources.
Use the -h and (unnecessarily cryptic) -h1 (h one) argument to the program to get the full lists of arguments. (This will be improved in a future version.)
Long-form argument names have started to be introduced. Some of these are alternatives to the old single-character versions (e.g., --seven for -7) and some have no single-character equivalents (e.g., --nomovenumbers).
Most of the arguments taking filenames can now be separated from the filename with a space.
Long overdue addition of calculation of the half-move clock to FEN strings.
Added --evaluation to support insertion of a comment containing an evaluation after every half move. This currently implements a Shannon evaluation.
The --notags, --nomovenumbers, --noresults and --plylimit arguments allow output to be stripped in support of the creation of opening books.
The --stalemate argument matches only games that end in stalemate.
You can take a copy of the full source and documentation as either pgn-extract-16-7.tgz or pgn-extract-16-7.zip.
Alternatively, a win32 binary is available.
| Name | Description | Bytes | Date |
| COPYING | GNU General Public License. | 12488 | Dec 05 1997 |
| pgn-extract-16-7.tgz | GZipped tar file
of the complete source of version 16.7 of the program. Includes help.html, Makefile for compilation and eco.pgn file for ECO classification. |
149354 | Sep 10 2008 |
| pgn-extract-16-7.zip | Zipped file of the complete source of version 16.7 of the program. Includes help.html, Makefile for compilation and eco.pgn file for ECO classification. |
190309 | Sep 10 2008 |
| pgn-extract-16-7.exe | 32-bit win32 binary of version 16.7 of the program. | 132124 | Sep 10 2008 |
| eco.zip | Zipped version of eco.pgn. | 32081 | Sep 30 1999 |
| eco.pgn | File of openings with PGN classification. This file is already included in the source archives. |
254722 | Dec 05 1997 |
Feedback and suggestions are always welcome, although I don't have much time these days for significant development work.