import fs from 'node:fs'; import path from 'node:path'; import videos from '../../unreal_tran_web/src/features/virtual-training-scripts/narration-video-manifest.js'; const dir=path.resolve('reports/bridge-lecture-polish-20260915'); const changed=JSON.parse(fs.readFileSync(path.join(dir,'regenerated.json'),'utf8')); const esc=s=>String(s).replaceAll('&','&').replaceAll('<','<').replaceAll('"','"'); const tests=['local','lan','test'].filter(name=>fs.existsSync(path.join(dir,name,'result.json'))); let html=`桥梁数字教员讲解修正验收

桥梁数字教员讲解修正验收 · 2026-09-15

四套任务共39段讲解,6段重新生成。默认视频模式,等待场景加载完成后播放;保留语音切换与旧文件。右上角按内容自动排列,移除“三维实时交互”角标。公开浮窗显示真实教员头像,移除阴影和头像绿点。

验证:${tests.map(t=>`${t} 浏览器回归 文件校验`).join(' · ')}。另通过前端构建、14项脚本契约测试、562项Java测试、2项公开头像接口测试。

本次重新生成的6段

`; for(const item of changed){const src=path.relative(dir,path.resolve('../unreal_tran_web/public'+item.url)).replaceAll('\\','/');html+=`
${esc(item.code)} · 第${item.number}步

${esc(item.text)}

${item.duration}s · 已替换 · 原文件保留
`} html+='

当前39段讲解清单

'; for(const script of videos.scripts){html+=`

${esc(script.code)} · ${esc(script.title||script.id)}

    `;for(const clip of script.steps){const src=path.relative(dir,path.resolve('../unreal_tran_web/public'+clip.url)).replaceAll('\\','/');html+=`
  1. ${esc(clip.expectedTitle)}:${esc(clip.text)}
  2. `}html+='
'} if(fs.existsSync(path.join(dir,'test/TASK-VIRTUAL-008.png')))html+='

测试环境

'; html+='
';fs.writeFileSync(path.join(dir,'index.html'),html); console.log('Report updated');