Giter Club home page Giter Club logo

web-boardimage's Introduction

web-boardimage

An HTTP service that renders chess board images.

Installation

Requires Python 3.7+.

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

GET /board.png render a PNG

License

web-boardimage is licensed under the AGPLv3+. See LICENSE.txt for the full license text.

web-boardimage's People

Contributors

dependabot[bot] avatar niklasf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web-boardimage's Issues

support for crazyhouse FEN

like r3k2r/pp4pp/4Bp2/1p1p4/6P1/p1q1BPKP/PnP5/RQ2nB1R/PPPBnn where PPPBnn are the pocket pieces, or rnbqkbnr/pppppppp/8/8/8/2P5/PP1PPPPP/RNBQKBNR/ without pocket pieces (also failing atm)

how to run & use this script ?

i think i managed to install the packages on my Xubuntu 20.04 according to your readme, but then execution fails :

$ pipenv install
Installing dependencies from Pipfile.lock (9e16cc)โ€ฆ
  ๐Ÿ   โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰ 0/0 โ€” 00:00:00
To activate this project's virtualenv, run the following:
 $ pipenv shell

i did not do 'pinenv shell' but i did your command but i get this error :

$ pipenv run server [--port 8080] [--bind 127.0.0.1]
Error: the command server could not be found within PATH or Pipfile's [scripts].

i was not able to tackle this error : i can not find a way to install the command 'server' .. what am i missing ? Should a browser window open ? I see the URL https://backscattering.de/web-boardimage/board.svg?[...] and it works, but how should this be done at localhost ? For me, your readme lacks details ..

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.