Skip to main content

Helper scripts to fix PGN meta-data before importing them to Chess DB (like SCID)

Project description

**normalizePGN** is a package containing helper scripts and examples that show how to normalize - i.e. correct
some games' meta-data contained in .pgn files before loading them to chess database.
PGN files that are being published by tournaments' organizers sometimes (especially for large events where
few people work on digitalizing games) used to be not consistent. E.g. event name or event place is written
in slightly different way or there is missing some important information in .pgn files that we want to have - like
time control, players ELO or titles, etc. Those scripts help to fix and complete this information quickly
(faster than just by manually editing .pgn files).
The idea is to perform following steps:
- import games to SQLite database
- run few SQL queries that check data consistency and things that we care
- based on results of previous step, write fix SQL expressions (usually the ones from previous tournaments
are good enough or needs only slight modification)
- run fix expressions
- re-check data (using queries from second step)
- export games back to .pgn file
- import .pgn file to chess database of your choice (e.g. SCID).
So using this package requires some basic SQL knowledge and some initial time investment into getting
familiar how all this works and creating an initial scripts suitable for your specific use cases.
But my experience is that tournament organizers tend to replicate the same issues in .pgn files
from one event edition to next. So workout scripts from one edition usually works for all next editions of the
same tournament.

Provided examples use POSIX shell and some utilities (like sed), so Linux or Mac users could have good starting point.
Windows users may need to put more time to rewrite this staff to technologies available in their system or
try to use some utilities like cygwin or unix services for windows.

For information what files are deployed by this package and where see file README.md included in source-ball or
in typical installation using pip deployed to folder:
- /usr/local/share/doc/normalizePGN (Linux)
- C:\Python35\doc\normalizePGN (Windows) or
- <USER>\AppData\Local\Programs\Python\Python35-32\Doc\normalizePGN

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

normalizePGN-0.1.0.tar.gz (754.5 kB view details)

Uploaded Source

File details

Details for the file normalizePGN-0.1.0.tar.gz.

File metadata

File hashes

Hashes for normalizePGN-0.1.0.tar.gz
Algorithm Hash digest
SHA256 196028548d78ffc849cfd14f4a88893a2d9db86ec7d4e613e7c81e51aadddec2
MD5 551fe42767ee93339333f67ecd1a8756
BLAKE2b-256 55b50db834b305c9c8ad30c5457c63e5d87166f2842f0b2943a12b2ed51aa2aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page