1 Commits

Author SHA1 Message Date
f4f0d86d1f svg-maker: rendered example in the README
All checks were successful
release-tools / build-release (push) Successful in 4m4s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KikHkfCiC3yELbsMN8fT9
2026-08-07 08:54:40 +02:00
2 changed files with 13 additions and 0 deletions

View File

@@ -30,6 +30,11 @@ canvas** — so mistakes surface as text even without the preview.
Errors carry line numbers (`card.svgd: line 7: "four" is not a
number — rect needs: rect <x> <y> <w> <h>`).
The example above, rendered (this exact file is
[`examples/gauge.svgd`](examples/gauge.svgd) → [`examples/gauge.svg`](examples/gauge.svg)):
![gauge example](examples/gauge.svg)
## The .svgd format
One element per line, `#` comments, `key=value` attributes last:

View File

@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 120" width="240" height="120">
<rect width="100%" height="100%" fill="#12161f"/>
<rect x="8" y="8" width="224" height="104" fill="none" rx="10" stroke="#262d3a" stroke-width="2"/>
<circle cx="40" cy="60" r="22" fill="none" stroke="#3fca7c" stroke-width="6"/>
<path d="M30,60 L38,68 L52,50" fill="none" stroke="#3fca7c" stroke-linecap="round" stroke-width="5"/>
<text x="76" y="54" fill="#8a93a5" font-size="13">backups</text>
<text x="76" y="76" fill="white" font-size="17" font-weight="bold">all green</text>
</svg>

After

Width:  |  Height:  |  Size: 586 B