store art from the live stores: storebound art pull (App Store screenshot sets and previews per locale and display type from imageAsset.templateUrl at the original size, the App Store icon from the newest build or the public artwork; per Play language icon, feature graphic, phone / 7" / 10" / TV / Wear screenshots as the =s0 originals checked against Play's sha256) into store/renders with pulled.json (sha256, store, URL host, store checksum); upsert (a re-run changes nothing, differing local files kept unless --force, the upload's file of a slot compared: Play .jpg, App Store .png, the App Store icon as a picture); onboard runs it; apple screenshots / previews and play images see unchanged pulled files as the store's own; check: render sources are notes with pulled art; local renders check: pulled files pass, store-empty sets not demanded; art live / thumb / replace; desktop Store art tab: live thumbnails per store, language and set (same / differs / not pulled), Pull from stores, store-only apps read-only, Replace with a file (image_pick, art.replace) in the lightbox and the art editor; boot check store art case; tests/art-pull.test.ts; console parity 76 rows (57 complete, 19 with the reason); store-screenshots skill (pull first for live apps), pitfall 59
This commit is contained in:
parent
49a73c90e4
commit
00be838b76
40 changed files with 1669 additions and 58 deletions
|
|
@ -5,6 +5,7 @@ import { join } from 'node:path';
|
|||
import { spawnSync } from 'node:child_process';
|
||||
import { boxOutside, type DeviceBox, PLAY_TABLET_SIZES, SIZES } from './lib';
|
||||
import { fontIssues, type FontUsage } from './glyphs';
|
||||
import { pulledEntry, readPulled } from '../lib/art-pull';
|
||||
import { checkCount, checkImage, checkVideo, type ImageInfo, imageInfo, type Issue, IMAGE_SPECS, parseProbe, PREVIEW_RULES, type ProbeInfo, VIDEO_TARGETS } from './spec';
|
||||
|
||||
/** <renders>/report.json: path relative to the renders dir -> flags found while rendering. missing = 404s (frames);
|
||||
|
|
@ -51,6 +52,10 @@ export function scanRenders(dir: string, o: { langs: string[]; variants?: string
|
|||
required?: Record<string, boolean> | ((lang: string) => Record<string, boolean>); sizes?: string[];
|
||||
probe?: (file: string) => ProbeInfo | null }): RendersScan {
|
||||
const report = readReport(dir);
|
||||
// art pulled from the stores (art pull): an unchanged pulled file is the store's own (the store took it), and a set
|
||||
// the store had nothing for (Play's default-language fallback, a locale without that set) is not demanded here:
|
||||
// validate reports the store side
|
||||
const pulled = readPulled(dir);
|
||||
const out: RendersScan = { images: [], videos: [], sets: [], variants: [], langs: o.langs };
|
||||
const probe = o.probe ?? ffprobe;
|
||||
for (const variant of [undefined, ...(o.variants ?? [])]) {
|
||||
|
|
@ -66,9 +71,11 @@ export function scanRenders(dir: string, o: { langs: string[]; variants?: string
|
|||
const numbers = new Set(files.map(f => f.split('.')[0]));
|
||||
for (const f of files) {
|
||||
const file = join(sdir, f);
|
||||
const info = imageInfo(readFileSync(file));
|
||||
const bytes = readFileSync(file);
|
||||
const info = imageInfo(bytes);
|
||||
const rel = (variant ? `${variant}/` : '') + `${lang}/${size}/${f}`;
|
||||
const issues = checkImage(info, size);
|
||||
const fromStore = !variant && !!pulledEntry(pulled, dir, file, bytes);
|
||||
const issues = fromStore ? [] : checkImage(info, size);
|
||||
const entry = report[rel.replace(/\.jpe?g$/i, '.png')];
|
||||
for (const msg of entry?.overflow ?? []) issues.push({ level: 'warn', code: 'overflow', msg });
|
||||
issues.push(...fontIssues(entry?.fonts));
|
||||
|
|
@ -76,7 +83,7 @@ export function scanRenders(dir: string, o: { langs: string[]; variants?: string
|
|||
if (entry && !entry.fonts) issues.push({ level: 'warn', code: 'fonts', msg: 'font usage not recorded (rendered by an older storebound): run shots fonts + shots render again so missing glyphs are caught' });
|
||||
out.images.push({ rel, lang, variant, size, file, info, issues });
|
||||
}
|
||||
const required = req[size] ?? false;
|
||||
const required = (req[size] ?? false) && !(!variant && !files.length && pulled?.storeEmpty.includes(`${lang}/${size}`));
|
||||
if (!files.length && !required) continue;
|
||||
out.sets.push({ lang, variant, size, count: numbers.size, issues: checkCount(numbers.size, size, required) });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue