Skip to content

Write the screenshot documents with the sampledoc package - #759

Merged
andiwand merged 1 commit into
mainfrom
use-sampledoc-package
Nov 14, 2026
Merged

andiwand merged 1 commit into
mainfrom
use-sampledoc-package

Conversation

@andiwand

@andiwand andiwand commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

The documents the store screenshots open were written by scripts/make-screenshot-documents.py. That was 2,200 lines of generator and translations, and OpenDocument.ios carried an older copy of it. The generator now lives in its own repo, opendocument-app/sampledoc, and is published on PyPI as sampledoc. This PR switches the app to it.

  • scripts/requirements.txt pins sampledoc==0.1.0 next to storeframe (from Frame store screenshots with storeframe #760). The release workflow's screenshot job installs from it.
  • scripts/make-screenshot-documents.py is now a ~90-line wrapper with the same name, arguments and output location. The Fastfile, ScreenshotTests and the docs that point to it are unchanged. It keeps the locale table from store_screenshots.LOCALES, which goes into screenshot-names.json as before. It exits if the installed sampledoc isn't the pinned version, so the pictures don't depend on who takes them.
  • README and CLAUDE.md say to install from scripts/requirements.txt, and that the wording of the documents now lives in sampledoc.

Output is unchanged. I ran the old script and the new wrapper and compared the results with diff -r. All 135 documents and screenshot-names.json are byte-for-byte identical.

Tested locally in a clean venv installed from scripts/requirements.txt: the full run, --language en, sampledoc not installed, and a version mismatch. I haven't run a screenshot lane; the release workflow's screenshot job is the first real run.

The iOS change is opendocument-app/OpenDocument.ios#231.

The documents the store screenshots open were generated by a 2,200 line
script that the iOS app carried a copy of. Both now take them from
sampledoc (https://pypi.org/project/sampledoc/), pinned at 0.1.0 in
scripts/requirements.txt next to storeframe.

make-screenshot-documents.py stays as the entry point and keeps what is
this app's: where the documents go, and the locale table from
store_screenshots.py. It refuses to run against a different sampledoc
version than the pinned one, so the pictures do not change with whoever
takes them.

The output is the same, byte for byte, as the old script wrote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZb2gUX4HQfKXWeZ3UQ
@andiwand
andiwand force-pushed the use-sampledoc-package branch from de730ad to fa3e817 Compare November 14, 2026 14:26
@andiwand
andiwand merged commit 082d527 into main Nov 14, 2026
2 checks passed
@andiwand
andiwand deleted the use-sampledoc-package branch November 14, 2026 14:27
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