QR Label Printing
Physical labels for devices are generated from vault notes and printed to a Brother QL-700 label printer. Labels show the device name and a QR code linking to the device’s page on docs.cornillaud.com.
Tooling
| File | Purpose |
|---|---|
doc/tools/labels/print-labels.py | Label generation and print script (uv inline-deps) |
doc/tools/labels/label-types.yaml | Label type definitions |
tmp/labels/ | Generated output — gitignored, ephemeral |
Prerequisite: uv — brew install uv. No other setup required;
dependencies are managed automatically on first run.
Printing from Obsidian
The Shell Commands community plugin is configured with a single command:
- Alias: Print QR code label for this note
- Command palette:
Execute: Print QR code label for this note - Confirms before executing: yes
Open any device note, open the command palette (Cmd+P), type print, select the command.
The label prints immediately to the QL-700.
Shell Commands plugin configuration
cd /Users/tim/projects/git/home-mgmt && /opt/homebrew/bin/uv run doc/tools/labels/print-labels.py --note {{file_path:relative}} --print
Output (stdout and stderr) is shown as an Obsidian notification.
Printing from the terminal
# Print all labelable notes
uv run doc/tools/labels/print-labels.py --print
# Preview PDF without printing
uv run doc/tools/labels/print-labels.py
open tmp/labels/labels.pdf
# Print a single note
uv run doc/tools/labels/print-labels.py --note "50-Devices/Home Network/APC UPS.md" --print
# List all notes that would be printed and their label types
uv run doc/tools/labels/print-labels.py --list
# Print only notes under a subtree
uv run doc/tools/labels/print-labels.py --filter "50-Devices/Home Network" --printAll commands are run from the repo root (home-mgmt/).
Label type system
Label type is resolved per note via an inheritance chain:
- Note’s own
labelType:front matter — highest priority - Nearest ancestor
index.mdwithlabelType:in its front matter - No global default — notes with no resolvable type are silently skipped
index.md files are never printed. They exist solely to set the default
label type for their subtree. Currently 50-Devices/index.md sets
labelType: qr-device, so every note in that tree inherits it automatically.
To suppress a label for a specific note: add labelType: none to its front matter.
Defined label types
| Type | Tape | Layout | Brother label ID |
|---|---|---|---|
qr-device | DK-1201 (1.1” × 3.5”) | QR code left, name right | 29x90 |
text-only | DK-1209 (0.66” × 3.4”) | Name centered, no QR | 17x54 |
none | — | Skip this note | — |
Optional front matter
labelNote: "short subtitle" # printed below the device name (any note)
labelType: text-only # override inherited type (any note or index.md)Hardware
- Printer: Brother QL-700 (USB)
- Standard device label stock: DK-1201 — 1.1” × 3.5” die-cut address labels
- Small label stock: DK-1209 — 0.66” × 3.4” (for wall plates, outlets, etc.)