meme/caption.sh
Render a caption onto a meme-cli template. lines is a single "|"-delimited string, one caption per box in order, whatever the box count -- a 1-box template is just "one caption", a 2-box is "top|bottom", an 8-box is "a|b|c|d|e|f|g|h". Run templates.sh show <id> first to check the real box count/order.
Use when the user wants a meme rendered from a known template with specific captions.
- the file
- meme/caption.sh
- its skill
- meme/SKILL.md (the whole meme pack)
- as knowledge
- okf/meme/caption.md
- on GitHub
- meme/caption.sh ↗
Run it
1. Once per machine: install fragletc (Docker must already be running).
curl -fsSL https://raw.githubusercontent.com/ofthemachine/fraglet/main/install.sh | sh
2. Fetch the tool and print its contract.
curl -fsSLO https://tools.ofthemachine.com/meme/caption.sh && chmod +x caption.sh && ./caption.sh --fraglet-help
3. Run it.
./caption.sh -p template="<template>" -p lines="<lines>" --output meme.png
Parameters
| name | type | requirement | description |
|---|---|---|---|
| template | string | required | meme-cli template id (find with templates.sh search/show) |
| lines | string | required | Captions joined by |, one per box in template order |
Outputs
meme.png
Provenance
- image
- ofthemachine/meme@sha256:8a3ac29b110b9471e7688bf8d7bdc12fe83fd49da63a084a3db1a41549b6c57f
- reach
network=none— a run is a pure function of its inputs; results are safe to memoize.- procedure_hash
- sha256:d59b1f6500a589062af0b0f744ac3fc94f85b1d6640c1a44541042baa5e152af
- receipt
- add
--receipt run.jsonto any run;receipt/attest.pyverifies it against this hash without re-running.
Source
caption.sh · 10 lines · sha256 d59b1f6500a5…
#!/usr/bin/env -S fragletc --image ofthemachine/meme@sha256:8a3ac29b110b9471e7688bf8d7bdc12fe83fd49da63a084a3db1a41549b6c57f #: d=Render a caption onto a meme-cli template. lines is a single "|"-delimited string, one caption per box in order, whatever the box count -- a 1-box template is just "one caption", a 2-box is "top|bottom", an 8-box is "a|b|c|d|e|f|g|h". Run templates.sh show <id> first to check the real box count/order. #: when=Use when the user wants a meme rendered from a known template with specific captions. #: network=none #: stdin=none #: param=template:required:d=meme-cli template id (find with templates.sh search/show) #: param=lines:required:d=Captions joined by |, one per box in template order #: output=meme.png meme-cli render "$TEMPLATE" --lines "$LINES" -o /output/meme.png