Skip to content

Commit 13026d9

Browse files
author
Scripting Agent
committed
docs: 更新 README.md,添加英文和中文版本
1 parent c116367 commit 13026d9

1 file changed

Lines changed: 140 additions & 1 deletion

File tree

README.md

Lines changed: 140 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,44 @@
22

33
## 项目简介
44

5-
通过 `Scripting Documentation` (Scripting App 默认脚本) 生成网页文档
5+
通过 `Scripting Documentation` (Scripting App 默认脚本) 生成网页文档,使用 [Rspress](https://rspress.dev/) 构建静态网站。
6+
7+
## 目录结构
8+
9+
```
10+
.
11+
├── .github/workflows # GitHub Actions 部署配置
12+
├── docs/ # 生成的文档目录
13+
│ ├── App Store/ # App Store 版本文档
14+
│ │ ├── en/ # 英文文档
15+
│ │ └── zh/ # 中文文档
16+
│ └── TestFlight/ # TestFlight 版本文档
17+
├── scripting/ # Scripting App 脚本资源
18+
│ ├── App Store/ # App Store 版本脚本
19+
│ └── TestFlight/ # TestFlight 版本脚本
20+
├── scripts/ # 文档生成脚本
21+
│ ├── docs.js # App Store 文档生成脚本
22+
│ └── docs-tf.js # TestFlight 文档生成脚本
23+
├── package.json # 项目依赖和脚本
24+
├── rspress.config.ts # Rspress 配置文件
25+
└── README.md # 项目说明文档
26+
```
627

728
## 快速开始
829

30+
### 前置要求
31+
32+
- [Bun](https://bun.sh/) (推荐) 或 Node.js
33+
- Scripting App 默认脚本 "Scripting Documentation"
34+
35+
### 安装依赖
36+
37+
```bash
38+
bun install
39+
```
40+
41+
### 生成文档
42+
943
1.`Scripting Documentation` (Scripting App 默认脚本) 放入项目根目录并解压
1044

1145
2. 运行文档生成命令:
@@ -19,3 +53,108 @@ bun run generate:docs
1953
```bash
2054
bun run build
2155
```
56+
57+
### 本地预览
58+
59+
```bash
60+
bun run dev
61+
```
62+
63+
访问 http://localhost:5173 预览文档。
64+
65+
## 文档生成流程
66+
67+
1. **解压脚本**: 从 `scripting/App Store/Scripting Documentation.scripting` 解压脚本文件
68+
2. **读取配置**: 从解压后的 `doc.json` 文件读取文档结构配置
69+
3. **生成 Markdown**: 根据配置生成多语言 (en/zh) 的 Markdown 文档
70+
4. **构建网站**: 使用 Rspress 将 Markdown 文件构建为静态网站
71+
72+
## 版本文档
73+
74+
项目支持两个版本的文档:
75+
76+
- **App Store**: 正式版文档 (默认)
77+
- **TestFlight**: 测试版文档 (包含最新功能)
78+
79+
### 生成 TestFlight 文档
80+
81+
```bash
82+
bun run generate:docs:tf
83+
```
84+
85+
### 构建 TestFlight 文档
86+
87+
```bash
88+
bun run build:fun
89+
```
90+
91+
## 部署
92+
93+
文档通过 GitHub Actions 自动部署到 GitHub Pages。部署配置位于 `.github/workflows/` 目录。
94+
95+
### 手动部署
96+
97+
```bash
98+
bun run deploy
99+
```
100+
101+
## 技能系统 (Skills)
102+
103+
Scripting App 支持技能系统,允许扩展应用功能。技能是独立的脚本包,可以:
104+
105+
- 提供原生 API 封装
106+
- 创建自定义 UI 组件
107+
- 集成第三方服务
108+
- 扩展自动化能力
109+
110+
### 技能目录结构
111+
112+
```
113+
/var/mobile/Library/Mobile Documents/iCloud~com~thomfang~Scripting/Documents/scripting-skills/
114+
├── ios-calendar/ # 日历管理技能
115+
├── ios-health/ # 健康数据技能
116+
├── ios-location/ # 定位服务技能
117+
├── ios-notifications/ # 通知管理技能
118+
├── ios-reminders/ # 提醒事项技能
119+
├── isomorphic-git/ # Git 版本控制技能
120+
└── ... # 其他技能
121+
```
122+
123+
### 使用技能
124+
125+
在 Scripting App 中,技能可以通过以下方式使用:
126+
127+
1. **直接调用**: 在脚本中导入并使用技能提供的 API
128+
2. **AI 集成**: AI 助手可以自动调用技能完成复杂任务
129+
3. **自动化流程**: 在快捷指令中集成技能功能
130+
131+
## 贡献指南
132+
133+
### 添加新文档
134+
135+
1.`scripting/App Store/Scripting Documentation/` 目录下添加新的文档文件
136+
2. 更新 `doc.json` 配置文件,添加新文档的入口
137+
3. 运行 `bun run generate:docs` 重新生成文档
138+
4. 提交 Pull Request
139+
140+
### 修改现有文档
141+
142+
1. 编辑 `docs/` 目录下的 Markdown 文件
143+
2. 运行 `bun run build` 验证修改
144+
3. 提交 Pull Request
145+
146+
### 添加新技能
147+
148+
1. 在 Scripting App 中创建新的技能项目
149+
2. 编写 `SKILL.md` 文件,定义技能的使用方法
150+
3. 提交到 [ScriptingApp/Community-Scripts](https://github.com/ScriptingApp/Community-Scripts) 仓库
151+
152+
## 相关项目
153+
154+
- [ScriptingApp/Community-Scripts](https://github.com/ScriptingApp/Community-Scripts) - 社区脚本分享
155+
- [ScriptingApp/scripting-app-lib](https://github.com/ScriptingApp/scripting-app-lib) - Scripting App 库模块
156+
- [ScriptingApp/Package-Manager](https://github.com/ScriptingApp/Package-Manager) - 包管理器
157+
158+
## 许可证
159+
160+
MIT License

0 commit comments

Comments
 (0)