Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niklasf/web-boardimage
An HTTP service that renders chess board images
https://github.com/niklasf/web-boardimage
chess lichess png svg webservice
Last synced: 5 days ago
JSON representation
An HTTP service that renders chess board images
- Host: GitHub
- URL: https://github.com/niklasf/web-boardimage
- Owner: niklasf
- License: agpl-3.0
- Created: 2016-11-02T13:30:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T19:05:14.000Z (19 days ago)
- Last Synced: 2024-12-03T20:18:56.216Z (19 days ago)
- Topics: chess, lichess, png, svg, webservice
- Language: Python
- Homepage:
- Size: 173 KB
- Stars: 73
- Watchers: 8
- Forks: 19
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
web-boardimage
==============An HTTP service that renders chess board images.
Installation
------------Requires Python and pipenv:
```
sudo apt-get install python3-dev libffi-dev libxml2-dev libxslt1-dev libcairo2
pipenv install
```Usage
-----```
pipenv run server [--port 8080] [--bind 127.0.0.1]
```HTTP API
--------### `GET /board.svg` render an SVG
name | type | default | description
--- | --- | --- | ---
**fen** | string | required | FEN of the position with at least the board part
**orientation** | string | white | `white` or `black`
**size** | int | 360 | The width and height of the image
**lastMove** | string | *(none)* | The last move to highlight, e.g., `f4g6`
**check** | string | *(none)* | A square to highlight for check, e.g., `h8`
**arrows** | string | *(none)* | Draw arrows and circles, e.g., `Ge6g8,Bh7`, possible color prefixes: `G`, `B`, `R`, `Y`
**squares** | string | *(none)* | Marked squares, e.g., `a3,c3`
**coordinates** | bool | *false* | Show a coordinate margin
**colors** | string | lichess-brown | Theme: `wikipedia`, `lichess-brown`, `lichess-blue````
https://backscattering.de/web-boardimage/board.svg?fen=5r1k/1b4pp/3pB1N1/p2Pq2Q/PpP5/6PK/8/8&lastMove=f4g6&check=h8&arrows=Ge6g8,Bh7&squares=a3,c3
```![example board image](https://backscattering.de/web-boardimage/board.svg?fen=5r1k/1b4pp/3pB1N1/p2Pq2Q/PpP5/6PK/8/8&lastMove=f4g6&check=h8&arrows=Ge6g8,Bh7&squares=a3,c3)
### `GET /board.png` render a PNG
License
-------web-boardimage is licensed under the AGPLv3+. See LICENSE.txt for the full
license text.