mirror of
https://codeberg.org/icewind/ptouch-api.git
synced 2026-06-03 10:54:07 +02:00
initial version
This commit is contained in:
parent
ddc5849ed6
commit
e37160b717
11 changed files with 2800 additions and 3 deletions
31
README.md
Normal file
31
README.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# ptouch-api
|
||||
|
||||
Simple REST api for Brother P-touch label printers.
|
||||
|
||||
## Configuring
|
||||
|
||||
```toml
|
||||
[listen]
|
||||
# by default the server listens over tcp
|
||||
# address = "0.0.0.0" # defaults to "127.0.0.1"
|
||||
# port = 1234 # defaults to 7074
|
||||
# you can set it to listen over a unix socket instead.
|
||||
socket = "/run/ptouch-api.sock"
|
||||
```
|
||||
|
||||
In additional to the `listen` configuration, the server will automatically
|
||||
detect if it get's activated trough systemd socket activation and takes the
|
||||
provided socket.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
ptouch-api [--config config.toml]
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
- GET `/status`: get printer and tape status, see the
|
||||
[ptouch-rs documentation](https://docs.rs/ptouch-rs/latest/ptouch_rs/struct.Status.html)
|
||||
for details about the fields.
|
||||
- PUT `/print`: print the uploaded image, supports png, jpg and bmp
|
||||
Loading…
Add table
Add a link
Reference in a new issue