Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable Game Notation (PGN) #48

Open
ross-spencer opened this issue Mar 29, 2024 · 0 comments
Open

Portable Game Notation (PGN) #48

ross-spencer opened this issue Mar 29, 2024 · 0 comments
Assignees

Comments

@ross-spencer
Copy link
Contributor

ross-spencer commented Mar 29, 2024

Thank you for choosing to submit a new entry to PRONOM. For each submission, please include as much of the following information as possible. It's okay if you don't have everything, but please include what you can.

Format name
Use the official name where known. Please capitalise each word unless the format name is stylised in some alternative way, e.g. Apple iBook.

Portable Game Notation (Export Format)

Version number
(where relevant)

N/A

PUID
if it exists already and you're providing an enhanced description.

N/A

Extensions
any extensions known to be associated with the format.

*.pgn

MIME/Media Type
the MIME or Media Type associated with the format. A brief description of what a MIME type is can be found here. This should be an official Media Type, either registered and listed via the IANA or listed in official format documentation produced by the vendor. The best way to search IANA is to find in page and search for key words of the format.

  • application/vnd.chess-pgn
  • application/x-chess-pgn

Description
a concise, objective description of the file format.

The Portable Game Notation Export Format (PGN) is a structured text format that enables the description and interchange of Chess games digitally. The export format is a rigidly structured format whereas its sibling for import is much less rigid allowing for more variably structured data. PGN can be imported into Chess programs in such a way as to allow those performing the import to replay previous games as well as providing a medium for much deeper analysis of Chess lines and tactics by analysis engines such as Stockfish, AlphaZero, and many others.

Chess games are described using a series of key-value pairs delineated by opening and closing square brackets followed by the description of the game itself. Key-value pairs are enclosed in square brackets describe the event the game is being played at, date, result and the individuals with the white and black pieces. The the game itself is described in Standard Algebraic Notation (https://www.chessprogramming.org/Algebraic_Chess_Notation#SAN) which is FIDE's (Fédération Internationale des Échecs) standard notation language.

The format was invented in 1994 by Computer Scientist and Mathematician Steven J Edwards: https://web.archive.org/web/20001202164100/http://www.chessclub.com/help/PGN-spec

Format type
What type of format is it (see below)?

Structured Text

Vendor
(if known) - which vendor created the format? Which vendor currently supports it?

N/A

File format identification signatures
(for the brave!). If you'd like to find out more about creating file format signatures please refer to our starter pack under resources.

I have a proposed signature:

5B4576656E742022{0-*}225D{0-1}(0D0A|0A)5B536974652022{0-*}225D{0-1}(0D0A|0A)5B446174652022{0-*}225D{0-1}(0D0A|0A)5B526F756E642022{0-*}225D{0-1}(0D0A|0A)5B57686974652022{0-*}225D{0-1}(0D0A|0A)5B426C61636B2022{0-*}225D{0-1}(0D0A|0A)5B526573756C742022{0-*}225D{0-1}(0D0A|0A)
5B4576656E742022 <-- [Event "
{0-*} 
225D <-- "]
{0-1}(0D0A|0A)
5B536974652022 <-- [Site "
{0-*}
225D
{0-1}(0D0A|0A)
5B446174652022 <-- [Data "
{0-*}
225D
{0-1}(0D0A|0A)
5B526F756E642022 <-- [Round "
{0-*}
225D
{0-1}(0D0A|0A)
5B57686974652022 <-- [White "
{0-*}
225D
{0-1}(0D0A|0A)
5B426C61636B2022 <-- [Black "
{0-*}
225D
{0-1}(0D0A|0A)
5B526573756C742022 <-- [Result "
{0-*}
225D
{0-1}(0D0A|0A)

There are a lot of fields that should match in this signature but because of the number of wildcards it might capture formats that are not well-formed or other versions of the same format. How can we deal with these? (maybe an arbitrary limit?)

I describe that abstractly here: https://groups.google.com/g/pronom/c/OIWiXqhZqNU/m/57eP8o1aAAAJ

Sample files

I and others have collected links to sample files here: http://fileformats.archiveteam.org/wiki/PGN#Sample_files

@tnafrancesca tnafrancesca self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants