Skip to content

Commit 2581e2c

Browse files
committed
docs: 重构 README 并统一文档语言为中文
README 精简(中文 528 → 364 行,-31%;英文 552 → 390 行,-29%): - 删除使用者不需要的深层细节,改为指向 references/ 与 SKILL.md: 横向对比全表、八条契约表、project.json 逐字段说明、仓库目录树、B() 代码详解 - 第一定位改为「Agent Skill」,而不是「一条渲染流水线」 - 新增「安装」章:一句话安装 prompt + 九个智能体的技能目录对照表 + 环境要求 - 新增「参考思路与姊妹项目」:anything2explainer 与 html-video,并明确标注 两者为不同作者的独立项目,本项目运行时不依赖其代码 文档语言统一为中文(README.en.md 除外): CHANGELOG.md、CONTRIBUTING.md、THIRD_PARTY_NOTICES.md、PR/issue 模板、CI 注释。 许可证原文(MIT / Apache-2.0)与 GSAP 自带 README 属第三方逐字文本,未翻译。 跨平台可移植性修复(原先隐含 WorkBuddy 专属路径): - peek_frame.mjs 的技能根兜底改为遍历各智能体技能目录 (.workbuddy / .claude / .codex / .gemini / .cursor / .agents),已用隔离夹具正反验证 - setup_env.sh 标注哪几个候选是 WorkBuddy 托管路径 - SKILL.md 新增「跨 Agent 安装」章,安装路径不再写死单一平台 修正一处事实错误:THIRD_PARTY_NOTICES 原称两个方法来源项目「均为作者本人作品」, 与事实不符,已改为「他人独立项目」并补充来源链接。
1 parent 6474719 commit 2581e2c

13 files changed

Lines changed: 908 additions & 1232 deletions
Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,82 @@
1-
name: Bug report
2-
description: Something rendered wrong, failed silently, or crashed.
1+
name: Bug 报告
2+
description: 画面渲错了、静默失败,或者直接崩了。
33
title: "[Bug] "
44
labels: ["bug"]
55
body:
66
- type: markdown
77
attributes:
88
value: |
9-
Thanks for the report. This pipeline fails **silently** by design — a broken
10-
frame usually still produces a plausible-looking video. The more of the detail
11-
below you can fill in, the faster this gets diagnosed.
9+
感谢反馈。这条流水线是**静默**失败的 —— 一个坏掉的帧通常还是能产出一条看着挺像样的
10+
视频。下面这些信息你填得越全,定位得越快。
1211
1312
- type: dropdown
1413
id: stage
1514
attributes:
16-
label: Which stage failed?
15+
label: 哪个阶段出错了?
1716
options:
18-
- "0 · new_project (scaffold)"
19-
- "1 · tts_build (voiceover)"
20-
- "2 · timeline_build (global timeline)"
21-
- "3 · subs (subtitles / beats)"
22-
- "4 · lint_frames (static audit)"
23-
- "5 · render_video (rendering)"
24-
- "6 · qc_check (audit)"
25-
- "7 · cover_build (covers)"
26-
- "setup_env / environment"
27-
- "Not sure"
17+
- "0 · new_project(建项目)"
18+
- "1 · tts_build(配音)"
19+
- "2 · timeline_build(全局时间轴)"
20+
- "3 · subs(字幕 / 节拍)"
21+
- "4 · lint_frames(静态体检)"
22+
- "5 · render_video(渲染)"
23+
- "6 · qc_check(体检)"
24+
- "7 · cover_build(封面)"
25+
- "setup_env / 环境问题"
26+
- "不确定"
2827
validations:
2928
required: true
3029

3130
- type: textarea
3231
id: what-happened
3332
attributes:
34-
label: What happened?
35-
description: Include the exact command you ran and the full output.
33+
label: 发生了什么?
34+
description: 请附上你执行的完整命令与完整输出。
3635
placeholder: |
37-
Command: node scripts/render_video.mjs . --preview 30
38-
Expected: 30s preview with animated cards
39-
Actual: preview renders, but the number counter never moves
36+
命令:node scripts/render_video.mjs . --preview 30
37+
期望:30 秒预览,卡片有动画
38+
实际:预览渲出来了,但数字计数器一直不动
4039
validations:
4140
required: true
4241

4342
- type: textarea
4443
id: symptom-class
4544
attributes:
46-
label: Did it fail loudly or silently?
45+
label: 它是报错了,还是静默出错?
4746
description: >
48-
Silent failures are the interesting ones here. If playback works but the output
49-
is wrong (frozen element, desynced subtitle, missing text), say so explicitly.
47+
静默失败才是这里最有价值的一类。如果视频能播但输出是错的
48+
(元素卡住、字幕不同步、文字缺失),请明确写出来。
5049
validations:
5150
required: false
5251

