ErisPulse 2.3.0.dev5__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/tools/merge_md.py +114 -16
- erispulse-2.3.2/.github/workflows/auto-tag-release.yml +95 -0
- erispulse-2.3.2/.github/workflows/auto-update-docs.yml +152 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.gitignore +1 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/CHANGELOG.md +47 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/PKG-INFO +1 -1
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/README.md +4 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/ai/AIDocs/ErisPulse-AdapterDev.md +1832 -545
- erispulse-2.3.2/docs/ai/AIDocs/ErisPulse-Core.md +6697 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/ai/AIDocs/ErisPulse-Full.md +1788 -491
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/ai/AIDocs/ErisPulse-ModuleDev.md +727 -19
- erispulse-2.3.2/docs/ai/AIDocs/no-api/ErisPulse-AdapterDev.md +4095 -0
- erispulse-2.3.2/docs/ai/AIDocs/no-api/ErisPulse-Core.md +3076 -0
- erispulse-2.3.2/docs/ai/AIDocs/no-api/ErisPulse-Full.md +4657 -0
- erispulse-2.3.2/docs/ai/AIDocs/no-api/ErisPulse-ModuleDev.md +3375 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Bases/__init__.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Bases/adapter.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Bases/module.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/__init__.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/base.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/command.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/exceptions.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/message.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/meta.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/notice.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/Event/request.md +2 -2
- erispulse-2.3.0.dev5/docs/api/ErisPulse/Core/erispulse_config.md → erispulse-2.3.2/docs/api/ErisPulse/Core/_self_config.md +19 -3
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/adapter.md +17 -8
- erispulse-2.3.2/docs/api/ErisPulse/Core/config.md +82 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/exceptions.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/lifecycle.md +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/logger.md +28 -4
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/module.md +3 -3
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/router.md +11 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/Core/storage.md +29 -3
- erispulse-2.3.2/docs/api/ErisPulse/Core/ux.md +101 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/api/ErisPulse/__init__.md +45 -116
- erispulse-2.3.2/docs/api/ErisPulse/__main__.md +30 -0
- erispulse-2.3.2/docs/api/ErisPulse/utils/__init__.md +16 -0
- erispulse-2.3.2/docs/api/ErisPulse/utils/cli.md +158 -0
- erispulse-2.3.2/docs/api/ErisPulse/utils/console.md +23 -0
- erispulse-2.3.0.dev5/docs/api/ErisPulse/__main__.md → erispulse-2.3.2/docs/api/ErisPulse/utils/package_manager.md +5 -211
- erispulse-2.3.2/docs/api/ErisPulse/utils/reload_handler.md +69 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/core/README.md +1 -0
- erispulse-2.3.2/docs/core/event-system.md +597 -0
- erispulse-2.3.2/docs/core/lazy-loading.md +261 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/core/modules.md +171 -13
- erispulse-2.3.2/docs/core/router.md +535 -0
- erispulse-2.3.2/docs/core/self-config.md +188 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/development/adapter.md +274 -3
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/platform-features/README.md +1 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/platform-features/onebot11.md +110 -16
- erispulse-2.3.2/docs/platform-features/onebot12.md +339 -0
- erispulse-2.3.2/examples/example-adapter/MyAdapter/Converter.py +38 -0
- erispulse-2.3.2/examples/example-adapter/MyAdapter/Core.py +141 -0
- erispulse-2.3.2/examples/example-adapter/MyAdapter/__init__.py +7 -0
- erispulse-2.3.2/examples/example-module/MyModule/Core.py +166 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/packages.json +36 -11
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/pyproject.toml +2 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/_self_config.py +14 -2
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/ux.py +4 -33
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/__init__.py +154 -10
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/utils/__init__.py +2 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/utils/cli.py +81 -86
- erispulse-2.3.2/src/ErisPulse/utils/console.py +53 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/utils/package_manager.py +1 -3
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/utils/reload_handler.py +10 -34
- erispulse-2.3.0.dev5/.github/workflows/auto-tag-release.yml +0 -117
- erispulse-2.3.0.dev5/docs/api/ErisPulse/Core/config.md +0 -44
- erispulse-2.3.0.dev5/docs/core/event-system.md +0 -274
- erispulse-2.3.0.dev5/examples/example-adapter/MyAdapter/Core.py +0 -73
- erispulse-2.3.0.dev5/examples/example-adapter/MyAdapter/__init__.py +0 -5
- erispulse-2.3.0.dev5/examples/example-module/MyModule/Core.py +0 -90
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/ISSUE_TEMPLATE/module_submission.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/assets/docs/install_pip.gif +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/assets/erispulse_logo.png +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/scripts/update_packages.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/tools/update-api-docs.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/workflows/auto-update-packages.yml +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/workflows/code-quality-check.yml +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.github/workflows/pypi-publish.yml +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/.python-version +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/CODE_OF_CONDUCT.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/CONTRIBUTING.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/LICENSE +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/SECURITY.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/devs/test.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/devs/test_adapter.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/devs/test_cmd.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/devs/test_event.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/devs/test_files/test.docx +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/devs/test_files/test.jpg +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/devs/test_files/test.mp4 +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/ai/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/ai/module-generation.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/core/adapters.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/core/best-practices.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/core/cli.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/core/concepts.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/development/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/development/cli.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/development/module.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/platform-features/email.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/platform-features/maintain-notes.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/platform-features/telegram.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/platform-features/yunhu.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/quick-start.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/standards/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/standards/api-response.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/standards/event-conversion.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/styleguide/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/docs/styleguide/docstring_spec.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-adapter/LICENSE +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-adapter/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-adapter/pyproject.toml +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-cli-module/LICENSE +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-cli-module/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-cli-module/my_cli_module/__init__.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-cli-module/my_cli_module/cli.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-cli-module/pyproject.toml +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-module/LICENSE +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-module/MyModule/__init__.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-module/README.md +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/examples/example-module/pyproject.toml +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/scripts/install/install.ps1 +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/scripts/install/install.sh +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Bases/__init__.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Bases/adapter.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Bases/module.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/__init__.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/base.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/command.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/exceptions.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/message.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/meta.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/notice.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/Event/request.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/__init__.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/adapter.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/config.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/exceptions.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/lifecycle.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/logger.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/module.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/router.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/Core/storage.py +0 -0
- {erispulse-2.3.0.dev5 → erispulse-2.3.2}/src/ErisPulse/__main__.py +0 -0
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from datetime import datetime
|
|
3
3
|
|
|
4
|
+
"""
|
|
5
|
+
ErisPulse文档合并工具
|
|
6
|
+
|
|
7
|
+
使用方法:
|
|
8
|
+
1. 默认生成包含API的完整文档和开发文档:
|
|
9
|
+
python merge_md.py
|
|
10
|
+
|
|
11
|
+
2. 生成不包含API的文档版本:
|
|
12
|
+
python merge_md.py no-api
|
|
13
|
+
|
|
14
|
+
3. 只生成完整文档:
|
|
15
|
+
python merge_md.py full
|
|
16
|
+
|
|
17
|
+
4. 只生成开发文档:
|
|
18
|
+
python merge_md.py dev
|
|
19
|
+
|
|
20
|
+
5. 只生成核心文档:
|
|
21
|
+
python merge_md.py core
|
|
22
|
+
|
|
23
|
+
输出文件位置:
|
|
24
|
+
- 完整文档: docs/ai/AIDocs/ErisPulse-Full.md
|
|
25
|
+
- 模块开发文档: docs/ai/AIDocs/ErisPulse-ModuleDev.md
|
|
26
|
+
- 适配器开发文档: docs/ai/AIDocs/ErisPulse-AdapterDev.md
|
|
27
|
+
- 核心文档: docs/ai/AIDocs/ErisPulse-Core.md
|
|
28
|
+
|
|
29
|
+
no-api版本输出文件位置:
|
|
30
|
+
- 完整文档(no-api): docs/ai/AIDocs/no-api/ErisPulse-Full.md
|
|
31
|
+
- 模块开发文档(no-api): docs/ai/AIDocs/no-api/ErisPulse-ModuleDev.md
|
|
32
|
+
- 适配器开发文档(no-api): docs/ai/AIDocs/no-api/ErisPulse-AdapterDev.md
|
|
33
|
+
- 核心文档(no-api): docs/ai/AIDocs/no-api/ErisPulse-Core.md
|
|
34
|
+
"""
|
|
35
|
+
|
|
4
36
|
def merge_md_files(output_file, files_to_merge, title="文档合集"):
|
|
5
37
|
"""
|
|
6
38
|
合并多个Markdown文件
|
|
@@ -265,7 +297,7 @@ def get_platform_features_files():
|
|
|
265
297
|
|
|
266
298
|
return platform_files
|
|
267
299
|
|
|
268
|
-
def generate_full_document():
|
|
300
|
+
def generate_full_document(include_api=True):
|
|
269
301
|
print("正在生成完整文档...")
|
|
270
302
|
|
|
271
303
|
# 基础文件
|
|
@@ -294,15 +326,24 @@ def generate_full_document():
|
|
|
294
326
|
if len(existing_files) != len(files_to_merge):
|
|
295
327
|
print(f"警告: {len(files_to_merge) - len(existing_files)} 个文件不存在,已跳过")
|
|
296
328
|
|
|
297
|
-
|
|
329
|
+
# 根据是否包含API决定输出路径
|
|
330
|
+
if include_api:
|
|
331
|
+
output_file = "docs/ai/AIDocs/ErisPulse-Full.md"
|
|
332
|
+
else:
|
|
333
|
+
output_file = "docs/ai/AIDocs/no-api/ErisPulse-Full.md"
|
|
334
|
+
|
|
298
335
|
os.makedirs(os.path.dirname(output_file), exist_ok=True)
|
|
299
336
|
|
|
300
337
|
merge_md_files(output_file, existing_files, "完整开发文档")
|
|
301
|
-
merge_api_docs("docs/api", output_file)
|
|
302
338
|
|
|
303
|
-
|
|
339
|
+
# 根据参数决定是否合并API文档
|
|
340
|
+
if include_api:
|
|
341
|
+
merge_api_docs("docs/api", output_file)
|
|
342
|
+
|
|
343
|
+
api_status = "包含API" if include_api else "不包含API"
|
|
344
|
+
print(f"完整文档生成完成({api_status}),已保存到: {output_file}")
|
|
304
345
|
|
|
305
|
-
def generate_dev_documents():
|
|
346
|
+
def generate_dev_documents(include_api=True):
|
|
306
347
|
print("正在生成开发文档...")
|
|
307
348
|
|
|
308
349
|
# 模块开发文档
|
|
@@ -331,11 +372,17 @@ def generate_dev_documents():
|
|
|
331
372
|
# 过滤不存在的文件
|
|
332
373
|
existing_files = [f for f in files_to_merge if os.path.exists(f['path'])]
|
|
333
374
|
|
|
334
|
-
|
|
375
|
+
# 根据是否包含API决定输出路径
|
|
376
|
+
if include_api:
|
|
377
|
+
module_output = "docs/ai/AIDocs/ErisPulse-ModuleDev.md"
|
|
378
|
+
else:
|
|
379
|
+
module_output = "docs/ai/AIDocs/no-api/ErisPulse-ModuleDev.md"
|
|
380
|
+
|
|
335
381
|
os.makedirs(os.path.dirname(module_output), exist_ok=True)
|
|
336
382
|
merge_md_files(module_output, existing_files, "模块开发文档")
|
|
337
383
|
|
|
338
|
-
|
|
384
|
+
api_status = "包含API" if include_api else "不包含API"
|
|
385
|
+
print(f"模块开发文档生成完成({api_status}),已保存到: {module_output}")
|
|
339
386
|
|
|
340
387
|
# 适配器开发文档
|
|
341
388
|
adapter_files = [
|
|
@@ -357,14 +404,22 @@ def generate_dev_documents():
|
|
|
357
404
|
# 过滤不存在的文件
|
|
358
405
|
existing_files = [f for f in files_to_merge if os.path.exists(f['path'])]
|
|
359
406
|
|
|
360
|
-
|
|
407
|
+
# 根据是否包含API决定输出路径
|
|
408
|
+
if include_api:
|
|
409
|
+
adapter_output = "docs/ai/AIDocs/ErisPulse-AdapterDev.md"
|
|
410
|
+
else:
|
|
411
|
+
adapter_output = "docs/ai/AIDocs/no-api/ErisPulse-AdapterDev.md"
|
|
412
|
+
|
|
361
413
|
os.makedirs(os.path.dirname(adapter_output), exist_ok=True)
|
|
362
414
|
merge_md_files(adapter_output, existing_files, "适配器开发文档")
|
|
363
|
-
merge_api_docs("docs/api", adapter_output)
|
|
364
415
|
|
|
365
|
-
|
|
416
|
+
# 根据参数决定是否合并API文档
|
|
417
|
+
if include_api:
|
|
418
|
+
merge_api_docs("docs/api", adapter_output)
|
|
419
|
+
|
|
420
|
+
print(f"适配器开发文档生成完成({api_status}),已保存到: {adapter_output}")
|
|
366
421
|
|
|
367
|
-
def generate_core_document():
|
|
422
|
+
def generate_core_document(include_api=True):
|
|
368
423
|
print("正在生成核心文档...")
|
|
369
424
|
|
|
370
425
|
# 基础文件
|
|
@@ -385,11 +440,21 @@ def generate_core_document():
|
|
|
385
440
|
# 过滤不存在的文件
|
|
386
441
|
existing_files = [f for f in files_to_merge if os.path.exists(f['path'])]
|
|
387
442
|
|
|
388
|
-
|
|
443
|
+
# 根据是否包含API决定输出路径
|
|
444
|
+
if include_api:
|
|
445
|
+
core_output = "docs/ai/AIDocs/ErisPulse-Core.md"
|
|
446
|
+
else:
|
|
447
|
+
core_output = "docs/ai/AIDocs/no-api/ErisPulse-Core.md"
|
|
448
|
+
|
|
389
449
|
os.makedirs(os.path.dirname(core_output), exist_ok=True)
|
|
390
450
|
merge_md_files(core_output, existing_files, "核心功能文档")
|
|
391
451
|
|
|
392
|
-
|
|
452
|
+
# 根据参数决定是否合并API文档
|
|
453
|
+
if include_api:
|
|
454
|
+
merge_api_docs("docs/api", core_output)
|
|
455
|
+
|
|
456
|
+
api_status = "包含API" if include_api else "不包含API"
|
|
457
|
+
print(f"核心文档生成完成({api_status}),已保存到: {core_output}")
|
|
393
458
|
|
|
394
459
|
def generate_custom_document(title, files, api_dirs, output_path):
|
|
395
460
|
"""
|
|
@@ -414,11 +479,44 @@ def generate_custom_document(title, files, api_dirs, output_path):
|
|
|
414
479
|
|
|
415
480
|
print(f"{title}生成完成,已保存到: {output_path}")
|
|
416
481
|
|
|
482
|
+
def generate_no_api_documents():
|
|
483
|
+
print("正在生成no-api版本文档...")
|
|
484
|
+
|
|
485
|
+
# 生成不包含API的完整文档
|
|
486
|
+
generate_full_document(include_api=False)
|
|
487
|
+
|
|
488
|
+
# 生成不包含API的开发文档
|
|
489
|
+
generate_dev_documents(include_api=False)
|
|
490
|
+
|
|
491
|
+
# 生成不包含API的核心文档
|
|
492
|
+
generate_core_document(include_api=False)
|
|
493
|
+
|
|
494
|
+
print("所有no-api版本文档生成完成")
|
|
495
|
+
|
|
417
496
|
if __name__ == "__main__":
|
|
497
|
+
import sys
|
|
498
|
+
|
|
418
499
|
try:
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
500
|
+
# 检查命令行参数
|
|
501
|
+
if len(sys.argv) > 1:
|
|
502
|
+
if sys.argv[1] == "no-api":
|
|
503
|
+
generate_no_api_documents()
|
|
504
|
+
elif sys.argv[1] == "full":
|
|
505
|
+
generate_full_document()
|
|
506
|
+
generate_dev_documents()
|
|
507
|
+
generate_core_document()
|
|
508
|
+
elif sys.argv[1] == "dev":
|
|
509
|
+
generate_dev_documents()
|
|
510
|
+
elif sys.argv[1] == "core":
|
|
511
|
+
generate_core_document()
|
|
512
|
+
else:
|
|
513
|
+
print(f"未知参数: {sys.argv[1]}")
|
|
514
|
+
print("可用参数: no-api, full, dev, core")
|
|
515
|
+
else:
|
|
516
|
+
generate_no_api_documents()
|
|
517
|
+
generate_full_document()
|
|
518
|
+
generate_dev_documents()
|
|
519
|
+
generate_core_document()
|
|
422
520
|
print("所有文档生成完成")
|
|
423
521
|
except Exception as e:
|
|
424
522
|
print(f"文档生成过程中出现错误: {str(e)}")
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: 🎀 艾莉丝的版本标签魔法 ~
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main, Pre-Release/v2]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
update-latest-release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: 检出代码
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
+
|
|
20
|
+
- name: 施展版本魔法
|
|
21
|
+
env:
|
|
22
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
+
shell: bash
|
|
24
|
+
run: |
|
|
25
|
+
# 读取当前版本
|
|
26
|
+
version=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "//;s/"//')
|
|
27
|
+
tag_name="v$version"
|
|
28
|
+
|
|
29
|
+
echo "当前版本: $version"
|
|
30
|
+
echo "标签名称: $tag_name"
|
|
31
|
+
|
|
32
|
+
# 从 CHANGELOG.md 提取更新日志
|
|
33
|
+
if [ -f "CHANGELOG.md" ]; then
|
|
34
|
+
# 修复版本号格式:将 -de. 替换为 -dev.
|
|
35
|
+
fixed_version=$(echo "$version" | sed 's/-de\./-dev./g')
|
|
36
|
+
|
|
37
|
+
echo "尝试匹配版本: $version 或 $fixed_version"
|
|
38
|
+
|
|
39
|
+
# 使用 sed 提取版本更新日志
|
|
40
|
+
# 先尝试匹配原始版本号
|
|
41
|
+
changelog_section=$(sed -n "/^## \[$version\] -/,/^## \[.*\] -/p" CHANGELOG.md | sed '$d')
|
|
42
|
+
|
|
43
|
+
# 如果没找到,尝试匹配修复后的版本号
|
|
44
|
+
if [ -z "$changelog_section" ]; then
|
|
45
|
+
changelog_section=$(sed -n "/^## \[$fixed_version\] -/,/^## \[.*\] -/p" CHANGELOG.md | sed '$d')
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# 移除第一行(标题行)
|
|
49
|
+
if [ -n "$changelog_section" ]; then
|
|
50
|
+
changelog=$(echo "$changelog_section" | tail -n +2)
|
|
51
|
+
|
|
52
|
+
# 判断是否为开发版本
|
|
53
|
+
if [[ $version =~ dev|alpha|beta|pre|a|b ]]; then
|
|
54
|
+
is_dev="true"
|
|
55
|
+
latest_flag=""
|
|
56
|
+
else
|
|
57
|
+
is_dev="false"
|
|
58
|
+
latest_flag="--latest"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
# 检查标签是否已存在
|
|
62
|
+
if ! git rev-parse "$tag_name" >/dev/null 2>&1; then
|
|
63
|
+
echo "🎀🎀 创建新标签 $tag_name..."
|
|
64
|
+
git tag "$tag_name"
|
|
65
|
+
git push origin "$tag_name"
|
|
66
|
+
else
|
|
67
|
+
echo "标签 $tag_name 已存在"
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# 检查发行是否存在
|
|
71
|
+
if gh release view "$tag_name" &>/dev/null; then
|
|
72
|
+
# 更新发行
|
|
73
|
+
echo "🔄 更新发行 $tag_name..."
|
|
74
|
+
gh release edit "$tag_name" \
|
|
75
|
+
--notes "$changelog" \
|
|
76
|
+
--prerelease=$is_dev
|
|
77
|
+
echo "✅ 已更新发行 $tag_name"
|
|
78
|
+
else
|
|
79
|
+
# 创建发行
|
|
80
|
+
echo "✨ 创建发行 $tag_name..."
|
|
81
|
+
gh release create "$tag_name" \
|
|
82
|
+
--notes "$changelog" \
|
|
83
|
+
--title "✨ 艾莉丝的魔法更新 $tag_name" \
|
|
84
|
+
--prerelease=$is_dev \
|
|
85
|
+
$latest_flag
|
|
86
|
+
echo "✅ 已创建发行 $tag_name"
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
echo "📦 发行页面: https://github.com/${{ github.repository }}/releases/tag/$tag_name"
|
|
90
|
+
else
|
|
91
|
+
echo "⚠️ 未找到版本 $version 的更新日志"
|
|
92
|
+
fi
|
|
93
|
+
else
|
|
94
|
+
echo "⚠️ CHANGELOG.md 文件不存在"
|
|
95
|
+
fi
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
name: 📚 艾莉丝的文档炼金工房 ~
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main, develop, master ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main, develop, master ]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
update-and-generate-docs:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: 检出魔法书
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
|
|
23
|
+
- name: 准备魔法环境
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.x'
|
|
27
|
+
|
|
28
|
+
- name: 学习魔法咒语
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install requests
|
|
32
|
+
|
|
33
|
+
- name: 🔮 更新API文档
|
|
34
|
+
id: update-api
|
|
35
|
+
run: |
|
|
36
|
+
echo "📖 艾莉丝开始更新API文档了哦~"
|
|
37
|
+
|
|
38
|
+
# 确保输出目录存在
|
|
39
|
+
mkdir -p docs/api
|
|
40
|
+
|
|
41
|
+
# 运行API文档更新脚本
|
|
42
|
+
if [ -f ".github/tools/update-api-docs.py" ]; then
|
|
43
|
+
python .github/tools/update-api-docs.py --src src --output docs/api --format markdown
|
|
44
|
+
echo "✅ API文档更新完成!"
|
|
45
|
+
else
|
|
46
|
+
echo "⚠️ 未找到API文档更新脚本,跳过此步骤"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# 检查API文档是否有更新
|
|
50
|
+
if git diff --quiet docs/api/; then
|
|
51
|
+
echo "API文档没有变化"
|
|
52
|
+
echo "api_updated=false" >> $GITHUB_OUTPUT
|
|
53
|
+
else
|
|
54
|
+
echo "发现了API文档更新!"
|
|
55
|
+
echo "api_updated=true" >> $GITHUB_OUTPUT
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
- name: 📜 生成合并文档
|
|
59
|
+
id: merge-docs
|
|
60
|
+
run: |
|
|
61
|
+
echo "📚 艾莉丝开始生成合并文档了~"
|
|
62
|
+
|
|
63
|
+
# 确保输出目录存在
|
|
64
|
+
mkdir -p docs/ai/AIDocs
|
|
65
|
+
mkdir -p docs/ai/AIDocs/no-api
|
|
66
|
+
|
|
67
|
+
# 生成包含API的文档
|
|
68
|
+
if [ -f ".github/tools/merge_md.py" ]; then
|
|
69
|
+
python .github/tools/merge_md.py full
|
|
70
|
+
python .github/tools/merge_md.py dev
|
|
71
|
+
|
|
72
|
+
echo "✅ 包含API的文档生成完成!"
|
|
73
|
+
else
|
|
74
|
+
echo "⚠️ 未找到文档合并脚本"
|
|
75
|
+
exit 1
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# 检查合并文档是否有更新
|
|
79
|
+
if git diff --quiet docs/ai/AIDocs/; then
|
|
80
|
+
echo "合并文档没有变化"
|
|
81
|
+
echo "docs_updated=false" >> $GITHUB_OUTPUT
|
|
82
|
+
else
|
|
83
|
+
echo "发现了合并文档更新!"
|
|
84
|
+
echo "docs_updated=true" >> $GITHUB_OUTPUT
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
- name: 📝 生成no-api版本文档
|
|
88
|
+
run: |
|
|
89
|
+
echo "📖 艾莉丝正在生成不包含API的文档版本~"
|
|
90
|
+
|
|
91
|
+
# 生成不包含API的文档
|
|
92
|
+
if [ -f ".github/tools/merge_md.py" ]; then
|
|
93
|
+
python .github/tools/merge_md.py no-api
|
|
94
|
+
echo "✅ no-api版本文档生成完成!"
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
- name: 📊 统计更新情况
|
|
98
|
+
run: |
|
|
99
|
+
echo "📈 艾莉丝正在统计今天的文档更新情况~"
|
|
100
|
+
|
|
101
|
+
# 统计API文档更新
|
|
102
|
+
api_files=$(git diff --name-only docs/api/ 2>/dev/null | wc -l)
|
|
103
|
+
echo "📝 API文档更新文件数: $api_files"
|
|
104
|
+
|
|
105
|
+
# 统计合并文档更新
|
|
106
|
+
full_docs=$(git diff --name-only docs/ai/AIDocs/ 2>/dev/null | wc -l)
|
|
107
|
+
echo "📚 合并文档更新文件数: $full_docs"
|
|
108
|
+
|
|
109
|
+
# 统计no-api文档
|
|
110
|
+
noapi_docs=$(git diff --name-only docs/ai/AIDocs/no-api/ 2>/dev/null | wc -l)
|
|
111
|
+
echo "📖 no-api文档更新文件数: $noapi_docs"
|
|
112
|
+
|
|
113
|
+
- name: 💾 提交更新
|
|
114
|
+
if: steps.update-api.outputs.api_updated == 'true' || steps.merge-docs.outputs.docs_updated == 'true'
|
|
115
|
+
run: |
|
|
116
|
+
echo "💾 艾莉丝正在保存文档更新~"
|
|
117
|
+
|
|
118
|
+
# 配置Git用户信息
|
|
119
|
+
git config --local user.email "eris@magic-circle.dev"
|
|
120
|
+
git config --local user.name "Eris the Scribe"
|
|
121
|
+
|
|
122
|
+
# 添加所有更新的文档
|
|
123
|
+
git add docs/api/ docs/ai/AIDocs/
|
|
124
|
+
|
|
125
|
+
# 生成提交信息
|
|
126
|
+
commit_msg="📚 艾莉丝的自动文档更新魔法 [skip ci]
|
|
127
|
+
|
|
128
|
+
📖 自动更新了项目文档
|
|
129
|
+
📝 包含API文档和合并文档的最新版本
|
|
130
|
+
📚 生成了包含API和不包含API两种版本
|
|
131
|
+
|
|
132
|
+
🌟 详情请查看 docs/ 目录"
|
|
133
|
+
|
|
134
|
+
# 提交更改
|
|
135
|
+
git commit -m "$commit_msg"
|
|
136
|
+
git push
|
|
137
|
+
|
|
138
|
+
- name: 🎉 文档更新完成
|
|
139
|
+
if: steps.update-api.outputs.api_updated == 'true' || steps.merge-docs.outputs.docs_updated == 'true'
|
|
140
|
+
run: |
|
|
141
|
+
echo "🌟 艾莉丝今天也努力完成了文档更新的魔法呢!"
|
|
142
|
+
echo "📚 所有文档已更新并提交到仓库"
|
|
143
|
+
echo "💫 包含了最新的API文档和合并文档"
|
|
144
|
+
echo "🌙 今天的文档炼金工作完成啦~"
|
|
145
|
+
|
|
146
|
+
- name: 😊 无更新时的说明
|
|
147
|
+
if: steps.update-api.outputs.api_updated != 'true' && steps.merge-docs.outputs.docs_updated != 'true'
|
|
148
|
+
run: |
|
|
149
|
+
echo "✨ 今天没有发现需要更新的文档呢~"
|
|
150
|
+
echo "📚 所有文档都是最新状态"
|
|
151
|
+
echo "🌟 艾莉丝会继续守护着我们的文档库!"
|
|
152
|
+
echo "🌙 下次更新再见啦~"
|
|
@@ -31,6 +31,53 @@
|
|
|
31
31
|
- 具体功能点2
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
---
|
|
35
|
+
## [2.3.2] - 2025/01/11
|
|
36
|
+
### 新增
|
|
37
|
+
- @wsu2059q
|
|
38
|
+
- 新增第三方cli模块异步的调用支持
|
|
39
|
+
|
|
40
|
+
### 修复
|
|
41
|
+
- @wsu2059q
|
|
42
|
+
- 修复第三方命令调用时可能出现的异常
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [2.3.1] - 2025/12/28
|
|
47
|
+
### 修复
|
|
48
|
+
- @wsu2059q
|
|
49
|
+
- 修复 `ep-init` 命令使用 `init_task()` 导致协程未等待的问题
|
|
50
|
+
- 新增 `init_sync()` 同步包装器,用于命令行直接调用初始化功能
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
## [2.3.0] - 2025/12/25
|
|
54
|
+
### 修复
|
|
55
|
+
- @wsu2059q
|
|
56
|
+
- 修复控制台颜色主题导入报错导致安装中断的问题
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
## [2.3.0-dev.6] - 2025/12/22
|
|
60
|
+
> 开发版本
|
|
61
|
+
|
|
62
|
+
### 新增
|
|
63
|
+
- @wsu2059q
|
|
64
|
+
- 新增框架配置解析文档,包括框架的默认配置项及其含义
|
|
65
|
+
- 新增懒加载模块系统、路由管理器和事件系统文档
|
|
66
|
+
- 新增懒加载全局配置支持,允许通过配置文件控制是否使用懒加载
|
|
67
|
+
|
|
68
|
+
### 变更
|
|
69
|
+
- @wsu2059q
|
|
70
|
+
- 优化懒加载模块初始化逻辑,支持同步初始化和异步初始化分离
|
|
71
|
+
- 新增 `_initialize_sync()` 方法,用于在异步上下文中进行同步调用
|
|
72
|
+
- 新增 `_complete_async_init()` 方法,用于完成异步初始化部分
|
|
73
|
+
- 优化CLI资源清理逻辑:
|
|
74
|
+
- 分离适配器和模块清理逻辑
|
|
75
|
+
|
|
76
|
+
### 修复
|
|
77
|
+
- @wsu2059q
|
|
78
|
+
- 修复懒加载模块在异步上下文中初始化可能出现的问题
|
|
79
|
+
- 修复配置系统中的缓存一致性检查问题
|
|
80
|
+
|
|
34
81
|
---
|
|
35
82
|
## [2.3.0-dev.5] - 2025/12/21
|
|
36
83
|
> 开发版本
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
- [核心模块](core/modules.md) - 存储、配置、日志等核心组件详解
|
|
21
21
|
- [适配器系统](core/adapters.md) - 平台适配器的使用和开发
|
|
22
22
|
- [事件系统](core/event-system.md) - Event 模块的使用(事件监听、事件处理、事件分发)
|
|
23
|
+
- [懒加载模块系统](core/lazy-loading.md) - 懒加载模块系统的使用和配置
|
|
24
|
+
- [路由管理器](core/router.md) - HTTP和WebSocket路由管理
|
|
25
|
+
- [框架配置](core/self-config.md) - 框架默认配置说明
|
|
23
26
|
- [最佳实践](core/best-practices.md) - 开发和部署建议
|
|
24
27
|
|
|
25
28
|
### 开发指南
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
- [云湖平台特性](platform-features/yunhu.md) - 云湖适配器特有功能说明
|
|
40
43
|
- [Telegram平台特性](platform-features/telegram.md) - Telegram适配器特有功能说明
|
|
41
44
|
- [OneBot11平台特性](platform-features/onebot11.md) - OneBot11适配器特有功能说明
|
|
45
|
+
- [OneBot12平台特性](platform-features/onebot12.md) - OneBot12适配器特有功能说明
|
|
42
46
|
- [邮件平台特性](platform-features/email.md) - 邮件适配器特有功能说明
|
|
43
47
|
|
|
44
48
|
### API 参考
|