[art-prep] ArtBoard: Build prompts, stand-ins and the art board from the manifest, and accept pictures into art/final
tools/art-prep reads art/STYLE.md (draft) and art/manifest.json (25 Phase 1 pictures), refuses forbidden words in any prompt, writes 29 stand-ins and the board files, and cuts and encodes accepted pictures as WebP within budget.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import type { Manifest } from '../src/manifest.js';
|
||||
|
||||
export const root = fileURLToPath(new URL('../../../', import.meta.url));
|
||||
export const readManifest = (): Manifest => JSON.parse(readFileSync(`${root}art/manifest.json`, 'utf8')) as Manifest;
|
||||
export const readStyle = (): string => readFileSync(`${root}art/STYLE.md`, 'utf8');
|
||||
|
||||
/** A deep copy to break on purpose. */
|
||||
export const clone = <T>(v: T): T => JSON.parse(JSON.stringify(v)) as T;
|
||||
Reference in New Issue
Block a user