GithubHelp home page GithubHelp logo

fen2image's Introduction

fen2image

fen2image is a command-line tool that generates chess board png images from FEN description.

With an input like:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

It generates this board:

## Usage

$ ./fen2image -fen "rnbqkbnr/pppppppp/8/8/8/8/PPPPP1PP/RNBQKBNR w KQkq - 0 1"

Other command line options are detailled in the help:

$ ./fen2image --help

Features

  • Generate image file out of a FEN string
  • Support for png and jpg output file formats
  • handle reversed board (view from blacks point of view)

Todo

A lot of things remain to do.

board

  • write tests x convert board fromFEN x validate FEN input expression with regex

options

  • handle different cell size (-> resize icons)
  • cell colors X revert board X draw column names renderer X PNG/JPG Renderer
  • SVG Renderer ?
  • better error handling

Fen validation

  • Making a perfect FEN validation is a lot work. It might not be necessary (FEN may represent illegal positions).

Requirements

You need to have Go installed

Installation

Once Go is installed, you can download and build the package:

$ go get -u github.com/keirua/fen2image
$ make build

Contributing

Open issues, fork the repo, then make PR !

Testing

Tests are pretty light right now, but that should be

Credits

The icons come from WikiMedia

## Author

Made with love by clemkeirua from KeiruaProd

License

It's MIT

fen2image's People

Contributors

keirua avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.