1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
4 <title>pgn-extract: Portable Game Notation (PGN) Manipulator for Chess Games</title>
5 <link rev="made" href="mailto:D.J.Barnes @at@ kent.ac.uk">
6 <meta name="Author" content="David Barnes">
7 <meta name="Description"
8 CONTENT="FTP Directory with source of program to manipulate
9 chess games recorded in Portable Game Notation (PGN)
11 <meta name="Keywords" content="Chess PGN Portable Game Notation
14 <link href="style.css" rel="stylesheet" type="text/css" media="all">
19 <div id="banner-wrapper">
21 <h1 align="center">pgn-extract:<br />A Portable Game Notation (PGN) Manipulator for Chess Games<br />
22 Version 17-14 by <a href="http://www.cs.kent.ac.uk/~djb/">David J. Barnes</a>
23 (<a href="https://twitter.com/kentdjb">@kentdjb</a>)<br />
24 <a href="pgn-extract.xml">
25 <img src="feed.png" width="25" height="25"></a>
30 <div id="page-wrapper">
33 <p>This is the home page for
34 the <em>pgn-extract</em> program,
35 which is a <em>command-line</em> program for manipulating
36 chess games recorded in the Portable Game Notation (PGN).
37 <p>A <a href="http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/help.html">full
38 description of pgn-extract's functionality</a> is available and included
41 <p>Here you can find the C source code and win32 binary for the current
43 pgn-extract compiles and runs under Windows, Linux and Mac OSX.
44 This program is made available under the terms of the
45 <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/COPYING">GNU
46 General Public License (Version 1).</a>
49 <p>The program is designed to make it easy to extract selected games from a
50 PGN format data file based on a wide variety of criteria.
53 <li><p>textual move sequences;</p></li>
54 <li><p>the position reached after a sequence of moves;</p></li>
55 <li><p>information in the tag fields;</p></li>
56 <li><p>fuzzy board position;</p></li>
57 <li><p>and material balance in the ending.</p></li>
59 <p>The program includes a semantic analyser which will
60 report errors in game scores and it is also able to detect duplicate
61 games found in its input files.
63 <p>The range of input move formats accepted is fairly wide and includes
64 recognition of lower-case piece letters for English and upper-case
65 piece letters for Dutch and German. The output is normally in English Standard
66 Algebraic Notation (SAN), but this can be varied.
68 <p>Extracted games may be written out either including or excluding
69 comments, NAGs, variations, move numbers, tags and/or results.
70 Games may be given ECO classifications
71 derived from the accompanying file eco.pgn, or a customised version
74 <p>The program is designed to be relatively memory-friendly, so it
75 does not retain a game's moves in memory once it has been processed.
77 <p>Use the <em>--help</em> argument to the program to
78 get the full lists of arguments.
80 <h2>New in version 17-1x</h2>
81 <p>These are the major additions in version 17-1x:
83 <li><p>Null moves (--) in variations now recognised.
84 This is non-standard PGN notation.
85 Note that there is scope for semantic errors here, so please let me know
86 if you come across any game scores containing null moves that
87 pgn-extract does not deal with
89 <li><p>v17-14 corrected a long-standing error in the whole-move number
91 <li><p><a href="help.html#fuzzydepth">--fuzzydepth flag</a>
92 allows duplicate detection based on position reached
93 at a particular ply depth.
94 <li><p><a href="help.html#-W">-Wuci</a> outputs a game in a format suitable for input to
95 a <a href="http://wbec-ridderkerk.nl/html/UCIProtocol.html">UCI-compatible</a> engine.
96 <li><p>Board position matches with <a href="help.html#fen-t">the -t flag</a> that
97 allow fuzzy board position matches.
98 <li><p>A test suite of the program's basic functionality to support
99 regression testing. This won't be of interest to users but might be
103 <h2>Available Files</h2>
104 <p>You can take a copy of the full source and
105 documentation as either
106 <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/pgn-extract-17-14.tgz">pgn-extract-17-14.tgz</a>
108 <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/pgn-extract-17-14.zip">pgn-extract-17-14.zip</a>.
110 href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/pgn-extract-17-14.exe">a win32
111 binary</a> is available.
113 <table border cellpadding=5>
115 <td align="center"><b>Name</b></td>
116 <td align="center"><b>Description</b></td>
117 <td align="center"><b>Size</b></td>
118 <td align="center"><b>Date</b></td>
122 <td><a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/pgn-extract-17-14.tgz">pgn-extract-17-14.tgz</a><br>
124 of the complete source of version 17-14 of the program.<br>
125 Includes <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/help.html">help.html</a>,
126 Makefile for compilation and
127 <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/eco.pgn">eco.pgn</a> file for ECO classification.</td>
128 <td align="right">291524 bytes</td><td>Jun 19 2013</td>
132 <td><a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/pgn-extract-17-14.zip">pgn-extract-17-14.zip</a></td>
133 <td>Zipped file of the complete source of version 17-14 of the program.<br>
134 Includes <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/help.html">help.html</a>, Makefile for compilation and
135 <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/eco.pgn">eco.pgn</a> file for ECO classification.</td>
136 <td align="right">403727 bytes</td><td>Jun 19 2013</td>
140 <td><a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/pgn-extract-17-14.exe">pgn-extract-17-14.exe</a></td>
141 <td>win32 binary of version 17-14 of the program.</td>
142 <td align="right">482419 bytes</td><td>Jun 29 2013</td>
146 <td><a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/pgn-extract-17-14.exe">pgn-extract-17-14c.exe</a></td>
147 <td>Alternative win32 binary of version 17-14 of the program (requires <a href="http://www.cygwin.com">cygwin</a>).</td>
148 <td align="right">386378 bytes</td><td>Jun 19 2013</td>
152 <td><a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/eco.zip">eco.zip</a></td>
153 <td>Zipped version of <a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/eco.pgn">eco.pgn</a>.</td>
154 <td align="right">32081 bytes</td><td>May 24 2013</td>
158 <td><a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/eco.pgn">eco.pgn</a></td>
159 <td>File of openings with PGN classification.<br>
160 This file is already included in the source archives.
162 <td align="right">254723 bytes</td><td>May 24 2013</td>
166 <td><a href="ftp://ftp.cs.kent.ac.uk/pub/djb/pgn-extract/COPYING">COPYING</a></td>
167 <td>GNU General Public License (version 1).</td>
168 <td align="right">12488 bytes</td><td>Dec 05 1997</td>
173 <p>Feedback and suggestions for further features are always welcome, although I can't always
174 promise to undertake significant development work.
181 <p>© 1994-2013 David J. Barnes<br />
182 <a href="http://www.cs.kent.ac.uk/~djb/">My home page.</a><br />
183 <a href="mailto:d.j.barnes@kent.ac.uk">d.j.barnes@kent.ac.uk</a><br />
184 Last updated: 29th Jun 2013 - non-cygwin version of the Windows
185 executable added.<br />