Code Monkey home page Code Monkey logo

pgn-to-gif's Introduction

pgn-to-gif

Generate GIFs of chess games from PGN files.

Installation

pip3 install pgn-to-gif

Example output

Custom CSS + Arrow display

Usage

usage: cli.py [-h] [--input-file INPUT_FILE] [--output-file OUTPUT_FILE] [--from-clipboard] [--add-initial-position]
              [--highlight-last-move] [--orientation {white,black}] [--size SIZE] [--coordinates]
              [--css-path CSS_PATH] [--loop LOOP] [--duration DURATION] [--fps FPS] [--palettesize PALETTESIZE]
              [--subrectangles] [--processes PROCESSES]

options:
  -h, --help            show this help message and exit
  --input-file INPUT_FILE
                        path to pgn file to read (default: None)
  --output-file OUTPUT_FILE
                        path to gif file to save (default: ./game.gif)
  --from-clipboard      Read PGN from clipboard (default: False)
  --add-initial-position
                        add initial position to gif (default: True)
  --highlight-last-move
                        highlight last move on board (default: False)
  --orientation {white,black}
                        orientation of board (default: white)
  --size SIZE           size of board (default: 400)
  --coordinates         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       optimize gif by storing change (default: None)
  --processes PROCESSES
                        number of processes when converting svgs to pngs (default: 1)

Please see examples folder.

pgn-to-gif's People

Contributors

afozk95 avatar rickygrassmuck avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.