previewgen
Draws the link preview from the cat's own data: a 1200 by 630 still card, and the frames of a
looping video that plays the demo's tour (site::demo::TOUR) at 20 frames a second. Output is
SVG; ../tools/preview turns it into card.png and loop.mp4. Words are
drawn as pixels from an 8 by 8 public-domain face (font8x8), so no font is needed and the result
is the same everywhere.
cargo run -p previewgen -- frames <dir> # background.svg, card.svg, frame-0001.svg, ...
cargo run -p previewgen -- check-meta page.html # which preview tags a page lacks
cargo run -p previewgen -- mascot # the default mascot, for tools/preview-hash
| Path | What |
|---|---|
| src/ | lib.rs (the drawing) and main.rs (the two commands). |