Skip to content

docs: three tutorials, each a complete programme we ran - #7

Merged
stephen-masters merged 2 commits into
mainfrom
docs/tutorials
Nov 1, 2026
Merged

stephen-masters merged 2 commits into
mainfrom
docs/tutorials

Conversation

@stephen-masters

Copy link
Copy Markdown
Contributor

Summary

  • A Tutorials page in the reference site, between the README and the API reference, with three worked examples:
    1. Opening an image with Pillow, checked first. open_checked's two lines spelt out; a refusal and its verdict; a PDF under open_checked; an images-only policy; the same wrapper written for a thumbnailer and, for readers with no formats argument (tifffile, imageio, OpenCV), the generic check-then-read shape; the same file under DEFAULT and STRICT, and why a policy should be set from your own corpus.
    2. Rendering a PDF with poppler. What pdfinfo tells the check without rendering; pdftoppm run at the dpi the check was made at, with a time budget per page.
    3. Taking files from outside. An inbox that moves each file to accepted or quarantine and writes the verdict beside it; checking a copy you own; keeping the policy and the decoder's limits in agreement; the --json and -q --strict command forms.
  • The README's "With Pillow" section points at the page.

Test plan

  • Every Python block in the page was executed as written, in a directory holding the files it names (real PNG, JPEG, multi-frame TIFF and four-page PDF made with Pillow; a PostScript file called page.png, a GIF and a 63-megapixel JPEG); the output quoted in the prose is what came back
  • zensical build --clean --strict: no issues; the anchors the page links to exist
  • pytest: 355 passed

🤖 Generated with Claude Code

stephen-masters and others added 2 commits November 1, 2026 21:05
The reference says what every name does; nothing showed the shape of a
pipeline that uses them. Three worked examples: opening an image with
Pillow checked first, with open_checked's two lines spelt out and the
same wrapper written for a thumbnailer and for a reader with no formats
argument; rendering a PDF with poppler at the dpi the check was made at,
with a time budget per page once the count is known; and an inbox that
quarantines what it refuses and writes the verdict beside each file.

Every code block was run as written against the files it names, and
the output quoted is what came back. The README points at the page.

Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Ruff formats the Python inside Markdown too, and the aligned comments
were not its style. The check runs on the whole tree in CI.

Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@stephen-masters
stephen-masters merged commit 97fa722 into main Nov 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant