Simple REST api for Brother P-touch printers
  • Rust 40.6%
  • JavaScript 37.1%
  • Nix 13%
  • CSS 5.2%
  • HTML 4.1%
Find a file
2025-09-18 02:59:36 +02:00
.forgejo/workflows init 2025-09-18 01:00:16 +02:00
nix initial version 2025-09-18 02:59:36 +02:00
src initial version 2025-09-18 02:59:36 +02:00
.envrc init 2025-09-18 01:00:16 +02:00
.gitignore initial version 2025-09-18 02:59:36 +02:00
51-ptouch-api.rules initial version 2025-09-18 02:59:36 +02:00
Cargo.lock initial version 2025-09-18 02:59:36 +02:00
Cargo.toml initial version 2025-09-18 02:59:36 +02:00
flake.lock init 2025-09-18 01:00:16 +02:00
flake.nix initial version 2025-09-18 02:59:36 +02:00
README.md initial version 2025-09-18 02:59:36 +02:00

ptouch-api

Simple REST api for Brother P-touch label printers.

Configuring

[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

ptouch-api [--config config.toml]

API

  • GET /status: get printer and tape status, see the ptouch-rs documentation for details about the fields.
  • PUT /print: print the uploaded image, supports png, jpg and bmp