docs(大题十年考点): 盘点拆出 01b 覆盖对照与接口,点14 补概率大题

- 01-知识点盘点 14038 → 12976 字符,超额部分整体迁到 01b(§0.x 编号保持不变)
- 15-点14-概率多维随机变量 补题并同步速查回查
- gen_crosslinks 支持把索引表写入含 AUTO:KP 标记的 01b
This commit is contained in:
2026-11-07 12:41:02 +08:00
parent 326d9317f8
commit c19dc8bb25
5 changed files with 254 additions and 74 deletions
+12 -3
View File
@@ -190,8 +190,17 @@ def build(d, check_only=False):
write(path, res)
# ---- 2. 生成 §0.4 ----
if os.path.exists(inv):
txt = read(inv)
# 反查表写到"含 AUTO:KP 标记的那份文件"——默认是盘点,但盘点超过 1.3 万字符时
# 可以把表迁到 01b(标记跟着走),脚本不必改。找不到标记就退回盘点。
target = inv
if not (os.path.exists(inv) and '<!-- AUTO:KP -->' in read(inv)):
for fn in sorted(os.listdir(d)):
p = os.path.join(d, fn)
if fn.endswith('.md') and os.path.exists(p) and '<!-- AUTO:KP -->' in read(p):
target = p
break
if os.path.exists(target):
txt = read(target)
rows = ['| 盘点章节(知识点) | 对应题目 |', '|---|---|']
all_kps = sorted(kp_names, key=lambda s: tuple(int(x) for x in s.split('.')))
for kp in all_kps:
@@ -209,7 +218,7 @@ def build(d, check_only=False):
if new_txt != txt:
changed += 1
if not check_only:
write(inv, new_txt)
write(target, new_txt)
# ---- 3. 生成速查卡「回查」表 ----
if quick and os.path.exists(quick):