screenshot

command
v0.19.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Animated-GIF capture for the README. Drives the same demo-repo server as the screenshot set, but records a *sequence* of frames through a scripted flow and encodes them as a looping GIF.

Encoding is pure-Go (image/gif) — there is no ffmpeg/gifsicle dependency, matching prereview's "single binary, no external tools" ethos. Frames are captured at the desktop viewport, downscaled to the README display width (golang.org/x/image/draw, high-quality CatmullRom), then quantized to a 256-colour paletted image for GIF. The quantizer is pluggable (see quantizeFrame) so we can start with the stdlib fixed palette and swap to an adaptive one only if the syntax-highlighted UI bands badly.

Usage (see cmd/screenshot/capture-gifs.sh):

go run ./cmd/screenshot --gif hero --url http://127.0.0.1:8765 --out docs

Screenshot dev helper. Connects to a running prereview server and captures PNGs at iPhone and laptop viewports so visual bugs can be checked without asking the user to refresh and screenshot.

Usage:

go run ./cmd/screenshot --url http://127.0.0.1:8765 --out /tmp/prereview

Terminal pane + compositor for the README hero GIF.

The hero GIF closes prereview's review→fix loop: the browser pane shows the human commenting and handing off; this terminal pane shows the Claude Code skill reading that comment and editing the file. The transcript is scripted (deterministic — no live LLM call, so `make gifs` reproduces byte-for-byte) but faithful to skill/SKILL.md: Claude reads the handoff and edits the file. It does NOT mark comments resolved — that's a human action (the "Resolve" button), so the transcript never claims to resolve.

The pane is a plain HTML doc rendered in a second chromedp tab (no server, no new dependency); composeStacked then stitches the browser screenshot above the terminal screenshot into one frame, which gif.go downscales + quantizes through the same pure-Go path as every other flow.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL