Skip to content

Skip already-uploaded handout images via persistent R2 ledger#100

Merged
PatrikBak merged 1 commit into
mainfrom
patrik/handout-upload-ledger
May 15, 2026
Merged

Skip already-uploaded handout images via persistent R2 ledger#100
PatrikBak merged 1 commit into
mainfrom
patrik/handout-upload-ledger

Conversation

@PatrikBak
Copy link
Copy Markdown
Owner

Summary

  • Track each R2 key's last-pushed SVG mtime in data/handouts/.r2-uploads.json (gitignored) and upload only images whose on-disk mtime is newer than the recorded value.
  • Robust to all the ways a fresh SVG can land on disk: pipeline-recompiled by the build, manual asy compile beforehand, AI invoking the export script directly, or partial runs that touched a subset of handouts.
  • Ledger is updated after each successful upload and flushed at the end of the run (sorted for readability).
  • Cross-handout dedup retained so language variants don't double-push the same R2 key.
  • README refreshed: documents the new ledger, the Asymptote refresh step (step 1 of the pipeline), and the previously-undocumented --skip-asy / --force-asy / --error-log flags plus the correct --compiler default.

Track each R2 key's last-pushed SVG mtime in data/handouts/.r2-uploads.json
and only upload images whose on-disk mtime is newer than the recorded value.
Works regardless of how the SVG was generated — pipeline-recompiled, manual
asy run, AI-invoked export script, or partial runs touching one handout.

README updated to cover the new ledger, the Asymptote refresh step,
and the previously-undocumented --skip-asy / --force-asy / --error-log
flags plus the correct --compiler default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
math-comps Ready Ready Preview, Comment May 15, 2026 3:41pm

@PatrikBak PatrikBak enabled auto-merge May 15, 2026 15:40
@PatrikBak PatrikBak merged commit c904dfd into main May 15, 2026
4 checks passed
@PatrikBak PatrikBak deleted the patrik/handout-upload-ledger branch May 15, 2026 15:43
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