5352
- type: textarea
5453
id: environment
5554
attributes:
56-
label: Environment
57-
description: "Run these and paste the result."
55+
label: 环境
56+
description: "跑一下这些,把结果贴上来。"
5857
value: |
59-
- OS:
60-
- `node -v`:
61-
- `python -V`:
62-
- Shell (Git Bash / PowerShell / zsh):
63-
- Browser used for rendering (Chrome / Edge / playwright chromium):
64-
- ffmpeg source (PATH / imageio-ffmpeg):
58+
- 操作系统:
59+
- `node -v`:
60+
- `python -V`:
61+
- Shell(Git Bash / PowerShell / zsh):
62+
- 渲染用浏览器(Chrome / Edge / playwright chromium):
63+
- ffmpeg 来源(PATH / imageio-ffmpeg):
6564
validations:
6665
required: true
6766

6867
- type: input
6968
id: version
7069
attributes:
71-
label: Version
72-
description: The `version:` field in SKILL.md, or the release tag.
70+
label: 版本
71+
description: SKILL.md 里的 `version:` 字段,或发布 tag。
7372
placeholder: "1.2.2"
7473
validations:
7574
required: true
7675

7776
- type: textarea
7877
id: qc-output
7978
attributes:
80-
label: QC output (if you got as far as rendering)
81-
description: Paste `out/qc_report.md`, or attach the contact sheet.
79+
label: QC 输出(如果你已经跑到渲染那一步)
80+
description: 贴 `out/qc_report.md`,或附上抽帧速览图。
8281
validations:
8382
required: false

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Read the frame contract first
3+
- name: 先读画面契约
44
url: https://github.com/OneMoh/html-explainer/blob/main/references/frame-contract.md
5-
about: Most "my frame renders but looks wrong" reports are explained by the eight contract rules.
6-
- name: Check the lessons ledger
5+
about: 绝大多数「我的画面能渲但看着不对」都能被八条契约规则解释。
6+
- name: 先查踩坑台账
77
url: https://github.com/OneMoh/html-explainer/blob/main/references/lessons.md
8-
about: Known silent-failure modes and their diagnoses. Worth a search before filing.
9-
- name: Setup and environment issues
10-
url: https://github.com/OneMoh/html-explainer/blob/main/README.md#疑难排查
11-
about: Run `bash setup_env.sh` and compare against the troubleshooting table (English version: README.en.md#troubleshooting).
8+
about: 已知的静默失败模式及其定位方法。提 issue 之前值得先搜一遍。
9+
- name: 安装与环境问题
10+
url: https://github.com/OneMoh/html-explainer/blob/main/README.md
11+
about: 先跑 `bash setup_env.sh`,再对照 README 的「疑难排查」一节。
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,49 @@
1-
name: Feature request
2-
description: Propose a new capability, style, or workflow improvement.
1+
name: 功能建议
2+
description: 提议一个新能力、新风格,或流程改进。
33
title: "[Feature] "
44
labels: ["enhancement"]
55
body:
66
- type: markdown
77
attributes:
88
value: |
9-
This project deliberately keeps a small surface: HTML frames in, MP4 out, with
10-
audio-video sync that actually holds. Proposals that add a build system, a plugin
11-
API, or a cloud dependency are usually out of scope — but say so if you think
12-
there's an important exception.
9+
本项目刻意保持很小的接口面:HTML 帧进,MP4 出,音画同步稳得住。会增加构建系统、
10+
插件 API 或云依赖的提议,一般都在范围之外 —— 但如果你认为有重要的例外,请说明。
1311
1412
- type: textarea
1513
id: problem
1614
attributes:
17-
label: What problem does this solve?
18-
description: Describe the situation you're in, not the API you want.
15+
label: 它解决什么问题?
16+
description: 描述你处的场景,而不是你想要的 API。
1917
validations:
2018
required: true
2119

2220
- type: textarea
2321
id: proposal
2422
attributes:
25-
label: Proposed approach
23+
label: 你建议的做法
2624
validations:
2725
required: true
2826

2927
- type: dropdown
3028
id: area
3129
attributes:
32-
label: Area
30+
label: 涉及范围
3331
options:
34-
- Visual styles / templates
35-
- Narration / TTS
36-
- Subtitles / beat sync
37-
- Rendering
38-
- QC / auditing
39-
- Covers
40-
- Docs
41-
- Other
32+
- 画面风格 / 模板
33+
- 解说 / TTS
34+
- 字幕 / 节拍同步
35+
- 渲染
36+
- QC / 体检
37+
- 封面
38+
- 文档
39+
- 其它
4240
validations:
4341
required: true
4442

4543
- type: textarea
4644
id: alternatives
4745
attributes:
48-
label: Alternatives considered
49-
description: Including "just do it manually" — it's a valid answer.
46+
label: 考虑过的替代方案
47+
description: 包括「干脆手工做」—— 这也是个有效答案。
5048
validations:
5149
required: false

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
## What this changes
1+
## 这次改了什么
22

3-
<!-- One or two sentences. What was wrong, and what does this do about it? -->
3+
<!-- 一两句话。原来错在哪,这个改动做了什么? -->
44

5-
## Why
5+
## 为什么要改
66

77
<!--
8-
If this fixes a silent failure, explain what was misbehaving and how you proved the
9-
cause. "I tried X, it still broke; I changed Y, it worked" is genuinely useful here —
10-
this pipeline produces plausible-looking output while being wrong.
8+
如果这修的是一个静默失败,请说明它原来表现成什么样、你又是怎么证明病因的。
9+
「我试了 X,还是坏的;改了 Y,就好了」在这里是真正有用的信息 ——
10+
这条流水线的输出经常看着挺像样,其实是错的。
1111
-->
1212

13-
## How it was verified
13+
## 怎么验证的
1414

1515
<!--
16-
Not "it should work". What did you actually run?
17-
e.g. `node scripts/peek_frame.mjs . hook --at 25,50,85` and inspected the 50% frame
16+
不要写「应该能跑」。你实际跑了什么?
17+
例如 `node scripts/peek_frame.mjs . hook --at 25,50,85`,并检查了 50% 那一帧
1818
-->
1919

20-
## Checklist
20+
## 检查清单
2121

22-
- [ ] `python scripts/lint_frames.py --project <project>` reports no FAILs for frames I touched
23-
- [ ] I actually rendered the change and looked at the output
24-
- [ ] No external fonts, CDN links, or hardcoded colour literals introduced
25-
- [ ] New lesson (if any) appended to `references/lessons.md` with the next number
26-
- [ ] `python scripts/check_integrity.py` passes
27-
- [ ] `README.md` and `README.en.md` updated together if user-facing behaviour changed
28-
- [ ] `THIRD_PARTY_NOTICES.md` updated if third-party content was added or re-derived
22+
- [ ] `python scripts/lint_frames.py --project <project>` 对我动过的帧没有 FAIL
23+
- [ ] 我真的渲染过这次改动,并看过输出
24+
- [ ] 没有引入外部字体、CDN 链接或硬编码颜色字面量
25+
- [ ] 新增的踩坑记录(如果有)已按下一个编号追加到 `references/lessons.md`
26+
- [ ] `python scripts/check_integrity.py` 通过
27+
- [ ] 涉及使用者可见行为的改动,`README.md` 与 `README.en.md` 已同步更新
28+
- [ ] 如果新增或再衍生了第三方内容,`THIRD_PARTY_NOTICES.md` 已更新
2929

30-
## Related issues
30+
## 相关 issue
3131

3232
<!-- Closes #... -->

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [main]
88
workflow_dispatch:
99

10-
# Only the latest run per branch matters; cancel superseded ones.
10+
# 每个分支只关心最新一次运行;被取代的自动取消。
1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: true
@@ -19,8 +19,8 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
# Windows + Git Bash is the primary development platform, so it is
23-
# tested alongside Linux rather than treated as an afterthought.
22+
# Windows + Git Bash 是主要开发平台,所以和 Linux 一起测,
23+
# 而不是被当成事后补的。
2424
os: [ubuntu-latest, windows-latest]
2525
python: ["3.9", "3.13"]
2626

@@ -35,27 +35,27 @@ jobs:
3535
with:
3636
node-version: "22"
3737

38-
# --- Repo self-consistency: version drift, catalog drift, stray CDN links ---
38+
# --- 仓库自洽性:版本号漂移、风格目录漂移、残留外链 ---
3939
- name: Repository integrity check
4040
run: python scripts/check_integrity.py
4141

42-
# --- Python scripts must at least compile on the oldest supported version ---
42+
# --- Python 脚本至少在支持的最低版本上要能编译 ---
4343
- name: Compile Python scripts
4444
run: python -m compileall -q scripts
4545

46-
# --- Frame audit tool must be importable and its CLI must respond ---
46+
# --- 画面体检工具要能被导入,且命令行要能响应 ---
4747
- name: Lint tool smoke test
4848
run: python scripts/lint_frames.py --help
4949

5050
- name: Integrity checker smoke test
5151
run: python scripts/check_integrity.py --root .
5252

53-
# --- Shell entrypoint syntax ---
53+
# --- Shell 入口语法 ---
5454
- name: Check setup_env.sh syntax
5555
shell: bash
5656
run: bash -n setup_env.sh
5757

58-
# --- Renderer / cover builder / peek tool syntax ---
58+
# --- 渲染器 / 封面器 / 单帧速览工具的语法 ---
5959
- name: Check Node module syntax
6060
shell: bash
6161
run: |
@@ -69,11 +69,9 @@ jobs:
6969
shell: bash
7070
run: |
7171
set -e
72-
# Frames must never reach out to a CDN or web font: offline rendering
73-
# degrades silently rather than failing.
74-
# Scope to HTML only — markdown docs legitimately *mention* these URLs
75-
# (e.g. the guide explaining that you must delete them), and GSAP's own
76-
# bundled README documents its CDN option.
72+
# 画面帧绝不允许引 CDN 或网络字体:离线渲染不会报错,只会静默劣化。
73+
# 只扫 HTML —— markdown 文档里*提到*这些 URL 是合理的
74+
# (比如正是指南在教你要把它们删掉),而 GSAP 自带的 README 也会介绍它的 CDN 用法。
7775
hits=$(grep -rInE --include='*.html' \
7876
'https?://[^"'"'"' ]*(fonts\.googleapis|fonts\.gstatic|cdn\.)' . \
7977
|| true)

0 commit comments

Comments
 (0)