.. contents::
This package provides a database for chess games.
When playing through a game a list of all games containing the current position is displayed.
Repertoire games can be defined. When playing through a repertoire game a list of all games containing the current position is displayed. Repertoire games are not included in this list.
Chess engines can be used to analyse positions while playing through games or repertoire games. The analysis can be played through like the game score. The analysis can be saved on the database for later reference.
Partial positions can be defined and a list of all games containing a position matching the partial position is displayed.
Games can be typed, or imported from files, in PGN Import Format
_.
Games are indexed by the seven standard tags
_ defined by the PGN standard.
Games can be edited or deleted.
Games can be output to PGN files in Export Format
, Reduced Export Format
, or an import format excluding comments and glyphs.
This package is available on PyPI so can be installed by typing
python -m pip install --user chesstab
at the command prompt.
See Python
and pip
documentation for alternatives and platform-specific points.
If this installation replaces ChessTab-4.1.1 or earlier you should run:
python -m chesstab.tools.chesstab-4-1-1_castling-option-correction
to fix the incorrect position and analysis index keys generated for moves Rxa8, Rxh8, Rxa1, and Rxh1, where the captured piece is a rook and neither rook involved in the move, nor either king, has moved previously.
For the 233,765 games in twic920g.zip through twic999g.zip downloaded from https://theweekinchess.com the run takes about two hours.
Chess engines which support the Universal Chess Interface
(UCI) can be used to analyse positions. Wikipedia UCI entry
links to the specification too.
The default database interface is the sqlite3 module distributed with Python.
The apsw
_ interface, if installed, to Sqlite 3 is used instead of the sqlite3 interface.
New databases are accessed using these alternative interfaces if installed.
berkeleydb
_ (replaces bsddb3 at Python 3.10)bsddb3
_dptdb
_ (Microsoft Windows only)lmdb
_Chesstab will use dptdb if installed.
berkeleydb is available for Python 3.6 and later. It is used instead of bsddb3 if both are installed and a version of Berkeley DB
_ supported by berkeleydb is installed.
If bsddb3 is used, a version of Berkeley DB
_ supported by bsddb3 must be installed.
The unicode chess pieces are used by default.
The chesstab package incudes the Chess Merida, Chess Cases, Chess Motif, and Chess Lucena fonts by Armando H Marroquin.
These are available from www.enpassant.dk/chess/fonteng.htm
_ and the relevant files have been included in this package for convenience.
Install if you prefer them to the unicode chess pieces.
The command to run this package is:
python -m chesstab.chessgames
You may need to give the path and version of Python depending on your system's configuration: