Add a note text size option; document the printer cabled to stppi
- note --size 1|2|3 magnifies the text and wraps to 48/24/16 columns, then resets the printer to normal size - Web page gets a Size menu defaulting to Large; the API validates it - README/CLAUDE.md: the printer has no Wi-Fi (UB-E04 needs an adapter), so it is cabled to stppi's eth0 at 192.168.192.168 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -6,7 +6,7 @@ CLI that prints images, notes, and QR codes to an Epson TM-T20II thermal receipt
|
||||
|
||||
- `receipt.py` — the CLI; subcommand per `cmd_*` function
|
||||
- `receipt_tui.py` — Textual TUI (`tui` subcommand); thin layer over the `cmd_*` handlers via `receipt.run_action()`, which connects fresh per action and captures stdout/stderr for the log panel. `textual` is an optional dependency (`[tui]` extra); the CLI works without it
|
||||
- `receipt_web.py` — FastAPI server (`serve` subcommand, `[web]` extra) behind the site's nginx `/receipt/` over Tailscale; requires the `X-Receipt-Token` header nginx adds, and `X-Requested-With: receipt` on POSTs. Serializes jobs with a lock around `run_action()`; uploads print from memory. Always runs with `no_setup` (no sudo; the printer must already be reachable). Deployed on stppi, which reaches the printer on the home Wi-Fi (192.168.178.250)
|
||||
- `receipt_web.py` — FastAPI server (`serve` subcommand, `[web]` extra) behind the site's nginx `/receipt/` over Tailscale; requires the `X-Receipt-Token` header nginx adds, and `X-Requested-With: receipt` on POSTs. Serializes jobs with a lock around `run_action()`; uploads print from memory. Always runs with `no_setup` (no sudo; the printer must already be reachable). Deployed on stppi, which is online over Wi-Fi and has the printer cabled to its `eth0` (printer 192.168.192.168, Pi 192.168.192.10 via the `receipt-printer` nmcli profile)
|
||||
- `deploy/` — systemd user units; `update.sh` (run by `receipt-update.timer`) fast-forwards the server's clone from Gitea, runs the tests, and restarts `receipt-web`, rolling back if they fail. Pushing to Gitea `master` is the deploy
|
||||
- `connect_receipt.sh` — brings up the printer's network interface (needs sudo); run automatically before any print over Ethernet. The TUI runs it with output captured (`setup_network_quiet`) so it can't corrupt the screen
|
||||
- `tests/` — pytest suite; uses `FakePrinter` + mocked `requests`, never touches hardware or network
|
||||
|
||||
Reference in New Issue
Block a user