check-book-80.js 694 B

1234567891011121314
  1. const { PrismaClient } = require('@prisma/client');
  2. const p = new PrismaClient();
  3. (async () => {
  4. const b = await p.book.findUnique({ where: { id: 80 }, include: { chapters: true } });
  5. console.log(`book 80 lang=${b.targetLanguage} stage=${b.genStage} chapters=${b.chapters.length}`);
  6. for (const c of b.chapters) {
  7. const sample = (c.content || '').substring(0, 300).replace(/\n/g, ' / ');
  8. const hasCN = /[一-鿿]/.test(c.content || '');
  9. console.log(` ch#${c.id} [${c.genStage}] audio=${c.audioUrl ? 'yes' : 'NO'}`);
  10. console.log(` ${sample}`);
  11. console.log(` hasChinese: ${hasCN ? '❌ 是(有中文!)' : '✅ 否(纯英文)'}`);
  12. }
  13. await p.$disconnect();
  14. })();