|
1 | | -# Scripting 官方文档项目 |
| 1 | +# Scripting Official Documentation Project |
2 | 2 |
|
3 | | -## 项目简介 |
| 3 | +## Project Overview |
4 | 4 |
|
5 | | -通过 `Scripting Documentation` (Scripting App 默认脚本) 生成网页文档,使用 [Rspress](https://rspress.dev/) 构建静态网站。 |
| 5 | +Generate web documentation through `Scripting Documentation` (Scripting App's default script), built with [Rspress](https://rspress.dev/) as a static site. |
6 | 6 |
|
7 | | -## 目录结构 |
| 7 | +## Directory Structure |
8 | 8 |
|
9 | 9 | ``` |
10 | 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 # 项目说明文档 |
| 11 | +├── .github/workflows # GitHub Actions deployment configuration |
| 12 | +├── docs/ # Generated documentation directory |
| 13 | +│ ├── App Store/ # App Store version documentation |
| 14 | +│ │ ├── en/ # English documentation |
| 15 | +│ │ └── zh/ # Chinese documentation |
| 16 | +│ └── TestFlight/ # TestFlight version documentation |
| 17 | +├── scripting/ # Scripting App script resources |
| 18 | +│ ├── App Store/ # App Store version scripts |
| 19 | +│ └── TestFlight/ # TestFlight version scripts |
| 20 | +├── scripts/ # Documentation generation scripts |
| 21 | +│ ├── docs.js # App Store documentation generation script |
| 22 | +│ └── docs-tf.js # TestFlight documentation generation script |
| 23 | +├── package.json # Project dependencies and scripts |
| 24 | +├── rspress.config.ts # Rspress configuration file |
| 25 | +└── README.md # Project documentation |
26 | 26 | ``` |
27 | 27 |
|
28 | | -## 快速开始 |
| 28 | +## Quick Start |
29 | 29 |
|
30 | | -### 前置要求 |
| 30 | +### Prerequisites |
31 | 31 |
|
32 | | -- [Bun](https://bun.sh/) (推荐) 或 Node.js |
33 | | -- Scripting App 默认脚本 "Scripting Documentation" |
| 32 | +- [Bun](https://bun.sh/) (recommended) or Node.js |
| 33 | +- Scripting App's default script "Scripting Documentation" |
34 | 34 |
|
35 | | -### 安装依赖 |
| 35 | +### Install Dependencies |
36 | 36 |
|
37 | 37 | ```bash |
38 | 38 | bun install |
39 | 39 | ``` |
40 | 40 |
|
41 | | -### 生成文档 |
| 41 | +### Generate Documentation |
42 | 42 |
|
43 | | -1. 将 `Scripting Documentation` (Scripting App 默认脚本) 放入项目根目录并解压 |
| 43 | +1. Place `Scripting Documentation` (Scripting App's default script) in the project root directory and extract it |
44 | 44 |
|
45 | | -2. 运行文档生成命令: |
| 45 | +2. Run the documentation generation command: |
46 | 46 |
|
47 | 47 | ```bash |
48 | 48 | bun run generate:docs |
49 | 49 | ``` |
50 | 50 |
|
51 | | -3. 运行构建命令: |
| 51 | +3. Run the build command: |
52 | 52 |
|
53 | 53 | ```bash |
54 | 54 | bun run build |
55 | 55 | ``` |
56 | 56 |
|
57 | | -### 本地预览 |
| 57 | +### Local Preview |
58 | 58 |
|
59 | 59 | ```bash |
60 | 60 | bun run dev |
61 | 61 | ``` |
62 | 62 |
|
63 | | -访问 http://localhost:5173 预览文档。 |
| 63 | +Visit http://localhost:5173 to preview the documentation. |
64 | 64 |
|
65 | | -## 文档生成流程 |
| 65 | +## Documentation Generation Process |
66 | 66 |
|
67 | | -1. **解压脚本**: 从 `scripting/App Store/Scripting Documentation.scripting` 解压脚本文件 |
68 | | -2. **读取配置**: 从解压后的 `doc.json` 文件读取文档结构配置 |
69 | | -3. **生成 Markdown**: 根据配置生成多语言 (en/zh) 的 Markdown 文档 |
70 | | -4. **构建网站**: 使用 Rspress 将 Markdown 文件构建为静态网站 |
| 67 | +1. **Extract Script**: Extract script files from `scripting/App Store/Scripting Documentation.scripting` |
| 68 | +2. **Read Configuration**: Read document structure configuration from the extracted `doc.json` file |
| 69 | +3. **Generate Markdown**: Generate multilingual (en/zh) Markdown documents based on configuration |
| 70 | +4. **Build Website**: Build Markdown files into a static website using Rspress |
71 | 71 |
|
72 | | -## 版本文档 |
| 72 | +## Version Documentation |
73 | 73 |
|
74 | | -项目支持两个版本的文档: |
| 74 | +The project supports two versions of documentation: |
75 | 75 |
|
76 | | -- **App Store**: 正式版文档 (默认) |
77 | | -- **TestFlight**: 测试版文档 (包含最新功能) |
| 76 | +- **App Store**: Official version documentation (default) |
| 77 | +- **TestFlight**: Test version documentation (includes latest features) |
78 | 78 |
|
79 | | -### 生成 TestFlight 文档 |
| 79 | +### Generate TestFlight Documentation |
80 | 80 |
|
81 | 81 | ```bash |
82 | 82 | bun run generate:docs:tf |
83 | 83 | ``` |
84 | 84 |
|
85 | | -### 构建 TestFlight 文档 |
| 85 | +### Build TestFlight Documentation |
86 | 86 |
|
87 | 87 | ```bash |
88 | 88 | bun run build:fun |
89 | 89 | ``` |
90 | 90 |
|
91 | | -## 部署 |
| 91 | +## Deployment |
92 | 92 |
|
93 | | -文档通过 GitHub Actions 自动部署到 GitHub Pages。部署配置位于 `.github/workflows/` 目录。 |
| 93 | +Documentation is automatically deployed to GitHub Pages via GitHub Actions. Deployment configuration is located in the `.github/workflows/` directory. |
94 | 94 |
|
95 | | -### 手动部署 |
| 95 | +### Manual Deployment |
96 | 96 |
|
97 | 97 | ```bash |
98 | 98 | bun run deploy |
99 | 99 | ``` |
100 | 100 |
|
101 | | -## 技能系统 (Skills) |
| 101 | +## Skills System |
102 | 102 |
|
103 | | -Scripting App 支持技能系统,允许扩展应用功能。技能是独立的脚本包,可以: |
| 103 | +Scripting App supports a skills system that allows extending application functionality. Skills are independent script packages that can: |
104 | 104 |
|
105 | | -- 提供原生 API 封装 |
106 | | -- 创建自定义 UI 组件 |
107 | | -- 集成第三方服务 |
108 | | -- 扩展自动化能力 |
| 105 | +- Provide native API wrappers |
| 106 | +- Create custom UI components |
| 107 | +- Integrate third-party services |
| 108 | +- Extend automation capabilities |
109 | 109 |
|
110 | | -### 技能目录结构 |
| 110 | +### Skills Directory Structure |
111 | 111 |
|
112 | 112 | ``` |
113 | 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 | | -└── ... # 其他技能 |
| 114 | +├── ios-calendar/ # Calendar management skill |
| 115 | +├── ios-health/ # Health data skill |
| 116 | +├── ios-location/ # Location services skill |
| 117 | +├── ios-notifications/ # Notification management skill |
| 118 | +├── ios-reminders/ # Reminders skill |
| 119 | +├── isomorphic-git/ # Git version control skill |
| 120 | +└── ... # Other skills |
121 | 121 | ``` |
122 | 122 |
|
123 | | -### 使用技能 |
| 123 | +### Using Skills |
124 | 124 |
|
125 | | -在 Scripting App 中,技能可以通过以下方式使用: |
| 125 | +In Scripting App, skills can be used in the following ways: |
126 | 126 |
|
127 | | -1. **直接调用**: 在脚本中导入并使用技能提供的 API |
128 | | -2. **AI 集成**: AI 助手可以自动调用技能完成复杂任务 |
129 | | -3. **自动化流程**: 在快捷指令中集成技能功能 |
| 127 | +1. **Direct Call**: Import and use APIs provided by skills in scripts |
| 128 | +2. **AI Integration**: AI assistants can automatically call skills to complete complex tasks |
| 129 | +3. **Automation Workflows**: Integrate skill functions in Shortcuts |
130 | 130 |
|
131 | | -## 贡献指南 |
| 131 | +## Contributing Guidelines |
132 | 132 |
|
133 | | -### 添加新文档 |
| 133 | +### Adding New Documentation |
134 | 134 |
|
135 | | -1. 在 `scripting/App Store/Scripting Documentation/` 目录下添加新的文档文件 |
136 | | -2. 更新 `doc.json` 配置文件,添加新文档的入口 |
137 | | -3. 运行 `bun run generate:docs` 重新生成文档 |
138 | | -4. 提交 Pull Request |
| 135 | +1. Add new documentation files in the `scripting/App Store/Scripting Documentation/` directory |
| 136 | +2. Update the `doc.json` configuration file to add new documentation entries |
| 137 | +3. Run `bun run generate:docs` to regenerate documentation |
| 138 | +4. Submit a Pull Request |
139 | 139 |
|
140 | | -### 修改现有文档 |
| 140 | +### Modifying Existing Documentation |
141 | 141 |
|
142 | | -1. 编辑 `docs/` 目录下的 Markdown 文件 |
143 | | -2. 运行 `bun run build` 验证修改 |
144 | | -3. 提交 Pull Request |
| 142 | +1. Edit Markdown files in the `docs/` directory |
| 143 | +2. Run `bun run build` to verify changes |
| 144 | +3. Submit a Pull Request |
145 | 145 |
|
146 | | -### 添加新技能 |
| 146 | +### Adding New Skills |
147 | 147 |
|
148 | | -1. 在 Scripting App 中创建新的技能项目 |
149 | | -2. 编写 `SKILL.md` 文件,定义技能的使用方法 |
150 | | -3. 提交到 [ScriptingApp/Community-Scripts](https://github.com/ScriptingApp/Community-Scripts) 仓库 |
| 148 | +1. Create a new skill project in Scripting App |
| 149 | +2. Write a `SKILL.md` file defining how to use the skill |
| 150 | +3. Submit to the [ScriptingApp/Community-Scripts](https://github.com/ScriptingApp/Community-Scripts) repository |
151 | 151 |
|
152 | | -## 相关项目 |
| 152 | +## Related Projects |
153 | 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) - 包管理器 |
| 154 | +- [ScriptingApp/Community-Scripts](https://github.com/ScriptingApp/Community-Scripts) - Community script sharing |
| 155 | +- [ScriptingApp/scripting-app-lib](https://github.com/ScriptingApp/scripting-app-lib) - Scripting App library modules |
| 156 | +- [ScriptingApp/Package-Manager](https://github.com/ScriptingApp/Package-Manager) - Package manager |
157 | 157 |
|
158 | | -## 许可证 |
| 158 | +## License |
159 | 159 |
|
160 | 160 | MIT License |
0 commit comments