https://github.com/davidssmith/svgboard
Generate SVG chess board diagrams from input FEN strings
https://github.com/davidssmith/svgboard
Last synced: 10 months ago
JSON representation
Generate SVG chess board diagrams from input FEN strings
- Host: GitHub
- URL: https://github.com/davidssmith/svgboard
- Owner: davidssmith
- License: mit
- Created: 2021-02-28T18:29:41.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-28T18:46:00.000Z (almost 5 years ago)
- Last Synced: 2025-02-05T09:21:23.333Z (11 months ago)
- Language: C
- Size: 93.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svgboard
`svgboard` is a short and simple C code for the generation of beautifully
rendered SVG chess board diagrams from input FEN strings. By default the output
is written to stdout, but it can be redirected to a file of your choosing.
For example,
```
svgboard '5rk1/pp4pp/4p3/2R3Q1/3n4/6qr/P1P2PPP/5RK1 w - - 2 24' > goldcoin.svg
```
generates the board

The board can be configured to the user's tastes using a number of command-line
options and flags:
```
Usage: svgboard [-cghir] [-p ] FEN
-b border thickness (default: 2)
-c turn on coordinates (default: 0)
-d dark square color (default: 846c40)
-f font size (default: 20)
-F font name (default: sans-serif)
-g grayscale, suitable for print
-i show side-to-move indicator
-l light square color (default: a48c62)
-m margin size (default: 48)
-p pieces to use (default: merida)
-r flip if black to move instead of indicator
-s square size (default: 64)
```
To run the program, download or clone the git repo and run `make` in the repo directory. This will create the binary `svgboard` which can be either run locally with `./svgboard` or copied to somewhere in your shell's path.