Coder Social home page Coder Social logo

sgf2gif's Introduction

sgf2gif

A program that converts an SGF-file to an animated GIF.

The animated GIF is highly inspired by the classic game Hayauchi Super Igo for NES.

Usage: sgf2gif options_list
Options:
    --file, -f -> The SGF-file to convert to a GIF. If not stated, the SGF will be read from the std-in.
    --output, -o -> The destination file to write the GIF to. If not stated, the output will be written to std-out.
    --theme [NES] -> The theme to render the board with { Value should be one of [nes, classic] }
    --loop, -l [false] -> Whether the animation should be looped or not
    --show-marker [false] -> Whether the last move should be marked or not
    --width, -w [1000] -> The width of the image. { Int }
    --height, -h [1000] -> The height of the image. { Int }
    --move-number, -mn [2147483647] -> The move number up to which the animation will run to. { Int }
    --delay, -d [2.0] -> The delay between frames in seconds. { Double }
    --help -> Usage info

NES theme

java -jar sgf2gif.jar -f ~/game.sgf -o ~/game.gif --theme nes

Classic theme

java -jar sgf2gif.jar -f ~/game.sgf -o ~/game.gif --theme classic

Writing to std-out

By omitting the --output command, the GIF file will be written to std-out.

java -jar sgf2gif.jar -f ~/game.sgf > ~/game.gif

Reading from std-in

By omitting the --file command, the SGF will be taken from the std-in

java -jar sgf2gif.jar < ~/game.sgf > ~/game.gif

Showing markers

By adding the --show-marker flag, each move made in the animation will have a marker on it

java -jar sgf2gif.jar --show-marker < ~/game.sgf > ~/game.gif

sgf2gif's People

Contributors

ekenstein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sgf2gif's Issues

support board color change

nice to have the parameter to change board color

e.g.
java -jar sgf2gif.jar -f ~/game.sgf -o ~/game.gif --board_color='brown'
or
whatever value, like in your code in classic theme
private val boardColor = Color.WHITE

thanks and best regards

Allow faster delay time

Delay time could be input as ms instead of s, or accept decimals down to a minimum value shorter than 1s.

I'm happy to contribute this change in a PR if you like

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.