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
- 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)
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).
You need to have Go installed
Once Go is installed, you can download and build the package:
$ go get -u github.com/keirua/fen2image
$ make build
Open issues, fork the repo, then make PR !
Tests are pretty light right now, but that should be
The icons come from WikiMedia
## Author
Made with love by clemkeirua from KeiruaProd
It's MIT