Compare commits

..
10 Commits
5 changed files with 108 additions and 12 deletions
+15 -8
View File
@@ -133,15 +133,15 @@ function panel(cfg) {
const PAGE = 30;
const bar = document.getElementById(cfg.bar);
const sets = {};
cfg.groups.forEach(g => sets[g.key] = new Set());
cfg.groups.forEach(g => { sets[g.key] = new Set(); if (g.def) sets[g.key].add(g.def); });
let page = 0, q = "";
let bh = "";
cfg.groups.forEach(g => {
let vals = [...new Set(cfg.rows.map(r => r[g.key]).filter(Boolean))];
let vals = g.fixed ? g.order.slice() : [...new Set(cfg.rows.map(r => r[g.key]).filter(Boolean))];
vals = g.order ? vals.sort((a,b)=>((g.order.indexOf(a)+1)||99)-((g.order.indexOf(b)+1)||99)) : vals.sort();
const nm = v => (g.names && g.names[v]) || v;
bh += `<span class="tglabel">${g.label}</span>` +
vals.map(v => `<button class="chip" data-g="${g.key}" data-v="${esc(v)}">${esc(nm(v))}</button>`).join("");
vals.map(v => `<button class="chip${sets[g.key].has(v) ? " on" : ""}" data-g="${g.key}" data-v="${esc(v)}">${esc(nm(v))}</button>`).join("");
});
bh += `<input class="q" placeholder="搜索…"><span class="cnt muted"></span>`;
bar.innerHTML = bh;
@@ -341,8 +341,10 @@ document.getElementById("skills").innerHTML = DATA.skills.map(s => `
<div class="v">${esc(s.level)||"—"}</div></div>`).join("")
|| `<div class="muted">无数据</div>`;
const ov = DATA.overview;
const d = DATA.days || {trained:0, elapsed:0};
const dayCard = `<div class="card"><div class="k">训练天数</div><div class="v">${d.trained}/${d.elapsed}</div><div class="c">自 2026-10-14 起</div></div>`;
const glyph = {word:"单词", phrase:"词组", expression:"表达", grammar:"语法"};
document.getElementById("overview").innerHTML = Object.keys(glyph).map(k => {
document.getElementById("overview").innerHTML = dayCard + Object.keys(glyph).map(k => {
const o = ov[k];
const T = o.total;
const parts = k === "grammar"
@@ -360,10 +362,10 @@ panel({
groups: [
{ key: "kind", label: "类型", order: ["word","phrase"], names: { word: "单词", phrase: "词组" } },
{ key: "level", label: "等级", order: ["小学","中考","高考","CET4","CET6","考研","TOEFL","GRE"] },
{ key: "status", label: "状态", order: ["new","learning","known"], names: { new: "未学", learning: "学习中", known: "已掌握" } },
{ key: "status", label: "状态", order: ["new","learning","known"], def: "learning", fixed: true, names: { new: "未学", learning: "学习中", known: "已掌握" } },
],
fields: ["item", "meaning", "context"],
head: `<thead><tr><th>id</th><th>条目</th><th>等级</th><th>释义</th><th>上下文</th><th>状态</th></tr></thead><tbody>`,
head: `<thead><tr><th>id</th><th>条目</th><th>等级</th><th>释义</th><th>例句</th><th>状态</th></tr></thead><tbody>`,
row: i => `<tr><td class="mono idc">${esc(i.id)}</td><td><b>${esc(i.item)}</b></td><td>${esc(i.level)}</td><td>${esc(i.meaning)}</td><td class="muted">${esc(i.context)}</td><td>${badge(i.status)}</td></tr>`,
});
"""
@@ -373,7 +375,7 @@ panel({
bar: "exprbar", tbl: "exprtbl", pg: "exprpg",
rows: DATA.items.filter(i => i.kind === "expression"),
groups: [{ key: "level", label: "等级", order: ["小学","中考","高考","CET4","CET6","考研","TOEFL","GRE"] },
{ key: "status", label: "状态", order: ["new","learning","known"], names: { new: "未学", learning: "学习中", known: "已掌握" } }],
{ key: "status", label: "状态", order: ["new","learning","known"], def: "learning", fixed: true, names: { new: "未学", learning: "学习中", known: "已掌握" } }],
fields: ["item", "meaning", "context"],
head: `<thead><tr><th>id</th><th>条目</th><th>等级</th><th>翻译 / 用法</th><th>例句</th><th>状态</th></tr></thead><tbody>`,
row: i => `<tr><td class="mono idc">${esc(i.id)}</td><td><b>${esc(i.item)}</b></td><td>${esc(i.level)}</td><td>${esc(i.meaning)}</td><td class="muted">${esc(i.context)}</td><td>${badge(i.status)}</td></tr>`,
@@ -384,7 +386,7 @@ SCRIPT_GRAMMAR = r"""
panel({
bar: "grambar", tbl: "gramtbl", pg: "grampg",
rows: DATA.grammar,
groups: [{ key: "status", label: "状态", order: ["new","learning","known"], names: { new: "未学", learning: "学习中", known: "已掌握" } }],
groups: [{ key: "status", label: "状态", order: ["new","learning","known"], def: "learning", fixed: true, names: { new: "未学", learning: "学习中", known: "已掌握" } }],
fields: ["issue", "rule", "examples"],
head: `<thead><tr><th>id</th><th>类别</th><th>问题</th><th>正确规则</th><th>例子</th><th>状态</th><th>次数</th></tr></thead><tbody>`,
row: g => `<tr><td class="mono idc">${esc(g.id)}</td><td>${esc(g.category)}</td><td>${esc(g.issue)}</td><td class="muted">${esc(g.rule)}</td><td class="fx mono">${esc(g.examples)}</td><td>${badge(g.status)}</td><td>${g.count}</td></tr>`,
@@ -417,6 +419,10 @@ def main() -> int:
"log": data["training_log"],
"history": data["level_history"],
}
_start = _dt.date(2026, 10, 14)
_elapsed = (_dt.date.today() - _start).days + 1
_trained = len({r.get("date", "") for r in data["training_log"] if "✓" in (r.get("status") or "")})
payload["days"] = {"trained": _trained, "elapsed": max(_elapsed, 1)}
conn.close()
OUT.mkdir(parents=True, exist_ok=True)
@@ -427,6 +433,7 @@ def main() -> int:
"window.DATA = " + json.dumps(payload, ensure_ascii=False) + ";\n", encoding="utf-8")
gen = payload["generated"]
pages = {
"index.html": ("概览", "index", BODY_INDEX, SCRIPT_INDEX + SCRIPT_LOG),
"items.html": ("词汇", "items", BODY_ITEMS, SCRIPT_ITEMS),
+4 -2
View File
@@ -43,8 +43,10 @@ def load_sentences() -> list[str]:
d = re.sub(r"\[[^\]]*\]", " ", d)
d = re.sub(r"\([^)]*\)", " ", d)
d = re.sub(r"\s+", " ", d).strip()
if 4 <= len(d) <= 240:
out.append(d)
cands = [d] if (d[:1].isupper() and d[-1:] in ".!?") else [s.strip() for s in re.findall(r"[^.!?]*[.!?]", d)]
for s in cands:
if s[:1].isupper() and s[-1:] in ".!?" and 5 <= len(s.split()) <= 28:
out.append(s)
return out
+2 -2
View File
@@ -156,8 +156,8 @@ def export(conn: sqlite3.Connection) -> dict:
"skills": rows("SELECT id,name,level,confidence,note FROM skills"),
"training_log": rows(
"SELECT id,date,type,material_level,listening,speaking,reading,writing,note,status"
" FROM training_log ORDER BY date,id"),
"level_history": rows("SELECT date,text FROM level_history ORDER BY date,id"),
" FROM training_log ORDER BY date DESC,id DESC"),
"level_history": rows("SELECT date,text FROM level_history ORDER BY date DESC,id DESC"),
"items": rows(
"SELECT id,kind,item,level,meaning,context,status,first,fix,function,tags,"
"source,added,hits,streak,next_review FROM items ORDER BY id"),
+87
View File
@@ -0,0 +1,87 @@
# 2026-10-15 学习计划
## Session 1 · 复述训练
原文:
(待选材料:你在「每日英语听力」APP 挑好、听 2–3 遍后,把原文截图 / PDF 发我,我贴到这里)
听后复述:
(待登记)
读后复述:
(待登记)
训练评价:
(待登记)
## Session 2 · 场景训练
豆包提示词:
```
You are my English speaking partner in a role-play. Speak English with me through voice.
【Setting】a small team meeting at the office. I'm about to present a new plan to my colleagues.
【Your role】a friendly colleague sitting in the meeting
【My role】the person presenting the new plan
【My goal】explain the new plan, why it matters, and get the team to discuss it
【My level】CEFR A2+ (listening A2+, speaking A2). Use short sentences and easy words, slightly above my level. Speak slowly and clearly.
【Tasks I must complete (checkpoints)】
1. Open the meeting and say why we are here.
2. Present the new plan (about outreach, marketing, getting our message out there).
3. Say why it is important (a milestone; a reality check; staying relevant).
4. Ask the team to share ideas and put our heads together.
5. Talk about how we will put it into action (implementation).
6. Thank everyone and close the meeting.
【Phrases I should try to use or understand】
"call the meeting to order", "outreach", "get our message out there", "milestone",
"reality check", "staying relevant", "put our heads together", "implementation".
【Rules】
- Stay in character as a colleague. Keep your turns to 1–2 short sentences, then wait for me.
- Guide me through the checkpoints naturally; don't announce them as a list.
- I may ask you questions or ask for clarification — answer normally, in character.
- Correct me gently by repeating my sentence correctly (recast). Do NOT lecture during the talk.
- If I'm stuck, give a short hint in easy English.
- You may add small realistic complications (someone is skeptical, time is short) if it stays natural.
【When I say "wrap up" or all checkpoints are done】
In Chinese, give me a 【训练评价】(detailed):
- 总评:checkpoints completed (✓/✗ one by one);speaking score 1–5 + estimated CEFR;listening performance
- 一、需要改进的地方:具体到词/句,引用我说的原句
- 二、具体提升点:每条说清“怎么提”
- 三、事后练习点:可执行动作
- Which target phrases I used / missed
- New items as JSON (mark my mastery state: I said it correctly on my own → status "known", first "v1"; I only said it after your hint → "learning", first "v2"; I got it wrong → "learning", putting "✗ wrong → ✓ right" in the fix field):
{"id":"e-0000","item":"...","level":"B1","meaning":"...","function":"...","context":"...","status":"known|learning","first":"v1|v2","fix":"","tags":"...","source":"2026-10-15-team-meeting","added":"YYYY-MM-DD","hits":0,"streak":0,"next_review":"YYYY-MM-DD"}
- Grammar mistakes (status: I made this mistake → "learning"; just newly encountered → "new"; fixed → "known"):
{"id":"g-0000","category":"...","issue":"...","rule":"...","examples":"✗ wrong → ✓ right","status":"new|learning|known","count":1,"first":"YYYY-MM-DD","last":"YYYY-MM-DD","next_review":"YYYY-MM-DD"}
Start by greeting me in character in the meeting.
```
豆包报告:
(待登记)
训练评价:
(待登记)
## 复习(到期 7 条)
用 `actions/03-review-srs.md` 复习到期的 7 条:
- `outreach` · `implementation` · `call to order` · `get out there` · `put our heads together` · `reality check` · `staying relevant`
- 语法:211 条全为 `未学`(没犯过)——复习时可先只练「自己犯过的」,犯了的标 `learning`。
## 今日重点
- Session 2 把商务会议那批词(outreach / get out there / put our heads together / reality check)**主动用出来**。
- 难点延续:`outreach` 发音 `/ˈaʊtriːtʃ/`、`CDW` 逐字母读。
BIN
View File
Binary file not shown.