Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/photos/add-photos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# bust anymore.)
# 6. captions anything still missing alt text (gen-alt-text.py), then validates
# the whole artifact graph — pixels, EXIF, histograms, captions, the index —
# via check-photo-pipeline.mjs, which fails the run rather than let an
# via check-photo-pipeline.ts, which fails the run rather than let an
# unlabelled image reach a deploy
#
# REMOTE_RENDER_ONLY=1 skips R2 uploads. The GitHub Actions pipeline uses it
Expand Down Expand Up @@ -478,7 +478,7 @@ fi
# gets captioned here rather than waiting for a deploy. resumable and idempotent:
# already-captioned stems cost nothing. a 429 (the free 10k neurons/day) stops it
# early, which is why the failure is tolerated here and the real gate is
# check-photo-pipeline.mjs below.
# check-photo-pipeline.ts below.
if command -v python3 >/dev/null 2>&1; then
python3 "$SCRIPT_DIR/gen-alt-text.py" || \
echo " captions incomplete — re-run 'bun run captions' before deploying"
Expand Down
6 changes: 3 additions & 3 deletions tools/photos/extract-photo-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ done

# roll the per-photo EXIF (minus histograms) into the one shared index the
# tooltip warms on idle. derived data, so it MUST be rebuilt whenever the
# per-photo files change; check-photo-pipeline.mjs fails on any drift.
node "$SCRIPT_DIR/build-exif-index.mjs"
# per-photo files change; check-photo-pipeline.ts fails on any drift.
node "$SCRIPT_DIR/build-exif-index.ts"
# The packed bars the grid inlines into each tile as data-hist. Same input as the
# EXIF index above, different consumer: this one never reaches a browser whole.
node "$SCRIPT_DIR/build-histogram-index.mjs"
node "$SCRIPT_DIR/build-histogram-index.ts"

COUNT=$(jq 'keys | length' "$OUT")
if [ "$MERGE" -eq 1 ]; then
Expand Down
4 changes: 2 additions & 2 deletions tools/photos/hash-thumbnails.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ with open(map_path, "w") as f:
# 1. drop the un-hashed source tiers we just addressed — they live in /i/ now.
# metadata.json / alt.json / hashes.json / meta/ stay put.
# 2. drop /i/ files a re-encode superseded (not referenced by the merged map),
# so public/i/ is 1:1 with hashes.json and check-photo-pipeline.mjs passes.
# so public/i/ is 1:1 with hashes.json and check-photo-pipeline.ts passes.
pruned_src = pruned_i = 0
for stem in stems:
for name in (f"{stem}.avif", f"{stem}.jpg", f"{stem}-400.avif", f"{stem}-200.avif"):
Expand All @@ -125,4 +125,4 @@ EOF

# The short URL hash above is intentionally kept separate from the full-byte
# fingerprint used by the exact photo_recipe matcher.
node "$SCRIPT_DIR/build-image-fingerprints.mjs"
node "$SCRIPT_DIR/build-image-fingerprints.ts"
Loading