Add graph markdown and canvas outputs

This commit is contained in:
2026-05-06 20:00:50 +08:00
parent 1478972e53
commit f7f5e2c67c
22 changed files with 313 additions and 15 deletions

View File

@@ -84,6 +84,7 @@ manifest 可用于声明:
索引内容:
- `id`
- `title`
- 文件路径
- `type`
- `resolution`
@@ -138,6 +139,8 @@ manifest 可用于声明:
- JSON 图数据
- Mermaid 图
- Markdown Mermaid 图
- Obsidian Canvas 图
图类型:
@@ -187,6 +190,8 @@ go build -o ../bin/gsp ./cmd/gsp
../bin/gsp validate --root ../examples/lottery
../bin/gsp flatten page.lottery.main --root ../examples/lottery --depth -1 --out ../.gsp/flattened.json
../bin/gsp graph page.lottery.main --root ../examples/lottery --format mermaid --out ../.gsp/graph.mmd
../bin/gsp graph page.lottery.main --root ../examples/lottery --format md --out ../.gsp/graph.md
../bin/gsp graph page.lottery.main --root ../examples/lottery --format canvas --out ../.gsp/graph.canvas
```
## 5. 输出
@@ -206,6 +211,8 @@ go build -o ../bin/gsp ./cmd/gsp
.gsp/report.json
.gsp/graph.json
.gsp/graph.mmd
.gsp/graph.md
.gsp/graph.canvas
.gsp/context-pack.json
.gsp/flattened.json
```