Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: PGN file help

Author: Dann Corbit

Date: 20:03:50 02/05/04

Go up one level in this thread


On February 05, 2004 at 22:44:04, Jeff White wrote:

>I'm looking for something that will trim down the header information in a pgn
>file. Something like this:
>
>[Event "?"]
>[Site "DSB-2.Kongress"]
>[Date "1881.??.??"]
>[Round "13"]
>[White "Blackburne,J"]
>[Black "Chigorin,M"]
>[Result "1-0"]
>[ECO "D05"]
>
>to something like this:
>
>
>[White "Blackburne,J"]
>[Black "Chigorin,M"]
>[Result "1-0"]
>
>Is there something out there that will do this for me with existing pgn files?
>Doing it with a word processor is very time consuming. Thanks for any help
>provided.

The above shortening of the header is not allowed by the PGN standard.  There
are seven mandatory tags:
Event
Site
Date
Round
White
Black
Result

If you take out any of these, it is no longer a PGN file.

That having been said, it would be very simple to write a filter to do what you
want.

PGN-Extract by David Barnes will strip out lots of stuff, like comments and PGN
tags that are not mandatory.

Out of curiosity, why do you want to remove that data?



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.