make-previews wrote every WebP one directory too high
REPO was os.path.join(HERE, '..', '..'), and HERE is <root>/library/scripts/posters
-- so REPO resolved to <root>/library, not the repo root. Both outputs went to
directories nothing reads and nothing serves:
library/plugin-designs/<profile>/assets/previews/ instead of plugin-designs/...
library/data/posters/ instead of data/posters/
★ IT REPORTED SUCCESS WHILE DOING NOTHING USEFUL, which is what makes it worth a
commit of its own. The script printed "[make-previews] N posters" and its two
destination lines, wrote genuine WebPs, and exited 0. Only the files were in a
tree no build stages, so the SERVED previews never changed.
MEASURED, on one poster, before and after:
before the regenerated thumbnail was byte-identical to the shipped one
(same sha256, git status clean) -- 0 pixels changed
after sha differs, git sees both files modified, and 52.9% of the
thumbnail's pixels differ (21.1% by more than 40/255, max delta 255)
Found by DRY-RUNNING this step on a single already-shot poster instead of
discovering it after a 174-sheet reshoot. Without the fix that reshoot would have
produced 174 correct WebPs in the wrong tree, the walls would have kept their old
teal thumbnails, and the landing would have looked complete: a teal thumbnail
over a hued print, which is the exact defect the reshoot exists to remove.
The three-level form is what the other scripts in this folder already use to
reach the root; this one was the odd one out.
This commit is contained in:
parent
f42444ec8c
commit
c0d9592149
1 changed files with 7 additions and 1 deletions
|
|
@ -26,7 +26,13 @@ from PIL import Image
|
|||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
SRC = os.path.join(HERE, 'out', 'posters')
|
||||
REPO = os.path.abspath(os.path.join(HERE, '..', '..'))
|
||||
# ★ THREE LEVELS, NOT TWO. HERE is <root>/library/scripts/posters, so '..','..' lands on
|
||||
# <root>/library and every output went to library/plugin-designs/... and library/data/posters --
|
||||
# directories nothing reads and nothing serves. The script REPORTED success and wrote real WebPs,
|
||||
# so a preview run looked like it had worked while the served previews never changed. Found by
|
||||
# dry-running this step on a single poster before a 174-sheet reshoot; it would otherwise have
|
||||
# silently produced 174 files in the wrong tree and shipped the old thumbnails.
|
||||
REPO = os.path.abspath(os.path.join(HERE, '..', '..', '..'))
|
||||
# WHICH APP the previews belong to. The country-posters app renders from the SAME
|
||||
# generator into the SAME out/posters, so the only thing that differs is where the
|
||||
# WebPs land — parameterize rather than fork this script.
|
||||
|
|
|
|||
Loading…
Reference in a new issue