===================================
Portable Game Notation (PGN) parser
===================================

.. contents::


Description
===========

This package provides a parser for chess game scores in `PGN`_ format.

Both the strict export format and many less strict import formats are supported.

Chess variants are not supported.

The game module provides the Game, GameStrictPGN, GameTextPGN, and GameIgnoreCasePGN, classes and the generate_fen_for_position function.

The parser module provides the PGN class and add_token_to_game function.

The PGN.read_games method yields instances of the Game class, or a subclass, generated from a file-like source or string.

The add_token_to_game function searches for the next PGN token in a string and applies it to an instance of the Game class, or a subclass.

The generate_fen_for_position function returns the Forsyth English Notation (FEN) string for the representation of a position in the Game class, or a subclass.


Installation Instructions
=========================

Usually this package will be installed by installing `ChessTab`_.

Install the package by typing

   python setup.py install

at the command prompt with setup.py in the current directory.

You may need to give the path and version of Python depending on your system's configuration:

   <path to python>/python<version> setup.py install

   For example

      C:\\Python33\\python setup.py install

         on Microsoft Windows or

      python3.3 setup.py install

         on Unix-like systems.

Use `Python`_ 3.3 or later.


Notes
=====

Project name and package name changed from 'pgn' to 'pgn-read' prior to upload to PyPI.

The version numbers of pgn-read continue on from pgn.


.. _Python: https://python.org
.. _PGN: http://www6.chessclub/help/PGN-spec
.. _`ChessTab`: http://solentware.co.uk/downloads.html
