Recreated IBoardBot API in Rust.
The ./fonts
directory is used to draw text on the board. You can specify which ttf
font to use on the JSON request. It will use a default one if no font is specified.
The first time that a board connects to the API a configuration file for that board will be created under ./boards
. If you named your board main
, the configuration file will be ./boards/main.yaml
In this file you can specify the board dimensions (size). Ive found that for the board that is shown on the images, 3500
(width) X 1000
(height) works fine.
You can find the API docs at the /docs
endpoint in the API.
At the moment the only real way to use it is sending HTTP requests to the API, which you can find the docs for on the /docs
endpoint.
I'm working on an easy to use frontend so be patient for that.
Here's how you can write a text or draw an svg with curl
Replace boardId with whatever you've named your board, for example main
; so it ends up like http://0.0.0.0/boards/main/jobs
.
Change 0.0.0.0
to the IP and port of your API.
$ curl -X POST \
-H "Content-Type: application/json" \
-d '{ "WriteText": { "text": "Hello" } }' \ # Replace "Hello" with the text that you want to draw
http://0.0.0.0/boards/{boardId}/jobs
$ curl -X POST \
-H "Content-Type: application/json" \
-d '{ "DrawSVG": { "Url": "https://www.svgrepo.com/download/13695/star.svg" }' \
http://0.0.0.0/boards/{boardId}/jobs
The board will remember what parts are occupied so you'll need to send an erase command so it can draw everywhere again. Note that this doesn't actually use the eraser to erase the board, you'll need to erase the board with your human hands for now.
$ curl -X POST \
-H "Content-Type: application/json" \
-d 'Erase' \
http://0.0.0.0/boards/{boardId}/jobs