Phase 0-2: Schema cleanup, typed relations, event-driven automation

- Phase 0: AGENTS.md cleanup (dedup quotes, renumber sections, merge qmd)
- Phase 1: typed relations (manage-relations.py, graph-search.py, check-staleness.py, detect-conflicts.py)
- Phase 2: frontmatter validator, weekly lint, knowledge promotion, git hooks
- Fix .gitignore to track tools/ and .githooks/
- Fix git remote URL (remove plaintext token)
- New wiki pages: 504 pages, 34 raw sources
This commit is contained in:
hehaiguang1123
2026-07-01 08:05:43 +08:00
parent e544d6e04a
commit a6f05ab2d5
1067 changed files with 522992 additions and 819 deletions
@@ -0,0 +1,60 @@
# MarkItDown + Wiki 集成
## 快速开始
```bash
# 转换文件并加入Wiki
~/.openclaw/workspace/04-Tools/wiki-ingest.sh document.pdf
# 指定Wiki页面名
~/.openclaw/workspace/04-Tools/wiki-ingest.sh document.pdf 我的文档
# 直接使用markitdown
~/.venv/markitdown/bin/markitdown file.pdf -o output.md
```
## 支持格式
| 格式 | 说明 |
|------|------|
| PDF | 文档、扫描件 |
| DOCX/XLSX/PPTX | Office文档 |
| 图片 | EXIF + OCR |
| 音频 | EXIF + 转录 |
| HTML | 网页 |
| EPUB | 电子书 |
| CSV/JSON/XML | 数据文件 |
## 依赖
- MarkItDown: `~/.venv/markitdown/bin/markitdown`
- 虚拟环境: `~/.venv/markitdown`
## 安装
```bash
python3 -m venv ~/.venv/markitdown
~/.venv/markitdown/bin/pip install 'markitdown[all]'
```
## Wiki结构
```
~/.openclaw/wiki/
├── concepts/ # 概念文档
├── methods/ # 方法论
├── examples/ # 案例
└── index/ # 索引
```
## 工作流
1. 用户发送文件(PDF/Word/Excel等)
2. Agent使用MarkItDown转换
3. 提取关键内容整理成Wiki格式
4. 添加frontmatter元数据
5. 保存到对应分类目录
---
*最后更新:2026-04-14*