com um clique
almanach-printing
Print almanach pages on the AtomS3R thermal printer. Pair over BLE, print layouts from CLI or the remote rendering service at almanach.crib.scapegoat.dev.
Menu
Print almanach pages on the AtomS3R thermal printer. Pair over BLE, print layouts from CLI or the remote rendering service at almanach.crib.scapegoat.dev.
Research a technology topic deeply using web search, Kagi Assistant, defuddle, and PDF collection, then write a comprehensive textbook-style research report in a docmgr ticket workspace and copy the full report to the Obsidian vault. Use when a user asks to research a topic, write a research report, investigate an architecture/paradigm/system, or create a knowledge document that goes beyond a terse summary.
Build or refactor React UI into a modular, reusable, themeable, Storybook-ready package. Use when asked to extract a widget into a component module/library, create theming APIs (CSS variables/parts), add slots or renderers, migrate styles into tokenized CSS, or produce Storybook stories that demonstrate default, themed, and unstyled variants.
Append-only Obsidian vault writing workflow for Manuel's vault at /home/manuel/code/wesen/go-go-golems/go-go-parc. Create new project notes, article/playbook-style knowledge notes, or new dated follow-up notes without overwriting historical notes unless the user explicitly asks. Use when the user mentions the Obsidian vault, asks to add a project description, wants a note modeled after an existing Projects/PROJ note such as PROJ - ZK Tool, wants a reusable ARTICLE/playbook/knowledge entry, or asks to include metadata such as the project date, repo directory, status, tags, and current purpose.
Create exhaustive technology research and design packages for broad engineering topics. Use when the user asks to create a docmgr ticket for full-blown technology research/design, investigate unfamiliar libraries/protocols/frameworks, compare architecture options, gather source material, write intern-ready implementation guides, keep a diary, add small experiments, and optionally upload the final report to reMarkable.
Download a document from a reMarkable device/cloud via remarquee (rmapi-backed) and render it to an annotated PDF via `remarquee rmdoc render-v6`/`render-legacy`, optionally extracting the last N pages into a smaller PDF. Use when asked to export/render/download a reMarkable notebook/journal/document to PDF (full doc or page subset).
Upload Markdown and source files to a reMarkable device as PDFs using the remarquee CLI (rmapi-backed). Use when the user asks to upload/send/export docs/examples to reMarkable, bundle multiple files into one PDF with a ToC, choose an /ai/YYYY/MM/DD destination, avoid or force overwrites, or troubleshoot pandoc/xelatex/rmapi auth.
| description | Print almanach pages on the AtomS3R thermal printer. Pair over BLE, print layouts from CLI or the remote rendering service at almanach.crib.scapegoat.dev. |
| name | almanach-printing |
| metadata | {"title":"Almanach Printing","topics":["almanach","printing","web-bluetooth","ble","thermal-printer"],"what_for":"Print almanach pages on the AtomS3R thermal printer, pair over BLE, and manage the remote rendering service.","when_to_use":"Use when the user wants to print something on the almanach printer, pair/re-pair the printer, check printer status, or manage the rendering service."} |
Print almanach pages on the M5Stack AtomS3R thermal printer (ALM_0F2320) using the almanach-render-service. Supports CLI printing, remote printing via almanach.crib.scapegoat.dev, and BLE pairing.
| Detail | Value |
|---|---|
| Device name | ALM_0F2320 |
| Current IP | 192.168.0.126 |
| WiFi SSID | yolobolo |
| PoP (proof of possession) | alm-0f2320 |
| Paper width | 384px (58mm, 203dpi K118) |
| Printer baud | 460800 |
| Printer API | POST http://192.168.0.126/api/print/bitmap |
| Endpoint | URL |
|---|---|
| Local health | http://localhost:8199/health |
| Remote health | https://almanach.crib.scapegoat.dev/health |
| Local render+print | POST http://localhost:8199/api/render-and-print |
| Remote render+print | POST https://almanach.crib.scapegoat.dev/api/render-and-print |
| Local Studio UI | http://localhost:8199/almanach |
| Remote Studio UI | https://almanach.crib.scapegoat.dev/almanach |
| Setup page (BLE) | http://localhost:8199/setup |
The remote service runs on the crib k3s cluster (Proxmox host at 192.168.0.225), which is on the same LAN as the printer.
cd ~/code/wesen/go-go-golems/almanach
./dist/almanach-render-service print \
--layout path/to/layout.yaml \
--printer-ip 192.168.0.126 \
--feed-lines 8 \
--output yaml
Convert the YAML to JSON and POST it:
cat layout.yaml | python3 -c "import sys,yaml,json; print(json.dumps(yaml.safe_load(sys.stdin)))" | \
curl -sk -X POST https://almanach.crib.scapegoat.dev/api/render-and-print \
-H "Content-Type: application/json" \
-d @-
cat layout.yaml | python3 -c "import sys,yaml,json; print(json.dumps(yaml.safe_load(sys.stdin)))" | \
curl -s -X POST http://localhost:8199/api/render-and-print \
-H "Content-Type: application/json" \
-d @-
./dist/almanach-render-service render \
--layout layout.yaml \
--out /tmp/preview.png \
--output yaml
./dist/almanach-render-service inspect \
--layout layout.yaml \
--output yaml
The printer uses ESP-IDF BLE provisioning with Security 1. Pair when the printer is new or after a physical reset.
ALM_...)systemctl status bluetooth)make build)# Step 1: Verify BLE connection
./dist/almanach-render-service ble-provision --implementation native \
--action version --service-name ALM_0F2320 --pop alm-0f2320
# Step 2: Provision WiFi
./dist/almanach-render-service ble-provision --implementation native \
--action provision --service-name ALM_0F2320 --pop alm-0f2320 \
--ssid yolobolo --passphrase <PASSWORD>
./dist/almanach-render-service setup --port 8199http://localhost:8199/setup in Chromealm-0f2320), WiFi SSID, passwordALM_0F2320Long-press the AtomS3R button until the reset threshold. The firmware clears WiFi state and reboots into BLE provisioning mode.
YAML layouts describe a thermal paper page as blocks. For the full field reference with every block type and its data fields, see:
almanach-render-service help layout-dsl-reference
Or read the source directly:
~/code/wesen/go-go-golems/almanach/internal/app/doc/layout-dsl-reference.md
Quick-start example:
almanach_studio_version: 1
theme: minimal
paperWidth: 384
bodyScale: 1.45
feedLines: 3
blocks:
- id: title-1
type: title
data:
text: MY TITLE
subtitle: A subtitle
- id: date-1
type: date
data:
date: May 14, 2026
day: Thursday
- id: note-1
type: note
data:
label: Notes
text: Some text here
author: Author
- id: quote-1
type: quote
data:
text: "A quote"
author: Author
Valid block types: title, date, divider, plan, news, weather, note, habits, mood, reading, reflection, quote, word, history, did, image.
Each block type has specific data fields — check the DSL reference for the complete list.
image blockUse image to embed a photograph or illustration. Images must be provided as URLs or base64 data URLs in the src field. For headless/CLI rendering, embed as data URLs so no network fetch is needed.
- id: img-1
type: image
data:
label: Banner
src: data:image/jpeg;base64,/9j/4AAQ...
alt: A botanical engraving
caption: Optional caption text
height: 100
fit: cover
border: true
grayscale: true
| Data field | Type | Description |
|---|---|---|
label | string | Section heading above the image. |
src | string | Image URL or data:image/...;base64,... data URL. |
alt | string | Alt text. |
caption | string | Caption below the image. |
height | integer | Image height in pixels within the layout. |
fit | string | CSS object-fit: cover, contain, or fill. |
border | boolean | Draw a border around the image. |
grayscale | boolean | Render in grayscale (better for thermal printing). |
To embed a local image file as a data URL:
python3 -c "import base64,sys; print('data:image/png;base64,' + base64.b64encode(open(sys.argv[1],'rb').read()).decode())" /path/to/image.png
The skill bundles 138 ready-to-print images in images/. These are pre-cropped banner/insert PNGs suitable for the image block type at ~500px wide.
| Collection | Count | Description |
|---|---|---|
images/animals-grid/ | 30 | Vintage animal engravings: badger, bear, bee, cow, crab, crayfish, dragonfly, fox, frog, goat, goose, hedgehog, hen, horse, loon, moth, owl, pheasant, pig, rabbit, rooster, sheep, snake, songbird, sparrow, squirrel, stag, swan, tortoise, trout |
images/cats/ | 28 | Cat/vintage feline engravings — descriptive scene names (e.g. cat-at-garden-gate.png, cat-sleeping-on-windowsill.png) |
images/marine/ | 28 | Marine/nautical engravings — descriptive names (e.g. lighthouse.png, tall-ship.png, shipwreck.png, seashells.png) |
images/pastoral/ | 30 | Pastoral/countryside engravings — descriptive names (e.g. stone-wall-gate.png, country-windmill.png, shepherd-flock.png) |
images/cat-portraits/ | 17 | Cat portrait photographs — breed/color names (e.g. maine-coon-profile.png, tuxedo.png, tortoiseshell.png) + contact sheet |
images/animals/ | 5 | Animal illustrations: fish, fox, hedgehog, owl, snake |
Each collection has a manifest.json with source metadata. Files are named descriptively so you can pick the right image from the filename alone — e.g. images/marine/lighthouse.png, images/animals-grid/fox.png, images/cats/cat-sleeping-on-windowsill.png.
To use an image in a layout, embed it as a data URL:
IMG=~/.pi/agent/skills/almanach-printing/images/marine/rowboat.png
DATA_URL=$(python3 -c "import base64,sys; print('data:image/png;base64,' + base64.b64encode(open(sys.argv[1],'rb').read()).decode())" "$IMG")
# Then use $DATA_URL as the `src` value in an image block
localhost or HTTPS. Remote BLE provisioning is not possible without HTTPS.fonts.css — no network fetch needed. Default ALMANACH_FONT_SCALE=1.4.| Item | Path |
|---|---|
| Repo | ~/code/wesen/go-go-golems/almanach |
| Binary | ~/code/wesen/go-go-golems/almanach/dist/almanach-render-service |
| State file | ~/.config/almanach/render-service/state.json |
| crib-k3s manifests | ~/code/wesen/crib-k3s/gitops/kustomize/almanach/ |
| Docker image | ghcr.io/go-go-golems/almanach-render-service:latest |
| Example layouts | ~/code/wesen/go-go-golems/almanach/examples/layouts/ |
| Firmware | ~/code/wesen/go-go-golems/almanach/firmware/atoms3r/ |
| Image library | ~/.pi/agent/skills/almanach-printing/images/ |