Split the README into focused docs under docs/
Security / Vulnerability check (push) Successful in 39s
Test / Lint and test (push) Successful in 1m57s

The README had grown to 658 lines. It is now a short overview: what
Überbringer is, a quick start, a table of the docs and the licence.
Each topic it held has a document of its own:

- docs/install.md: install.sh, what it leaves behind, and upgrading.
- docs/docker.md: the image behind a reverse proxy, the env file,
  health checks, and the ntfy state volume and token file.
- docs/configuration.md: loading, environment variables, a table of
  every key in every section, and what is logged. The list of log
  messages becomes a summary of what is logged and reported.
- docs/security.md: the API secret, issuing tokens and their scopes,
  the header-file recipe that keeps tokens off command lines (moved
  from docs/api.md), the reverse proxy, image URLs, and what is never
  logged.
- docs/ntfy.md: the ntfy subscriptions, securing the topics and the
  printer's token, with the token scripts unchanged.
- docs/cli.md: the command line.
- docs/development.md: running from source, the Go version, make
  targets, the gate, generated files, the layout, CI and releases.

CLAUDE.md names the new docs: a config key is now documented in
docs/configuration.md, and the layout and Go version in
docs/development.md. docs/api.md, design.md and the job-store plan
point to the docs that now hold what they referred to in the README.
The release archives also carry the docs on running the daemon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
57_WolveandClaude Opus 5.5 committed 2026-11-30 22:33:08 -06:00
1 parent 80a65f6083
commit 3d451eb0b7
14 files changed
+934 -678

No files matched your search

+14 -22
View File
@@ -1,8 +1,8 @@
# Überbringer API
The HTTP API, the print elements and blocks, the modules, and the error
codes. [README.md](../README.md) covers installing, configuring and running
the daemon.
codes. [README.md](../README.md) links to the docs on installing,
configuring and running the daemon.
## Contents
@@ -31,17 +31,9 @@ accepted, because they leak into proxy logs.
Keep a token off command lines too, where other users of the machine can
read it. The examples here send the header from a file only you can read,
which curl 7.55 and later take as `-H @file`. On a host set up by
`install.sh`, whose config is `/etc/uberbringer/config.toml`, make it like
this. The token passes through a shell variable, never a command's
arguments or the terminal, and the file is written only if the token
command succeeded; for a client on another machine, copy the file there.
```sh
token=$(sudo uberbringer token --config /etc/uberbringer/config.toml --subject my-script) &&
(umask 077; printf 'Authorization: Bearer %s\n' "$token" > ~/.uberbringer-auth)
unset token
```
which curl 7.55 and later take as `-H @file`;
[security.md](security.md#keeping-tokens-off-command-lines) shows how to
make it.
What a token may do is set when it is issued:
@@ -133,7 +125,7 @@ curl -H @"$HOME/.uberbringer-auth" https://printer.example.com/api/v1/jobs/job_0
`status` is `queued`, `printing`, `done` or `failed`. A failed job includes an
`error` field. `source` says where the job came from: `print` for
`/api/v1/print`, `module:<name>` for a [module](#modules) route, or
`ntfy:<name>` for an [ntfy subscription](../README.md#ntfy-subscriptions)
`ntfy:<name>` for an [ntfy subscription](ntfy.md)
in the config. The last `queue.history` finished jobs are kept.
### Preview a receipt
@@ -163,7 +155,7 @@ curl -X POST https://printer.example.com/api/v1/preview \
- The preview is read back from the bytes the job renders to, so it shows
what the printer receives: wrapping, folded characters, `?` for missing
ones, the blank lines [`printer.cut_feed`](../README.md#configuration)
ones, the blank lines [`printer.cut_feed`](configuration.md#printer)
feeds before a cut (3 by default) and the final cut.
- Centred and right-aligned text is indented as the printer places it,
counted in Font A columns. Text at a larger size shows each character
@@ -192,7 +184,7 @@ With `Accept: application/json` the answer carries the styles too. For
|-------|---------|
| `columns` | Font A characters per line |
| `codepage` | The code page text is printed in |
| `line_count` | Lines the receipt prints, all copies counted: text lines, fed lines, and one for each QR code, barcode and image. [`format.max_lines`](../README.md#configuration) limits it |
| `line_count` | Lines the receipt prints, all copies counted: text lines, fed lines, and one for each QR code, barcode and image. [`format.max_lines`](configuration.md#format) limits it |
| `lines[].kind` | `text`, `qr`, `barcode`, `image`, `raw` or `cut` |
| `lines[].text` | The line as it prints, or the placeholder |
| `lines[].runs` | Styled parts of `text`, in characters from `from` up to `to`: `bold`, `underline` (1 or 2), `invert`, `font` (`b`), and `width` and `height` when scaled. Plain Font A text at size 1 has no run |
@@ -217,7 +209,7 @@ when the worker renders it, before anything is sent; its `error` reads
A printer that accepts connections but does not answer status requests is
reported as `"status": "unknown"` with HTTP `200`.
With [ntfy subscriptions](../README.md#ntfy-subscriptions) configured, an
With [ntfy subscriptions](ntfy.md) configured, an
`ntfy` array lists each one, in the order of the config. The status code
still depends on the printer alone, so a subscription that cannot connect
never turns `/healthz` to `503`:
@@ -627,7 +619,7 @@ the daemon.
A box with the text, then, when there are items, an empty line and a
checklist. The time it was built, in `format.timezone` and
`format.time_layout` ([configuration](../README.md#configuration)), goes in
`format.time_layout` ([configuration](configuration.md#format)), goes in
the bottom border. The request above prints:
```text
@@ -764,7 +756,7 @@ attachment expires:
- A message that updates an earlier one, with the same `sequence_id`,
prints as it is, like any other: one message cannot tell whether it is
the first of its sequence, since a publisher may choose the sequence ID.
An [ntfy subscription](../README.md#ntfy-subscriptions), which remembers
An [ntfy subscription](ntfy.md), which remembers
what it printed, marks such a message `(updated)`.
- A message over the [limits](#notify) of `notify` is not refused; what is
over them is cut or left out. A title, topic, tag, label or file name is
@@ -781,7 +773,7 @@ header file that only the user the client runs as can read. Both setups
below keep the token off command lines and out of shell history.
For your own client, with `~/.config/ntfy/client.yml`, make the file as
yourself, as [above](#api):
yourself, as [security.md](security.md#keeping-tokens-off-command-lines) shows:
```sh
mkdir -p ~/.config/ntfy
@@ -869,7 +861,7 @@ Prune finished
41 snapshots kept, 3 removed.
```
The settings in [`[ntfy.format]`](../README.md#configuration) shape every
The settings in [`[ntfy.format]`](configuration.md#ntfy) shape every
card: `style = "box"` gives priorities 1 and 2 the single box too, and
`style = "compact"` prints every priority without a box, with `URGENT` or
`HIGH` in front of the topic. The title is the payload's, or else the
@@ -888,7 +880,7 @@ bold, the message, then the topic and time. That is a bug: it is logged at
ERROR as `module printed its fallback receipt` and reported to Sentry, and
`uberbringer preview --module` prints a warning.
A card an [ntfy subscription](../README.md#ntfy-subscriptions) prints for
A card an [ntfy subscription](ntfy.md) prints for
a message that replaces one it printed before, of the same `sequence_id`,
has `(updated)` after its title, unless `ntfy.format.updates = "skip"`
leaves such messages out.