diff --git a/cli/shots/render.ts b/cli/shots/render.ts index 63a927ad..71c2b548 100644 --- a/cli/shots/render.ts +++ b/cli/shots/render.ts @@ -1,6 +1,6 @@ // Store screenshots + Play feature graphic at exact pixel sizes, from raw game frames and per-language copy. // storebound shots render [--lang en,tr] [--size ios69,play,feature] [--scenes 1,3] [--variant b | --variants] -// [--no-sheet] [--port 8792] +// [--no-sheet] [--port 8792] [--dry] // Out: ///NN.png (24-bit RGB: Play rejects alpha / palette PNGs), /feature/1024x500.png, // /sheet.png (contact sheet of every size packed into a grid, for a quick review) and /report.json (text overflow flags // per image, read by `shots check` and `shots gallery`). Variants go to ///... @@ -37,6 +37,16 @@ export async function run(ctx: Ctx): Promise { jobs.set(v ?? '', { scenes, copy }); } const framesDir = resolve(shots.frames), outDir = resolve(shots.out); + if (a.has('dry')) { + let n = 0; + for (const [v, job] of jobs) for (const lang of langs) { + const scenes = a.list('scenes').length ? a.list('scenes') : job.scenes.map(s => s.id); + const files = sizes.reduce((t, s) => t + (SIZES[s]!.feature ? 1 : scenes.length), 0); + n += files; + log('shots', `would render ${renderDir(outDir, lang, v || undefined)}: ${files} images (${sizes.join(', ')}; scenes ${scenes.join(', ')})`); + } + return done('shots', `render planned (dry run): ${n} images`); + } const fontsDir = join(root, '.storebound', 'fonts'); if (!existsSync(join(fontsDir, 'fonts.css'))) warn('shots', 'no .storebound/fonts/fonts.css: run `storebound shots fonts` first (falling back to system fonts)'); const { phone, tablet } = frameDims(config);