Skip to content

cli tool that generates chess board png images from FEN description

License

Notifications You must be signed in to change notification settings

Keirua/fen2image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

cli tool that generates chess board png images from FEN description

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published