All Projects → dn1z → Pgn2gif

dn1z / Pgn2gif

Licence: mit
A small tool that generates gif of a chess game

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pgn2gif

Pornsearch
Easy way to search for porn content!
Stars: ✭ 156 (+140%)
Mutual labels:  gif, gifs
Gif For Cli
opensource.googleblog.com/2018/06/tenor-gif-for-cli.html
Stars: ✭ 2,772 (+4164.62%)
Mutual labels:  gif, gifs
Gify
JavaScript API for decoding/parsing information from animated GIFs using ArrayBuffers.
Stars: ✭ 124 (+90.77%)
Mutual labels:  gif, gifs
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (+21.54%)
Mutual labels:  gif, gifs
alvito
Alvito - An Algorithm Visualization Tool for Python
Stars: ✭ 52 (-20%)
Mutual labels:  gifs, gif
GiphyImageResultsPreview
Library for GIF results, preview, play, share everything at one place!
Stars: ✭ 28 (-56.92%)
Mutual labels:  gifs, gif
Pi Timelapse
Time-lapse app for Raspberry Pi computers.
Stars: ✭ 220 (+238.46%)
Mutual labels:  gif, gifs
gifted
Turn any short video into an animated GIF quickly and easily.
Stars: ✭ 15 (-76.92%)
Mutual labels:  gifs, gif
lila-gif
Webservice to render Gifs of chess positions and games, and stream them frame by frame
Stars: ✭ 63 (-3.08%)
Mutual labels:  chess, gif
GTA-One-Liners
A collection of gifs made out of almost every dialogue in GTA and other games.
Stars: ✭ 37 (-43.08%)
Mutual labels:  gifs, gif
gifs
gifs for thought
Stars: ✭ 19 (-70.77%)
Mutual labels:  gifs, gif
Gifcurry
😎 The open-source, Haskell-built video editor for GIF makers.
Stars: ✭ 830 (+1176.92%)
Mutual labels:  gif, gifs
Aimage
An animated gif & apng engine for iOS in Swift. Have a great performance on memory and cpu usage.
Stars: ✭ 1,014 (+1460%)
Mutual labels:  gif
Qrcode
💮 amazing QRCode generator in Python (supporting animated gif) - Python amazing 二维码生成器(支持 gif 动态图片二维码)
Stars: ✭ 8,613 (+13150.77%)
Mutual labels:  gif
Sunfish rs
Rust rewrite of the sunfish simple chess engine
Stars: ✭ 41 (-36.92%)
Mutual labels:  chess
Gif rain code
生成gif数字雨动态头像
Stars: ✭ 40 (-38.46%)
Mutual labels:  gif
Gifline
The fast way to put gif in or emails
Stars: ✭ 63 (-3.08%)
Mutual labels:  gif
Movtogif Cli
📺 Convert mov/mp4 to high-quality animated gifs
Stars: ✭ 56 (-13.85%)
Mutual labels:  gif
Gifloader
An Android Library to load your GIF files
Stars: ✭ 38 (-41.54%)
Mutual labels:  gif
Gifmagic
💈 Gif maker and extractor in Swift
Stars: ✭ 38 (-41.54%)
Mutual labels:  gif

pgn2gif

Generate gifs from pgn files of your chess games.

Installation

  • You need python 3.5 or newer installed.
  • Clone the repo with git clone https://github.com/dn1z/pgn2gif.
  • In the cloned directory run
pip install -r requirements.txt
  • If you want to install system wide
python setup.py install

Usage

Run pgn2gif with the following options:

usage: pgn2gif [-h] [-d DURATION] [-o OUT] [-r] [--black-square-color BLACK_SQUARE_COLOR] [--white-square-color WHITE_SQUARE_COLOR] [path [path ...]]

positional arguments:
  path                  Path to the pgn file(s)

optional arguments:
  -h, --help            show this help message and exit
  -d DURATION, --duration DURATION
                        Duration between moves in seconds
  -o OUT, --out OUT     Name of the output folder
  -r, --reverse         Reverse board
  --black-square-color BLACK_SQUARE_COLOR
                        Color of black squares in hex
  --white-square-color WHITE_SQUARE_COLOR
                        Color of white squares in hex

Also can be used as a library

import pgn2gif

creator = pgn2gif.PgnToGifCreator(reverse=True, duration=0.1, ws_color='white', bs_color='gray')
creator.create_gif("first.pgn") # creates first.gif
creator.create_gif("second.pgn", out_path="../chess.gif")

Example

PGN

1. Nf3 Nf6 2. d4 e6 3. c4 b6 4. g3 Bb7 5. Bg2 Be7 6. O-O O-O
7. d5 exd5 8. Nh4 c6 9. cxd5 Nxd5 10. Nf5 Nc7 11. e4 d5
12. exd5 Nxd5 13. Nc3 Nxc3 14. Qg4 g6 15. Nh6+ Kg7 16. bxc3
Bc8 17. Qf4 Qd6 18. Qa4 g5 19. Re1 Kxh6 20. h4 f6 21. Be3 Bf5
22. Rad1 Qa3 23. Qc4 b5 24. hxg5+ fxg5 25. Qh4+ Kg6 26. Qh1
Kg7 27. Be4 Bg6 28. Bxg6 hxg6 29. Qh3 Bf6 30. Kg2 Qxa2 31. Rh1
Qg8 32. c4 Re8 33. Bd4 Bxd4 34. Rxd4 Rd8 35. Rxd8 Qxd8 36. Qe6
Nd7 37. Rd1 Nc5 38. Rxd8 Nxe6 39. Rxa8 Kf6 40. cxb5 cxb5
41. Kf3 Nd4+ 42. Ke4 Nc6 43. Rc8 Ne7 44. Rb8 Nf5 45. g4 Nh6
46. f3 Nf7 47. Ra8 Nd6+ 48. Kd5 Nc4 49. Rxa7 Ne3+ 50. Ke4 Nc4
51. Ra6+ Kg7 52. Rc6 Kf7 53. Rc5 Ke6 54. Rxg5 Kf6 55. Rc5 g5
56. Kd4 1-0 

GIF output

License

Copyright (c) M. Deniz Kızılırmak. All rights reserved.

Licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].