This commit is contained in:
2026-01-10 16:58:15 +08:00
commit 48e3033639
53 changed files with 41267 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import { app } from './common.ts';
import fs from 'node:fs';
import path from 'node:path';
const sentence = path.join(process.cwd(), 'data', 'sentence-01-optimized.json');
const data = JSON.parse(fs.readFileSync(sentence, 'utf-8'));
async function run() {
const sentences = data?.sentences || [];
console.log(`Importing ${sentences.length} sentences...`);
const res = await app.run({
path: 'image-creator',
// key: 'create-sentence-list',
key: 'fix-sentences',
payload: {
data: sentences
}
});
console.log('Import sentence result:', res);
}
// await run();
async function run2() {
const sentences = data?.sentences || [];
const res = await app.run({
path: 'image-creator',
key: 'perfect-sentence',
});
console.log('Import sentence result:', res);
}
await run2();