bug修复
This commit is contained in:
@@ -117,8 +117,10 @@ last_updated: YYYY-MM-DD
|
|||||||
## 执行步骤(严格顺序)
|
## 执行步骤(严格顺序)
|
||||||
1. 使用 Read 工具完整读取 source 文档
|
1. 使用 Read 工具完整读取 source 文档
|
||||||
2. 读取 `wiki/index.md` 和 `wiki/overview.md`
|
2. 读取 `wiki/index.md` 和 `wiki/overview.md`
|
||||||
3. 生成 `wiki/sources/<slug>.md`(**必须使用 ASCII 字符,用 `-` 替换空格和特殊字符**)
|
3. 生成 `wiki/sources/<slug>.md`
|
||||||
- 例如:`Ubuntu 安装 FRP 0.65.0(x86_64)操作笔记.md` → `ubuntu-frp-0.65.0-x86-64-operation-guide.md`
|
- 如果原始文件名是中文,就保留中文名字作为source页面的文件名
|
||||||
|
- **必须使用 ASCII 字符,用 `-` 替换空格和特殊字符**
|
||||||
|
- 例如:`Ubuntu 安装 FRP 0.65.0(x86_64)操作笔记.md` → `Ubuntu-安装-FRP-0.65.0-x86-64-操作笔记.md`
|
||||||
> ⚠️ **Source Page 必须包含 `## Source File` 段落**,格式为:
|
> ⚠️ **Source Page 必须包含 `## Source File` 段落**,格式为:
|
||||||
> ```markdown
|
> ```markdown
|
||||||
> ## Source File
|
> ## Source File
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -400,8 +400,15 @@ def run_sync(dry_run: bool = False, verbose: bool = False, json_mode: bool = Fal
|
|||||||
|
|
||||||
pending_files.append({"rel_path": rel_path, "abs_path": abs_path, "slug": slug, "action": "new"})
|
pending_files.append({"rel_path": rel_path, "abs_path": abs_path, "slug": slug, "action": "new"})
|
||||||
|
|
||||||
# 先不更新 manifest,等实际执行完成后再更新
|
# 新文件加入 manifest,标记为待摄入
|
||||||
# updated_manifest["files"][rel_path] = {...}
|
updated_manifest["files"][rel_path] = {
|
||||||
|
"hash": f["hash"],
|
||||||
|
"modified": f.get("modified"),
|
||||||
|
"slug": slug,
|
||||||
|
"source_path": f"wiki/sources/{slug}.md",
|
||||||
|
"ingested": False,
|
||||||
|
"ingested_at": None,
|
||||||
|
}
|
||||||
|
|
||||||
# ② 修改 → 标记待处理
|
# ② 修改 → 标记待处理
|
||||||
for f in changes["updated"]:
|
for f in changes["updated"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user