Skip to main content

Generate GIFs of chess games from PGN files.

Project description

pgn-to-gif

Generate GIFs of chess games from PGN files.

Installation

pip3 install pgn-to-gif

Usage

usage: pgn-to-gif [-h] --pgn-path PGN_PATH --gif-path GIF_PATH [--add-initial-position {1,t,true,0,f,false}] [--highlight-last-move {1,t,true,0,f,false}] [--orientation {white,black}] [--size SIZE]
                  [--coordinates {1,t,true,0,f,false}] [--css-path CSS_PATH] [--loop LOOP] [--duration DURATION] [--fps FPS] [--palettesize PALETTESIZE] [--subrectangles {1,t,true,0,f,false}]

optional arguments:
  -h, --help            show this help message and exit
  --pgn-path PGN_PATH   path to pgn file to read (default: None)
  --gif-path GIF_PATH   path to gif file to save (default: None)
  --add-initial-position {1,t,true,0,f,false}
                        add initial position to gif (default: true)
  --highlight-last-move {1,t,true,0,f,false}
                        highlight last move on board (default: true)
  --orientation {white,black}
                        orientation of board (default: white)
  --size SIZE           size of board (default: 400)
  --coordinates {1,t,true,0,f,false}
                        add board coordinates (default: true)
  --css-path CSS_PATH   path to css file to style board (default: None)
  --loop LOOP           number of loops for gif, 0 means infinite (default: 0)
  --duration DURATION   duration of each frame (in seconds) in gif (default: 1.0)
  --fps FPS             frame per second of gif (default: 1.0)
  --palettesize PALETTESIZE
                        number of colors to quantize images to (default: 64)
  --subrectangles {1,t,true,0,f,false}
                        optimize gif by storing change (default: true)

Examples

Please see examples folder.

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

pgn_to_gif-0.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

pgn_to_gif-0.0.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pgn_to_gif-0.0.1.tar.gz.

File metadata

  • Download URL: pgn_to_gif-0.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for pgn_to_gif-0.0.1.tar.gz
Algorithm Hash digest
SHA256 497cb34c36aefeb37d9b827edd34e21e30bd9e3d64880e21623aa3cf5e991e36
MD5 7950dbb0b245f36f3dbec5996cce1501
BLAKE2b-256 b9d166956a3e3ff7a49026aca88a052b45158a3100ae22be2d5cb86f05b97685

See more details on using hashes here.

File details

Details for the file pgn_to_gif-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pgn_to_gif-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for pgn_to_gif-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34c644c43a4a63cdc9ad443a7b548db194aeff549e7f1636e823d62bdebb1336
MD5 d7f707617d06623250c274d7c0902c48
BLAKE2b-256 796b98106fff2f1eef4fb27aff22fe8e2bf9330b096b0dd174140a40c9dc9daa

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