Move repository content images to S3-backed media references
This commit is contained in:
@@ -6,7 +6,8 @@ import {createHash} from 'node:crypto';
|
||||
import annotations from '../contentasset:annotations.json';
|
||||
import {textMergeTarget,unionBoxes} from '../contentasset:group-text';
|
||||
import ocr from '../contentasset:ocr-evidence.json';
|
||||
const root=path.resolve(import.meta.dirname,'..'),target=path.join(root,'contentasset:assets');
|
||||
const root=path.resolve(import.meta.dirname,'..'),target=path.resolve(process.env.MEDIA_AUTHORING_ROOT||'/tmp/prompt-media-authoring');
|
||||
if(target===root||target.startsWith(root+path.sep))throw Error('MEDIA_AUTHORING_ROOT must be outside repository');
|
||||
type Box=[number,number,number,number];
|
||||
type Element={id:string;kind:'text'|'image'|'decoration';role:string;box:Box;text:string|null;direction:string;reading:'verified'|'unreadable'|'not-text';asset:string;mask?:string;underlay?:string;pixels:number};
|
||||
function components(mask:Uint8Array,w:number,h:number){
|
||||
|
||||
Reference in New Issue
Block a user