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

FilePurpose
doc/tools/labels/print-labels.pyLabel generation and print script (uv inline-deps)
doc/tools/labels/label-types.yamlLabel type definitions
tmp/labels/Generated output — gitignored, ephemeral

Prerequisite: uvbrew 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" --print

All commands are run from the repo root (home-mgmt/).

Label type system

Label type is resolved per note via an inheritance chain:

  1. Note’s own labelType: front matter — highest priority
  2. Nearest ancestor index.md with labelType: in its front matter
  3. 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

TypeTapeLayoutBrother label ID
qr-deviceDK-1201 (1.1” × 3.5”)QR code left, name right29x90
text-onlyDK-1209 (0.66” × 3.4”)Name centered, no QR17x54
noneSkip 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.)