Files

18 lines
1.6 KiB
JavaScript
Raw Permalink Normal View History

import { readFileSync, writeFileSync } from 'node:fs';
function patch(file, pairs) {
let t = readFileSync('parts-r/' + file, 'utf8');
for (const [a, b] of pairs) {
if (!t.includes(a)) { console.log('MISS ' + file + ' :: ' + a.slice(0, 50)); continue; }
t = t.split(a).join(b);
}
writeFileSync('parts-r/' + file, t, 'utf8');
console.log('patched ' + file);
}
patch('11-compat-tests.md', [
['| 课程 | 课表解析结果(`ScheduleDto`/`IslandTimePointDto`)、准备/上课/课间/下课前/课中进度提醒、下课前秒数徽标、当前/下一节/今日时间点显示 | 时间状态机单测 + 假时钟无头场景 |',
'| 课程 | 课表解析结果(`ScheduleDto`/`IslandTimePointDto`)、准备/上课/课间/下课前/课中进度提醒、下课前秒数徽标、当前/下一节/今日时间点显示;**行为变更**:custom 不再临时接管岛显示课程提醒(仅保留 ending 徽标,进度由课程组件显示),fixed 按 ClassIsland 接管 | 时间状态机单测 + 假时钟无头场景 |'],
]);
patch('12-acceptance.md', [
['- [ ] 课程状态机跨天、跨周、临时课表、预定课表、调课场景正确(与 ClassHelper 现有解析结果一致)。',
'- [ ] 课程状态机跨天、跨周、临时课表、预定课表、调课场景正确(与 ClassHelper 现有解析结果一致)。\n- [ ] 课程提醒接管:fixed(classisland)按 ClassIsland 行内容接管显示 prepare/on-class/break;custom 不再临时接管整岛(移除 `resident-lesson-page`),进度由课程组件显示,ending 只保留课程名右侧 30×30 蓝色圆形秒数徽标。'],
]);