Compare commits
288 Commits
Author | SHA1 | Date | |
---|---|---|---|
287ab63091 | |||
0c942d9806 | |||
237789e0d4 | |||
e656fa6a48 | |||
6dcb085b53 | |||
55a427e344 | |||
43eef20b71 | |||
b8fdb4146e | |||
cdbede7135 | |||
85a3a9ad52 | |||
943e0c2665 | |||
fd4d680e87 | |||
0b763135c9 | |||
832cc2ec44 | |||
3160b4be69 | |||
775596b5bf | |||
84782a92d8 | |||
6e817111cb | |||
cd8d631348 | |||
af37e61d05 | |||
803b65e08e | |||
aa9abde63a | |||
9c35abc6e2 | |||
1af95a15aa | |||
d2b693b1e0 | |||
b05bbf2f19 | |||
37ed3b0824 | |||
b56ec5ce38 | |||
1fb3f6cd58 | |||
1dfe1a5819 | |||
5d194b8ebe | |||
78810d2ca8 | |||
87d4202ed3 | |||
1d0b18291e | |||
16df5706ff | |||
1b24157f08 | |||
8ba50b7bd6 | |||
502ccb46bb | |||
fcbc410f1a | |||
85a7c28a3a | |||
7bd0da9316 | |||
212c338fcd | |||
137270b886 | |||
079b940d8e | |||
e396db67ce | |||
f37b469ab9 | |||
0a3363ebce | |||
53291822c0 | |||
5f5dcc7f99 | |||
9d27abfe04 | |||
4b4f030fe3 | |||
d5b0f947e0 | |||
9e6372185f | |||
0e125f7c81 | |||
a3ea422ec3 | |||
8d78e643e0 | |||
aa9cae7008 | |||
48085a946d | |||
8e27f6b9b0 | |||
f980e77a4a | |||
01798f7b11 | |||
03057c8ef9 | |||
ee851116d8 | |||
d367903946 | |||
66ade9efc6 | |||
ff41e72378 | |||
169f1645a4 | |||
c3914b2b15 | |||
b356524a9e | |||
85a13251a5 | |||
0417805e46 | |||
d3f1e35a12 | |||
ff585ac7c2 | |||
1b692dd13f | |||
dd00e6ecec | |||
222250bc41 | |||
c36e706731 | |||
adc9b76688 | |||
2e3ea96972 | |||
9b07d41f86 | |||
65ad377099 | |||
a61357f4e2 | |||
60403b2a4f | |||
624afa57ba | |||
36a39e1ed7 | |||
4a872c3435 | |||
90b9d1af1e | |||
551ca06ea7 | |||
61c0cf2c2d | |||
e801a99f67 | |||
beebfe7deb | |||
32e1963d5a | |||
facf5bedb1 | |||
035d43fb18 | |||
0d5f9fee52 | |||
3cb03fa4dc | |||
47ef3f2a49 | |||
8568c7bb99 | |||
02cf058552 | |||
c9157f0e2c | |||
83325e63ea | |||
37b8d969b1 | |||
298bdc7b8c | |||
81a191f8ba | |||
c3fc5d429b | |||
b08c934c78 | |||
1b1ddbdd8d | |||
0d16d53cb7 | |||
6c39ed8ab5 | |||
2f8999b5ad | |||
7107d03b72 | |||
3bd40e7271 | |||
8ace3e68f4 | |||
f69feb1def | |||
9fb423d5e0 | |||
e9df67a661 | |||
b6871ea13a | |||
cb84a7d0d9 | |||
25f7540f86 | |||
c29a3fd6d4 | |||
ab48396db9 | |||
51982b63c3 | |||
2b537d27ec | |||
16930e96aa | |||
d63ba4943a | |||
5d22f20ce3 | |||
2451849fd6 | |||
61680d9e87 | |||
850dd75822 | |||
6ba983fae3 | |||
ca34f9c2a1 | |||
0fb5b84392 | |||
39a9c39924 | |||
13692228c6 | |||
f22f4d229d | |||
97dbf42a4d | |||
041a219151 | |||
c137f2f916 | |||
6ef3b09ec9 | |||
263b78e995 | |||
0d87848a7e | |||
44ad0832ba | |||
93ced26e07 | |||
363daf6251 | |||
a6b1d1c9e0 | |||
576d8c23b3 | |||
c232c6e5f6 | |||
5d6ae52157 | |||
01e6256ed4 | |||
dbc114a529 | |||
4d77af8f0c | |||
c36a925bb5 | |||
605dd035d4 | |||
7526ae13d7 | |||
0eb41f70d2 | |||
a4c7ee738c | |||
8d4602c40d | |||
bb20d9623d | |||
73cc28d1cf | |||
ae54cd923c | |||
9d3c9a7d70 | |||
92a4274be7 | |||
4800b3f46c | |||
cce593b2f4 | |||
c491642713 | |||
5b4dd638a4 | |||
8440952167 | |||
4e4227e204 | |||
effb01d43c | |||
28d730a2ca | |||
0bd135a5c9 | |||
5522391942 | |||
7576355e95 | |||
c9e518f2ed | |||
593cf2407b | |||
bdb4c76d70 | |||
7cce805d39 | |||
b9d3ecc15d | |||
ec5eae08f7 | |||
c1edf31577 | |||
5262c04e46 | |||
8b01943d14 | |||
35823be13e | |||
4162ea33ff | |||
1787ef4db7 | |||
38b13611c9 | |||
52fa143e75 | |||
89047a0c8a | |||
9fbded7d6a | |||
c657781599 | |||
ecbe1ff79e | |||
d6811ab9b3 | |||
d45170db3e | |||
6e63768c71 | |||
1424bc2cf6 | |||
051fe3d15d | |||
fcae485071 | |||
2e9a7fdf94 | |||
570d7e18a4 | |||
8ac53970a3 | |||
dd3e108e10 | |||
c29bd81ffb | |||
a1173e4d84 | |||
d877e30a05 | |||
33ad54090d | |||
83ee6cfdbd | |||
f48971a0c4 | |||
a4b71aa73c | |||
4b7df662e8 | |||
4cd7b6718b | |||
ac2a94dda0 | |||
de7e65b32a | |||
1b283261c3 | |||
39cbfc1baa | |||
e563f18d31 | |||
1d03b3f28f | |||
ae0025a203 | |||
b5bd7acb7f | |||
657e7e52ac | |||
d6341c88cd | |||
bdb1191f9e | |||
3b29b67c0b | |||
cc43e53c4b | |||
a25c900d49 | |||
206651da94 | |||
be28116a98 | |||
4cdf29557c | |||
62928e47eb | |||
9b50b719d9 | |||
def60bf298 | |||
6496b6e463 | |||
6ce4c972a0 | |||
70e3c9968a | |||
074882f092 | |||
c2b3018908 | |||
96c85d9dca | |||
e15aafd781 | |||
9e17b84a5d | |||
c66d470166 | |||
4deb7d11a1 | |||
6f069f83d4 | |||
fa53df1e8a | |||
ba17f9d159 | |||
b558b51601 | |||
3ea0acd48b | |||
c171873fa6 | |||
1ccf94883a | |||
b26f8e0d24 | |||
5bc2725d1b | |||
8e06244311 | |||
0f35613e50 | |||
4cfad0b5ca | |||
c2593e71c0 | |||
bb331232ca | |||
96e8293bf4 | |||
e13464cb7c | |||
c5f8fbe86d | |||
8667706377 | |||
86e47ab226 | |||
10c383d66a | |||
4c65a308d6 | |||
246e43317f | |||
974b97b744 | |||
c914ddc0ee | |||
6509b293db | |||
a72eeb4c3f | |||
309397b72c | |||
077658c68d | |||
322ad19889 | |||
ab9d3d3d3e | |||
06a109d2b5 | |||
351743068a | |||
4e6532ff0d | |||
eaf57f2c33 | |||
7abdac7c9c | |||
002df66878 | |||
251bfaf410 | |||
24722447da | |||
90e7a90bcf | |||
6d3d3fc52c | |||
e843d790b1 | |||
c90ac1d21a | |||
041ceb81d8 | |||
c6f2a29320 | |||
0532d7592e | |||
f9fe1922d4 | |||
88b5b55062 | |||
afe501a06d |
53
.github/ISSUE_TEMPLATE/问题反馈.md
vendored
Normal file
53
.github/ISSUE_TEMPLATE/问题反馈.md
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
name: 问题反馈
|
||||||
|
about: 反馈你在使用轻雪中遇到的问题
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 问题反馈
|
||||||
|
|
||||||
|
## **请确保**
|
||||||
|
|
||||||
|
- 已认真阅读[文档]("https://bot.liteyuki.icu"),该问题不是文档提及的或你自己操作不当造成的
|
||||||
|
- 你的问题是在最新版本的代码上测试的
|
||||||
|
- 请勿重复提交相同或类似的issue
|
||||||
|
|
||||||
|
|
||||||
|
## **描述问题**
|
||||||
|
|
||||||
|
请在此简单描述问题
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## **如何复现**
|
||||||
|
|
||||||
|
请阐述一下如何重现这个问题
|
||||||
|
### 预期
|
||||||
|
|
||||||
|
描述你期望发生的事情
|
||||||
|
|
||||||
|
### 实际
|
||||||
|
|
||||||
|
描述实际发生的事情
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## **日志或截图**
|
||||||
|
```
|
||||||
|
日志内容
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## **设备信息**
|
||||||
|
- **系统**: [例如 Ubuntu 22.04]
|
||||||
|
- **CPU**: [例如 Intel i7-7700K]
|
||||||
|
- **内存**: [例如 16GB]
|
||||||
|
- **Python**: [例如CPython 3.10.7]
|
||||||
|
|
||||||
|
|
||||||
|
**补充内容**
|
||||||
|
|
||||||
|
可选,推荐提供`pip freeze`的输出,以及其他相关信息,以及你的建议
|
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# To get started with Dependabot version updates, you'll need to specify which
|
||||||
|
# package ecosystems to update and where the package manifests are located.
|
||||||
|
# Please see the documentation for all configuration options:
|
||||||
|
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "" # See documentation for possible values
|
||||||
|
directory: "/" # Location of package manifests
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
57
.github/workflows/ISSUE_TEMPLATE.md
vendored
57
.github/workflows/ISSUE_TEMPLATE.md
vendored
@ -1,33 +1,44 @@
|
|||||||
---
|
# 问题反馈
|
||||||
name: BUG 反馈
|
|
||||||
about: 使用轻雪时遇到了问题?
|
|
||||||
---
|
|
||||||
## 问题反馈
|
|
||||||
|
|
||||||
### **描述**
|
## **请确保**
|
||||||
请详细描述一下你所遇到的bug
|
|
||||||
|
|
||||||
### **确保**
|
- 已认真阅读[文档]("https://bot.liteyuki.icu"),该问题不是文档提及的或你自己操作不当造成的
|
||||||
|
- 你的问题是在最新版本的代码上测试的
|
||||||
|
- 请勿重复提交相同或类似的issue
|
||||||
|
|
||||||
- [ ] 我已查阅所有issues,没有相似或已被证实的内容
|
|
||||||
- [ ] 我已按照文档指引进行正确的操作,仍会复现该问题
|
|
||||||
|
|
||||||
### **预期效果**
|
## **描述问题**
|
||||||
你想要什么样的预期效果
|
|
||||||
|
|
||||||
### **实际效果**
|
请在此简单描述问题
|
||||||
实际上是怎么样的
|
|
||||||
|
|
||||||
### **运行环境**
|
|
||||||
- 系统及版本:
|
|
||||||
- Python环境:
|
|
||||||
- commit哈希或版本:
|
|
||||||
- 硬件信息(可选):
|
|
||||||
|
|
||||||
### **运行日志**
|
|
||||||
|
## **如何复现**
|
||||||
|
|
||||||
|
请阐述一下如何重现这个问题
|
||||||
|
### 预期
|
||||||
|
|
||||||
|
描述你期望发生的事情
|
||||||
|
|
||||||
|
### 实际
|
||||||
|
|
||||||
|
描述实际发生的事情
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## **日志或截图**
|
||||||
```
|
```
|
||||||
将相关日志粘贴到此处
|
日志内容
|
||||||
```
|
```
|
||||||
|
|
||||||
### **严重等级**
|
|
||||||
致命|严重|警告|轻微
|
## **设备信息**
|
||||||
|
- **系统**: [例如 Ubuntu 22.04]
|
||||||
|
- **CPU**: [例如 Intel i7-7700K]
|
||||||
|
- **内存**: [例如 16GB]
|
||||||
|
- **Python**: [例如CPython 3.10.7]
|
||||||
|
|
||||||
|
|
||||||
|
**补充内容**
|
||||||
|
|
||||||
|
可选,推荐提供`pip freeze`的输出,以及其他相关信息,以及你的建议
|
||||||
|
12
.github/workflows/deploy-docs.yml
vendored
12
.github/workflows/deploy-docs.yml
vendored
@ -33,6 +33,18 @@ jobs:
|
|||||||
cd docs
|
cd docs
|
||||||
pnpm install
|
pnpm install
|
||||||
|
|
||||||
|
- name: 设置Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
|
||||||
|
- name: 生成API markdown
|
||||||
|
run: |-
|
||||||
|
python -m pip install pydantic
|
||||||
|
python liteyuki/mkdoc.py
|
||||||
|
|
||||||
|
|
||||||
- name: 构建文档
|
- name: 构建文档
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max_old_space_size=8192
|
NODE_OPTIONS: --max_old_space_size=8192
|
||||||
|
20
.github/workflows/pypi-publish.yml
vendored
Normal file
20
.github/workflows/pypi-publish.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pypi-publish:
|
||||||
|
name: upload release to PyPI
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: pdm-project/setup-pdm@v3
|
||||||
|
|
||||||
|
- name: Publish package distributions to PyPI
|
||||||
|
run: pdm publish
|
29
.gitignore
vendored
29
.gitignore
vendored
@ -1,6 +1,10 @@
|
|||||||
.venv/
|
.venv/
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
.cache/
|
.cache/
|
||||||
|
|
||||||
|
venv/
|
||||||
|
|
||||||
node_modules/
|
node_modules/
|
||||||
data/
|
data/
|
||||||
db/
|
db/
|
||||||
@ -11,19 +15,23 @@ __pycache__/
|
|||||||
*.pyd
|
*.pyd
|
||||||
*.pyw
|
*.pyw
|
||||||
/plugins/
|
/plugins/
|
||||||
|
|
||||||
|
#config
|
||||||
|
config/
|
||||||
|
!config/default.yml
|
||||||
_config.yml
|
_config.yml
|
||||||
config.yml
|
config.yml
|
||||||
config.example.yml
|
config.example.yml
|
||||||
compile.bat
|
|
||||||
liteyuki/resources/templates/latest-debug.html
|
|
||||||
# vuepress
|
# vuepress
|
||||||
.github
|
.github
|
||||||
pyproject.toml
|
|
||||||
|
|
||||||
test.py
|
# mupy
|
||||||
line_count.py
|
mypy.ini
|
||||||
|
|
||||||
# nuitka
|
# nuitka
|
||||||
|
compile.bat
|
||||||
|
src/resources/templates/latest-debug.html
|
||||||
main.build/
|
main.build/
|
||||||
main.dist/
|
main.dist/
|
||||||
main.exe
|
main.exe
|
||||||
@ -35,3 +43,14 @@ prompt.txt
|
|||||||
|
|
||||||
# js
|
# js
|
||||||
**/echarts.js
|
**/echarts.js
|
||||||
|
.env
|
||||||
|
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
.pdm-python
|
||||||
|
.pdm-build
|
||||||
|
dist
|
||||||
|
|
||||||
|
doc
|
||||||
|
|
||||||
|
mkdoc2.py
|
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.11-bullseye
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python:3.10-slim-bullseye
|
||||||
|
|
||||||
ENV TZ Asia/Shanghai
|
ENV TZ Asia/Shanghai
|
||||||
|
|
||||||
|
31
EN.LICENSE
Normal file
31
EN.LICENSE
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
LSO license
|
||||||
|
LiteyukiStudio Opensource license
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Copyright © 2024 Snowykami
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Free to grant the same license-based rights to any person or organization who obtains a copy
|
||||||
|
|
||||||
|
including but not limited to using, copying, modifying, merging, publishing, distributing, sublicenseing, and/or selling copies of the software
|
||||||
|
|
||||||
|
This software and related documentation files (hereinafter referred to as "this software") are licensed in the same way as the base, and are released in the form of open source on the Internet or other media platforms
|
||||||
|
|
||||||
|
Everyone has the right to obtain a copy and obtain permission to distribute and/or use it in the above manner
|
||||||
|
|
||||||
|
However, when obtaining a copy, it is still necessary to pay attention to the following:
|
||||||
|
|
||||||
|
- The above copyright notice and this permission notice shall be included in a copy of the Software
|
||||||
|
- When using this software and its copies, it is still necessary to maintain the same form as the original
|
||||||
|
|
||||||
|
- When using this software, you still need to disclose the copy of this software under the same license:
|
||||||
|
- Do not profit from copies of this software in a non-original license without the permission of the original author
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
The software is provided as a "copy as is" without any warranty of any kind, either express or implied:
|
||||||
|
including but not limited to the warranty of merchantability, non-infringement for specific purposes
|
||||||
|
|
||||||
|
In any case, the author or copyright owner shall not be liable for any claims, damages, or other liabilities arising from the use of the software by the author or copyright owner, whether in contract litigation, infringement litigation, or other litigation. The author and its copyright owner have the right to refuse compensation for any losses caused by the user for personal reasons
|
44
LICENSE
44
LICENSE
@ -1,21 +1,31 @@
|
|||||||
MIT License
|
LSO license
|
||||||
|
LiteyukiStudio Opensource license
|
||||||
|
|
||||||
Copyright (c) 2024 Snowykami
|
---
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
版权所有 © 2024 Snowykami
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
---
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
免费向任何获得副本的人或组织授予以相同许可为基础的权利
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或出售软件的副本
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
本软件及相关文档文件(以下简称"本软件")在相同方式许可为基础, 以开源的形式发布于互联网抑或其他媒体介质平台
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
任何人都有权利获取副本并以上述方式获取许可传播和/或使用
|
||||||
|
|
||||||
|
但获取副本时仍需注意:
|
||||||
|
|
||||||
|
- 上述版权声明和本许可声明应包含在本软件的副本中
|
||||||
|
- 使用本软件及其副本时仍需保持与原有形式相同
|
||||||
|
|
||||||
|
- 在使用时仍需将本软件的副本以相同许可公开表现:
|
||||||
|
- 不得未经原作者允许将本软件的副本以非原许可的形式对外盈利
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
该软件按"原样"之副本提供,不提供任何形式的任意保证,明示或暗示:
|
||||||
|
包括但不限于适销性保证, 适用于特定目的非侵权
|
||||||
|
|
||||||
|
在任何情况下, 作者或版权所有者对任何非因作者或版权所有者使用该软件造成的索赔、损害或其他责任, 无论是在合同诉讼、侵权行为还是其他诉讼中都不具有责任, 作者及其版权所有者有权利驳回使用者因个人原因造成的任何损失之赔付
|
||||||
|
57
MIT-LSO-AGC.LICENSE
Normal file
57
MIT-LSO-AGC.LICENSE
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# 开源声明
|
||||||
|
|
||||||
|
MIT-LSO-AGC许可(cn)
|
||||||
|
本声明推荐Markdown格式阅读
|
||||||
|
|
||||||
|
## 版权声明
|
||||||
|
|
||||||
|
版权所有(c) 2024 Snowykami
|
||||||
|
|
||||||
|
## 开源许可声明
|
||||||
|
|
||||||
|
现授予任何人以同仓库许可的开源,包含:
|
||||||
|
本软件或本库和相关文档文件(以下简称“软件”)
|
||||||
|
|
||||||
|
在本软件或本库中不受限制,包括但不限于**非侵犯MIT-LSO-AGC许可**的:
|
||||||
|
- 使用
|
||||||
|
- 复制
|
||||||
|
- 修改
|
||||||
|
- 合并
|
||||||
|
- 发布
|
||||||
|
- 分发
|
||||||
|
- 再许可和/或受到许可的销售本软件的副本
|
||||||
|
|
||||||
|
并要求或强烈建议使用本软件或库时:
|
||||||
|
- 将上述版权声明和本许可声明包含在所有本软件或本库的副本或主要部分
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
本软件或本库按“原样”提供,不提供任何形式的、明确或隐含的,包括但不限于适销性保证,适合特定用途和非侵权性
|
||||||
|
|
||||||
|
## 责任声明
|
||||||
|
|
||||||
|
在任何情况下都不得在使用本软件或库时,在本协议许可的情况下,以损害或其他责任追责,无论是在合同诉讼、侵权行为或其他情况下,抑或是由以下原因引起:
|
||||||
|
由于或与本软件有关,或是使用,或其他交易
|
||||||
|
都与本软件,库作者无责任关系,非作者使用本软件或本库并造成任何损失的行为与作者无关
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## 搬运声明
|
||||||
|
|
||||||
|
在前提开源许可的基础上:
|
||||||
|
|
||||||
|
**未经允许不得**搬运至商业性平台**并且**进行**付费行为或疑似未得到许可的交易行为**
|
||||||
|
|
||||||
|
**不得**在搬运本仓库至**其他私有/公有开源镜像代码托管网站**时未经允许修改**任何**关于**原库的内容**
|
||||||
|
|
||||||
|
### 包括但不限于:
|
||||||
|
|
||||||
|
- 将`github`修改为`gitcode`
|
||||||
|
- 篡改外链网址
|
||||||
|
- 修改贡献者名单
|
||||||
|
- 未经原作者允许私自占有仓库并声明为自己所有
|
||||||
|
- 未经允许修改库原先所有的开源协议许可
|
||||||
|
等
|
||||||
|
|
||||||
|
---
|
18
README.md
18
README.md
@ -1,37 +1,37 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[//]: # (<img src="https://cdn.liteyuki.icu/static/img/logo.png" style="align-content: center; width: 50%; margin-top:10%;" alt="a">)
|
[//]: # (<img src="https://cdn.liteyuki.icu/static/svg/lylogo-full.svg" style="align-content: center; width: 50%; margin-top:10%;" alt="a">)
|
||||||
[![][banner]][lightyuki-link]
|
[![][banner]][lightyuki-link]
|
||||||
<h2><a href="https://bot.liteyuki.icu"> <span style="color: #a2d8f4">轻雪</span> <span style="color: #d0e9ff">6</span></a></h2>
|
<h2><a href="https://bot.liteyuki.icu"> <span style="color: #a2d8f4">轻雪</span> <span style="color: #d0e9ff">6</span></a></h2>
|
||||||
<h4> <span style="color: #a2d8f4">✨ 轻量,高效,易于扩展✨</span></h4>
|
<h4> <span style="color: #a2d8f4">✨ 轻量,高效,易于扩展✨</span></h4>
|
||||||
|
|
||||||
[![][OneBot]][onebot-link]
|
[![][OneBot]][onebot-link]
|
||||||
[![][Nonebot2]][nonebot-link]
|
[![][NoneBot2]][nonebot-link]
|
||||||
[![][Liteyuki6.0]][lightyuki-link]
|
[![][Liteyuki6.0]][lightyuki-link]
|
||||||
[![][Python3.10+]][python-link]
|
[![][Python3.10+]][python-link]
|
||||||
[![][Usage]][usage-link]
|
[![][Usage]][usage-link]
|
||||||
|
|
||||||
- 基于[Nonebot2](https://github.com/nonebot/nonebot2),有良好的生态支持
|
- 基于[Nonebot2](https://github.com/nonebot/nonebot2),有良好的生态支持
|
||||||
- 开箱即用,无需复杂配置
|
- 开箱即用,无需复杂配置
|
||||||
- 新的点击交互模式,拒绝手打指令
|
- 集成包管理器,支持一键安装插件
|
||||||
- 可视化插件管理包管理,支持一键安装插件
|
|
||||||
- 支持OneBot标准通信但不限于此
|
- 支持OneBot标准通信但不限于此
|
||||||
- 自定义主题支持,满足审美需求
|
- 自定义主题支持,满足审美需求
|
||||||
- 国际化支持,支持多种语言
|
- 国际化支持,支持多种语言
|
||||||
|
- 高性能,500插件2s内启动
|
||||||
|
|
||||||
<h3>👇所有内容已迁移至👇</h3>
|
<h3>👇更多内容请访问👇</h3>
|
||||||
<h2><a href="https://bot.liteyuki.icu">轻雪主页</a></h2>
|
<h2><a href="https://bot.liteyuki.icu">轻雪机器人主页</a></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### 感谢
|
### 感谢
|
||||||
- [Nonebot2](https://nonebot.dev)提供的框架支持
|
- [NoneBot2](https://nonebot.dev)提供的框架支持
|
||||||
- [nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender)提供的渲染功能
|
- [nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender)提供的渲染功能
|
||||||
- [nonebot-plugin-alconna](https://github.com/ArcletProject/nonebot-plugin-alconna)提供的命令解析功能
|
- [nonebot-plugin-alconna](https://github.com/ArcletProject/nonebot-plugin-alconna)提供的命令解析功能
|
||||||
|
|
||||||
|
|
||||||
[OneBot]: https://img.shields.io/badge/OneBot-11/12-blue?style=for-the-badge
|
[OneBot]: https://img.shields.io/badge/OneBot-11/12-blue?style=for-the-badge
|
||||||
|
|
||||||
[Nonebot2]: https://img.shields.io/badge/Nonebot-2-red?style=for-the-badge
|
[NoneBot2]: https://img.shields.io/badge/Nonebot-2-red?style=for-the-badge
|
||||||
|
|
||||||
[Liteyuki6.0]: https://img.shields.io/badge/Liteyuki-6.0-blue?style=for-the-badge
|
[Liteyuki6.0]: https://img.shields.io/badge/Liteyuki-6.0-blue?style=for-the-badge
|
||||||
|
|
||||||
@ -49,4 +49,4 @@
|
|||||||
|
|
||||||
[usage-link]:https://bot.liteyuki.icu/
|
[usage-link]:https://bot.liteyuki.icu/
|
||||||
|
|
||||||
[banner]: https://socialify.git.ci/snowykami/LiteyukiBot/image?description=1&forks=1&issues=1&Plus&pulls=1&stargazers=1&theme=Auto&logo=https%3A%2F%2Fcdn.liteyuki.icu%2Fstatic%2Fimg%2Flogo.png
|
[banner]: https://socialify.git.ci/LiteyukiStudio/LiteyukiBot/image?description=1&forks=1&issues=1&Plus&pulls=1&stargazers=1&theme=Auto&logo=https%3a%2f%2fcdn.liteyuki.icu%2fstatic%2fsvg%2flylogo-full.svg
|
||||||
|
8
config/default.yml
Normal file
8
config/default.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
nonebot:
|
||||||
|
host: 127.0.0.1
|
||||||
|
port: 20216
|
||||||
|
command_start: ["", "/"]
|
||||||
|
nickname: [ "liteyuki" ]
|
||||||
|
default_language: zh
|
||||||
|
driver: ~fastapi+~httpx+~websockets
|
||||||
|
alconna_use_command_start: true
|
@ -1,14 +1,21 @@
|
|||||||
import {defineClientConfig} from "vuepress/client";
|
import {defineClientConfig} from "vuepress/client";
|
||||||
import resourceStoreComp from "./components/res_store.vue";
|
|
||||||
import pluginStoreComp from "./components/plugin_store.vue";
|
import resourceStoreComp from "./components/ResStore.vue";
|
||||||
//导入element-plus
|
import pluginStoreComp from "./components/PluginStore.vue";
|
||||||
import ElementPlus from 'element-plus';
|
import dashComp from "./components/Dash.vue";
|
||||||
|
import homeComp from "./components/Home.vue";
|
||||||
|
import geoComp from "./components/Geo.vue";
|
||||||
|
|
||||||
|
// import ElementPlus from 'element-plus';
|
||||||
|
|
||||||
export default defineClientConfig({
|
export default defineClientConfig({
|
||||||
enhance: ({app, router, siteData}) => {
|
enhance: ({app, router, siteData}) => {
|
||||||
|
app.component("homeComp", homeComp);
|
||||||
|
app.component("dashComp", dashComp);
|
||||||
app.component("resourceStoreComp", resourceStoreComp);
|
app.component("resourceStoreComp", resourceStoreComp);
|
||||||
app.component("pluginStoreComp", pluginStoreComp);
|
app.component("pluginStoreComp", pluginStoreComp);
|
||||||
app.use(ElementPlus);
|
app.component("geoComp", geoComp);
|
||||||
|
// app.use(ElementPlus);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
38
docs/.vuepress/components/Dash.vue
Normal file
38
docs/.vuepress/components/Dash.vue
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import {ref} from "vue";
|
||||||
|
|
||||||
|
let total = ref(0);
|
||||||
|
let online = ref(0);
|
||||||
|
fetch("https://api.liteyuki.icu/count")
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
total.value = data.register;
|
||||||
|
})
|
||||||
|
.catch(err => console.error(err));
|
||||||
|
fetch("https://api.liteyuki.icu/online")
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
online.value = data.online;
|
||||||
|
})
|
||||||
|
.catch(err => console.error(err));
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="info-box">
|
||||||
|
<h1>Dashboard</h1>
|
||||||
|
<div class="info">
|
||||||
|
<div class="info-item">
|
||||||
|
<h2>Total</h2>
|
||||||
|
<p>{{ total }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<h2>Online</h2>
|
||||||
|
<p>{{ online }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
20
docs/.vuepress/components/Geo.vue
Normal file
20
docs/.vuepress/components/Geo.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<h2>地理分布</h2>
|
||||||
|
<p>数据来源于Liteyuki API</p>
|
||||||
|
</div>
|
||||||
|
<div id="main-chart" style="width: 100%; height: 600px;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#main-chart {
|
||||||
|
width: 100px;
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
|
</style>
|
10
docs/.vuepress/components/Home.vue
Normal file
10
docs/.vuepress/components/Home.vue
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
62
docs/.vuepress/components/PluginStore.vue
Normal file
62
docs/.vuepress/components/PluginStore.vue
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import {computed, ref} from 'vue'
|
||||||
|
import ItemCard from './PluginItemCard.vue'
|
||||||
|
|
||||||
|
|
||||||
|
let filteredItems = computed(() => {
|
||||||
|
if (!search.value) {
|
||||||
|
return items.value
|
||||||
|
}
|
||||||
|
return items.value.filter(item =>
|
||||||
|
item.name.toLowerCase().includes(search.value.toLowerCase()) ||
|
||||||
|
item.desc.toLowerCase().includes(search.value.toLowerCase()) ||
|
||||||
|
item.author.toLowerCase().includes(search.value.toLowerCase()) ||
|
||||||
|
item.module_name.toLowerCase().includes(search.value.toLowerCase())
|
||||||
|
)
|
||||||
|
})
|
||||||
|
// 插件商店Nonebot
|
||||||
|
let items = ref([])
|
||||||
|
let search = ref('')
|
||||||
|
// 从官方拉取
|
||||||
|
fetch("/assets/plugins.json")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
items.value = data
|
||||||
|
})
|
||||||
|
.catch(error => console.error(error))
|
||||||
|
|
||||||
|
//追加
|
||||||
|
fetch('https://registry.nonebot.dev/plugins.json')
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
items.value = items.value.concat(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="market">
|
||||||
|
<h1>插件商店</h1>
|
||||||
|
<p>内容来自<a href="https://nonebot.dev/store/plugins">NoneBot插件商店</a>和轻雪商店,在此仅作引用,具体请访问NoneBot插件商店</p>
|
||||||
|
<!-- 搜索框-->
|
||||||
|
<div class="search-box-div"><input class="item-search-box" type="text" placeholder="搜索插件" v-model="search"/></div>
|
||||||
|
<div class="items">
|
||||||
|
<!-- 使用filteredItems来布局商品 -->
|
||||||
|
<ItemCard v-for="item in filteredItems" :key="item.id" :item="item"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
h1 {
|
||||||
|
color: #00a6ff;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.items {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
53
docs/.vuepress/components/ResStore.vue
Normal file
53
docs/.vuepress/components/ResStore.vue
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import {computed, ref} from 'vue'
|
||||||
|
import ItemCard from './ResItemCard.vue'
|
||||||
|
import * as url from "node:url";
|
||||||
|
|
||||||
|
// 从public/assets/resources.json加载插件
|
||||||
|
let filteredItems = computed(() => {
|
||||||
|
if (!search.value) {
|
||||||
|
return items.value.reverse()
|
||||||
|
}
|
||||||
|
return items.value.filter(item =>
|
||||||
|
item.name.toLowerCase().includes(search.value.toLowerCase()) ||
|
||||||
|
item.description.toLowerCase().includes(search.value.toLowerCase()) ||
|
||||||
|
item.author.toLowerCase().includes(search.value.toLowerCase())
|
||||||
|
).reverse()
|
||||||
|
})
|
||||||
|
// 插件商店Nonebot
|
||||||
|
let items = ref([])
|
||||||
|
let search = ref('')
|
||||||
|
fetch("/assets/resources.json")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
items.value = data
|
||||||
|
})
|
||||||
|
.catch(error => console.error(error))
|
||||||
|
// 列表倒序
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="market">
|
||||||
|
<h1>主题/资源商店</h1>
|
||||||
|
<div class="search-box-div"><input class="item-search-box" type="text" placeholder="搜索资源" v-model="search" /></div>
|
||||||
|
<div class="items">
|
||||||
|
<!-- 使用filteredItems来布局商品 -->
|
||||||
|
<ItemCard v-for="item in filteredItems" :key="item.id" :item="item"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
h1 {
|
||||||
|
color: #00a6ff;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.items {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,39 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import {ref} from 'vue'
|
|
||||||
import ItemCard from './plugin_item_card.vue'
|
|
||||||
|
|
||||||
// 插件商店Nonebot
|
|
||||||
let items = ref([])
|
|
||||||
fetch('https://registry.nonebot.dev/plugins.json')
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
items.value = data
|
|
||||||
})
|
|
||||||
.catch(error => console.error(error))
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<h1>插件商店</h1>
|
|
||||||
<p>所有内容来自<a href="https://nonebot.dev/store/plugins">NoneBot插件商店</a>,在此仅作引用,具体请访问NoneBot插件商店</p>
|
|
||||||
<div class="market">
|
|
||||||
<!-- 布局商品-->
|
|
||||||
<ItemCard v-for="item in items" :key="item.id" :item="item"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
h1 {
|
|
||||||
color: #00a6ff;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.market {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,38 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import {ref} from 'vue'
|
|
||||||
import ItemCard from './res_item_card.vue'
|
|
||||||
|
|
||||||
// 从public/assets/resources.json加载插件
|
|
||||||
let items = ref([])
|
|
||||||
fetch('https://bot.liteyuki.icu/assets/resources.json')
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
items.value = data
|
|
||||||
})
|
|
||||||
.catch(error => console.error(error))
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<h1>主题/资源商店</h1>
|
|
||||||
<div class="market">
|
|
||||||
<!-- 布局商品-->
|
|
||||||
<ItemCard v-for="item in items" :key="item.id" :item="item" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
h1 {
|
|
||||||
color: #00a6ff;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.market {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -5,11 +5,29 @@ import viteBundler from "@vuepress/bundler-vite";
|
|||||||
export default defineUserConfig({
|
export default defineUserConfig({
|
||||||
base: "/",
|
base: "/",
|
||||||
|
|
||||||
|
locales: {
|
||||||
|
"/": {
|
||||||
|
// 设置正在使用的语言
|
||||||
lang: "zh-CN",
|
lang: "zh-CN",
|
||||||
title: "LiteyukiBot 轻雪机器人",
|
title: "LiteyukiBot 轻雪机器人",
|
||||||
description: "LiteyukiBot | 轻雪机器人 | An OneBot Standard ChatBot | 一个OneBot标准的聊天机器人",
|
description: "LiteyukiBot | 轻雪机器人 | An OneBot Standard ChatBot | 一个OneBot标准的聊天机器人",
|
||||||
|
head: [
|
||||||
|
["script", {"src": "/js/zh/get_data.js", "type": "module"}],
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/en/": {
|
||||||
|
// 设置正在使用的语言
|
||||||
|
lang: "en-US",
|
||||||
|
title: "LiteyukiBot",
|
||||||
|
description: "LiteyukiBot | An OneBot Standard ChatBot ",
|
||||||
|
head: [
|
||||||
|
["script", {"src": "/js/en/get_data.js", "type": "module"}],
|
||||||
|
]
|
||||||
|
},
|
||||||
|
},
|
||||||
head: [
|
head: [
|
||||||
// 设置 favor.ico,.vuepress/public 下
|
// 设置 favor.ico,.vuepress/public 下
|
||||||
|
["script", {src: "/js/style.js", "type": "module"}],
|
||||||
['link', {rel: 'icon', href: 'https://cdn.liteyuki.icu/favicon.ico'},],
|
['link', {rel: 'icon', href: 'https://cdn.liteyuki.icu/favicon.ico'},],
|
||||||
|
|
||||||
['link', {rel: 'stylesheet', href: 'https://cdn.bootcdn.net/ajax/libs/firacode/6.2.0/fira_code.min.css'}],
|
['link', {rel: 'stylesheet', href: 'https://cdn.bootcdn.net/ajax/libs/firacode/6.2.0/fira_code.min.css'}],
|
||||||
@ -23,7 +41,6 @@ export default defineUserConfig({
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
theme,
|
theme,
|
||||||
// 和 PWA 一起启用
|
// 和 PWA 一起启用
|
||||||
// shouldPrefetch: false,
|
// shouldPrefetch: false,
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
import {navbar} from "vuepress-theme-hope";
|
|
||||||
|
|
||||||
export default navbar([
|
|
||||||
"/",
|
|
||||||
{
|
|
||||||
text: "项目部署",
|
|
||||||
link: "/deployment/",
|
|
||||||
prefix: "deployment/",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "使用手册",
|
|
||||||
link: "/usage/",
|
|
||||||
prefix: "usage/",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "商店",
|
|
||||||
link: "/store/resource",
|
|
||||||
prefix: "store/",
|
|
||||||
}
|
|
||||||
]);
|
|
25
docs/.vuepress/navbar/en.ts
Normal file
25
docs/.vuepress/navbar/en.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import {navbar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
|
export const enNavbarConfig = navbar([
|
||||||
|
"/en/",
|
||||||
|
{
|
||||||
|
text: "Deploy",
|
||||||
|
link: "/en/deploy/",
|
||||||
|
prefix: "deploy/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Usage",
|
||||||
|
link: "/en/usage/",
|
||||||
|
prefix: "usage/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Extensions",
|
||||||
|
link: "/en/store/",
|
||||||
|
prefix: "store/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Contribute",
|
||||||
|
link: "/en/dev/",
|
||||||
|
prefix: "dev/",
|
||||||
|
},
|
||||||
|
]);
|
2
docs/.vuepress/navbar/index.ts
Normal file
2
docs/.vuepress/navbar/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from "./zh.js"
|
||||||
|
export * from "./en.js"
|
26
docs/.vuepress/navbar/zh.ts
Normal file
26
docs/.vuepress/navbar/zh.ts
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
import {navbar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
|
export const zhNavbarConfig = navbar([
|
||||||
|
"/",
|
||||||
|
{
|
||||||
|
text: "安装及部署",
|
||||||
|
link: "/deploy/",
|
||||||
|
prefix: "deploy/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "使用及功能",
|
||||||
|
link: "/usage/",
|
||||||
|
prefix: "usage/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "资源及插件",
|
||||||
|
link: "/store/",
|
||||||
|
prefix: "store/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "开发及贡献",
|
||||||
|
link: "/dev/",
|
||||||
|
prefix: "dev/",
|
||||||
|
},
|
||||||
|
]);
|
20
docs/.vuepress/public/assets/plugins.json
Normal file
20
docs/.vuepress/public/assets/plugins.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"module_name": "liteyukibot-plugin-nonebot",
|
||||||
|
"project_link": "liteyukibot-plugin-nonebot",
|
||||||
|
"name": "NoneBot插件",
|
||||||
|
"desc": "在轻雪中使用NoneBot,为NoneBot开发者提供了更多便捷功能(已内置)",
|
||||||
|
"author": "snowykami",
|
||||||
|
"homepage": "https://github.com/LiteyukiStudio/liteyukibot-plugin-nonebot",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"label": "server",
|
||||||
|
"color": "#aeeaa8"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"is_official": true,
|
||||||
|
"type": "application",
|
||||||
|
"valid": true,
|
||||||
|
"version": "rolling"
|
||||||
|
}
|
||||||
|
]
|
@ -3,8 +3,7 @@
|
|||||||
"name": "KawaiiStatus",
|
"name": "KawaiiStatus",
|
||||||
"author": "SnowyKami",
|
"author": "SnowyKami",
|
||||||
"description": "可爱的状态卡片,仿照koishi的制作",
|
"description": "可爱的状态卡片,仿照koishi的制作",
|
||||||
"link": "https://cdn.liteyuki.icu/static/lrp/KawaiiStatus.zip",
|
"link": "https://cdn.liteyuki.icu/static/lrp/KawaiiStatus.zip"
|
||||||
"icon": "https://cdn.jsdelivr.net/gh/SnowyKami/CDN/img/KawaiiStatus.png"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MiSans字体包",
|
"name": "MiSans字体包",
|
||||||
@ -25,15 +24,33 @@
|
|||||||
"link": "https://cdn.liteyuki.icu/static/lrp/HomoTheme.zip"
|
"link": "https://cdn.liteyuki.icu/static/lrp/HomoTheme.zip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "示例包2",
|
"name": "自定义设备信息",
|
||||||
"author": "SnowyKami",
|
"author": "SnowyKami",
|
||||||
"description": "A simple bot that shows the status of the bot and the server.",
|
"description": "自定义服务端的设备信息,自行修改使用",
|
||||||
"link": ""
|
"link": "https://cdn.liteyuki.icu/static/lrp/custom-device.zip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "示例包3",
|
"name": "轻雪傲娇系词库",
|
||||||
"author": "SnowyKami",
|
"author": "SnowyKami",
|
||||||
"description": "A simple bot that shows the status of the bot and the server.",
|
"description": "使用https://github.com/Kyomotoi/AnimeThesaurus的词库",
|
||||||
"link": ""
|
"link": "https://cdn.liteyuki.icu/static/lrp/liteyuki_words_aojiao.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "轻雪可爱系词库",
|
||||||
|
"author": "SnowyKami",
|
||||||
|
"description": "使用https://github.com/Kyomotoi/AnimeThesaurus的词库",
|
||||||
|
"link": "https://cdn.liteyuki.icu/static/lrp/liteyuki_words_kawaii.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "轻雪Kakyo语言包",
|
||||||
|
"author": "Nanaloveyuki",
|
||||||
|
"description": "Liteyuki Bot的语言包,用于提供多种语言的翻译。",
|
||||||
|
"link": "https://github.com/Nanaloveyuki/liteyuki-langpack/releases/download/KakyoVer/Kakyo-pack.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "更多背景模板包",
|
||||||
|
"author": "snowykami",
|
||||||
|
"description": "自定义各种卡片的背景",
|
||||||
|
"link": "https://cdn.liteyuki.icu/static/lrp/morebg.zip"
|
||||||
}
|
}
|
||||||
]
|
]
|
291
docs/.vuepress/public/full.svg
Normal file
291
docs/.vuepress/public/full.svg
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1366 768">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.cls-1 {
|
||||||
|
fill: url(#_未命名的渐变_8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-1, .cls-2, .cls-3, .cls-4, .cls-5, .cls-6, .cls-7, .cls-8, .cls-9, .cls-10, .cls-11, .cls-12, .cls-13, .cls-14, .cls-15, .cls-16, .cls-17, .cls-18, .cls-19, .cls-20, .cls-21, .cls-22, .cls-23, .cls-24, .cls-25, .cls-26, .cls-27, .cls-28, .cls-29, .cls-30, .cls-31, .cls-32, .cls-33, .cls-34 {
|
||||||
|
stroke-width: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-2 {
|
||||||
|
fill: url(#_未命名的渐变_9-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-3 {
|
||||||
|
fill: url(#_未命名的渐变_11);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-4 {
|
||||||
|
fill: url(#_未命名的渐变_11-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-5 {
|
||||||
|
fill: url(#_未命名的渐变_5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-6 {
|
||||||
|
fill: url(#_未命名的渐变_55);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-7 {
|
||||||
|
fill: url(#_未命名的渐变_11-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-8 {
|
||||||
|
fill: url(#_未命名的渐变_65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-9 {
|
||||||
|
fill: url(#_未命名的渐变_3-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-10 {
|
||||||
|
fill: url(#_未命名的渐变_7-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-11 {
|
||||||
|
fill: url(#_未命名的渐变_7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-12 {
|
||||||
|
fill: url(#_未命名的渐变_58);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-13 {
|
||||||
|
fill: url(#_未命名的渐变_3-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-14 {
|
||||||
|
fill: url(#_未命名的渐变_67);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-15 {
|
||||||
|
fill: url(#_未命名的渐变_11-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-16 {
|
||||||
|
fill: url(#_未命名的渐变_72);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-17 {
|
||||||
|
fill: url(#_未命名的渐变_71);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-18, .cls-35 {
|
||||||
|
fill: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-19 {
|
||||||
|
fill: url(#_未命名的渐变_4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-20 {
|
||||||
|
fill: url(#_未命名的渐变_3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-21 {
|
||||||
|
fill: url(#_未命名的渐变_240);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-22 {
|
||||||
|
fill: url(#_未命名的渐变_9-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-23 {
|
||||||
|
fill: url(#_未命名的渐变_6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-24 {
|
||||||
|
fill: url(#_未命名的渐变_9-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-25 {
|
||||||
|
fill: url(#_未命名的渐变_66);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-26 {
|
||||||
|
fill: url(#_未命名的渐变_7-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-35 {
|
||||||
|
stroke: #fff;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-27 {
|
||||||
|
fill: url(#_未命名的渐变_9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-28 {
|
||||||
|
fill: url(#_未命名的渐变_9-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-29 {
|
||||||
|
fill: url(#_未命名的渐变_68);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-30 {
|
||||||
|
fill: url(#_未命名的渐变_11-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-31 {
|
||||||
|
fill: url(#_未命名的渐变_69);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-32 {
|
||||||
|
fill: #9cf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-33 {
|
||||||
|
fill: url(#_未命名的渐变_58-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-34 {
|
||||||
|
fill: url(#_未命名的渐变_4-2);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<linearGradient id="_未命名的渐变_11" data-name="未命名的渐变 11" x1="445.89" y1="235.02" x2="528.25" y2="235.02" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#73fff1"/>
|
||||||
|
<stop offset="1" stop-color="#5cefff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_11-2" data-name="未命名的渐变 11" x1="549.98" y1="292.99" x2="584.05" y2="292.99" xlink:href="#_未命名的渐变_11"/>
|
||||||
|
<linearGradient id="_未命名的渐变_11-3" data-name="未命名的渐变 11" x1="553" y1="212" x2="585" y2="212" xlink:href="#_未命名的渐变_11"/>
|
||||||
|
<linearGradient id="_未命名的渐变_11-4" data-name="未命名的渐变 11" x1="609.82" y1="260.3" x2="698.34" y2="260.3" xlink:href="#_未命名的渐变_11"/>
|
||||||
|
<linearGradient id="_未命名的渐变_11-5" data-name="未命名的渐变 11" x1="702.75" y1="282.24" x2="784.94" y2="282.24" xlink:href="#_未命名的渐变_11"/>
|
||||||
|
<linearGradient id="_未命名的渐变_240" data-name="未命名的渐变 240" x1="835" y1="294" x2="960" y2="294" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#eadeff"/>
|
||||||
|
<stop offset=".28" stop-color="#e0efff"/>
|
||||||
|
<stop offset=".43" stop-color="#d9ecff"/>
|
||||||
|
<stop offset=".59" stop-color="#aedbff"/>
|
||||||
|
<stop offset="1" stop-color="#00d7ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_9" data-name="未命名的渐变 9" x1="664.92" y1="424.34" x2="766.76" y2="424.34" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#2ebbff"/>
|
||||||
|
<stop offset="1" stop-color="#006bff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_9-2" data-name="未命名的渐变 9" x1="761.74" y1="467.72" x2="842.05" y2="467.72" xlink:href="#_未命名的渐变_9"/>
|
||||||
|
<linearGradient id="_未命名的渐变_9-3" data-name="未命名的渐变 9" x1="951.96" y1="394" x2="977.04" y2="394" xlink:href="#_未命名的渐变_9"/>
|
||||||
|
<linearGradient id="_未命名的渐变_9-4" data-name="未命名的渐变 9" x1="952.19" y1="456.86" x2="977.56" y2="456.86" xlink:href="#_未命名的渐变_9"/>
|
||||||
|
<linearGradient id="_未命名的渐变_9-5" data-name="未命名的渐变 9" x1="848.96" y1="437.15" x2="934.09" y2="437.15" xlink:href="#_未命名的渐变_9"/>
|
||||||
|
<linearGradient id="_未命名的渐变_4" data-name="未命名的渐变 4" x1="418.01" y1="402.81" x2="470.25" y2="402.81" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#6445ff"/>
|
||||||
|
<stop offset="1" stop-color="#5c86ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_4-2" data-name="未命名的渐变 4" x1="445.81" y1="464.45" x2="466.06" y2="464.45" xlink:href="#_未命名的渐变_4"/>
|
||||||
|
<linearGradient id="_未命名的渐变_72" data-name="未命名的渐变 72" x1="634.1" y1="393.61" x2="649.62" y2="390.81" gradientTransform="translate(-320.36 273.4) rotate(-11.09) scale(1.44 .77)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#c4aeff"/>
|
||||||
|
<stop offset=".43" stop-color="#ce9fff"/>
|
||||||
|
<stop offset=".55" stop-color="#af8eff"/>
|
||||||
|
<stop offset=".72" stop-color="#7d74ff"/>
|
||||||
|
<stop offset=".9" stop-color="#6333ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_58" data-name="未命名的渐变 58" x1="620.28" y1="400.01" x2="636.02" y2="397.18" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#b1ccff"/>
|
||||||
|
<stop offset=".34" stop-color="#b8c0ff"/>
|
||||||
|
<stop offset=".94" stop-color="#cba2ff"/>
|
||||||
|
<stop offset="1" stop-color="#ce9fff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_3" data-name="未命名的渐变 3" x1="469.91" y1="455" x2="478" y2="455" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#5c86ff"/>
|
||||||
|
<stop offset="1" stop-color="#64a2ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_3-2" data-name="未命名的渐变 3" x1="470.95" y1="475.89" x2="477.01" y2="475.89" xlink:href="#_未命名的渐变_3"/>
|
||||||
|
<linearGradient id="_未命名的渐变_65" data-name="未命名的渐变 65" x1="485.09" y1="467.16" x2="502.74" y2="469.91" gradientTransform="translate(-109.75 153.43) rotate(-15.93)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset=".11" stop-color="#64a2ff"/>
|
||||||
|
<stop offset=".28" stop-color="#62a6ff"/>
|
||||||
|
<stop offset="1" stop-color="#5cb5ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_66" data-name="未命名的渐变 66" x1="506.01" y1="471.79" x2="532.2" y2="471.17" gradientTransform="translate(117.47 -103.02) rotate(12.81)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#5cb5ff"/>
|
||||||
|
<stop offset="1" stop-color="#74e0ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_68" data-name="未命名的渐变 68" x1="559.81" y1="469.17" x2="583.24" y2="468.62" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#9cd1ff"/>
|
||||||
|
<stop offset="1" stop-color="#bae0ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_71" data-name="未命名的渐变 71" x1="584.93" y1="460.83" x2="609.05" y2="460.83" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#a6d3ff"/>
|
||||||
|
<stop offset=".7" stop-color="#b1ccff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_58-2" data-name="未命名的渐变 58" x1="605.79" y1="473.79" x2="643.63" y2="466.98" xlink:href="#_未命名的渐变_58"/>
|
||||||
|
<linearGradient id="_未命名的渐变_3-3" data-name="未命名的渐变 3" x1="479.91" y1="397.6" x2="514.17" y2="397.6" xlink:href="#_未命名的渐变_3"/>
|
||||||
|
<linearGradient id="_未命名的渐变_5" data-name="未命名的渐变 5" x1="525.59" y1="402.28" x2="558.08" y2="402.28" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#64a2ff"/>
|
||||||
|
<stop offset="1" stop-color="#5cc9ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_69" data-name="未命名的渐变 69" x1="583.43" y1="398.41" x2="604.15" y2="398.41" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#84c9ff"/>
|
||||||
|
<stop offset=".42" stop-color="#b1ccff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_67" data-name="未命名的渐变 67" x1="531.83" y1="464.83" x2="558.02" y2="464.22" gradientTransform="translate(-86.67 132.78) rotate(-12.37)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#74e0ff"/>
|
||||||
|
<stop offset=".56" stop-color="#8dd6ff"/>
|
||||||
|
<stop offset="1" stop-color="#9cd1ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_6" data-name="未命名的渐变 6" x1="531" y1="411" x2="539" y2="411" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#64a2ff"/>
|
||||||
|
<stop offset="1" stop-color="#5cbfff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_7" data-name="未命名的渐变 7" x1="553.98" y1="380.5" x2="559" y2="380.5" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#64ccff"/>
|
||||||
|
<stop offset="1" stop-color="#84c9ff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_7-2" data-name="未命名的渐变 7" x1="546.98" y1="383.5" x2="552" y2="383.5" xlink:href="#_未命名的渐变_7"/>
|
||||||
|
<linearGradient id="_未命名的渐变_7-3" data-name="未命名的渐变 7" y1="404.39" x2="561.98" y2="404.39" xlink:href="#_未命名的渐变_7"/>
|
||||||
|
<linearGradient id="_未命名的渐变_8" data-name="未命名的渐变 8" x1="578.42" y1="391.26" x2="586.42" y2="391.26" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset=".01" stop-color="#84c9ff"/>
|
||||||
|
<stop offset="1" stop-color="#b1ccff"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="_未命名的渐变_55" data-name="未命名的渐变 55" x1="623.35" y1="385.26" x2="623.75" y2="385.26" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#b1c9ff"/>
|
||||||
|
<stop offset=".42" stop-color="#b1ccff"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g id="_图层_3" data-name="图层 3">
|
||||||
|
<path class="cls-32" d="m447,485c11.04,8.56,30.35.82,33,0,14.37-4.43,15.38-15.33,26-15,10.44.33,13.16,10.98,24,10,6.48-.59,7.04-4.53,16-6,8-1.31,8.66,1.66,17,1,12.76-1.01,15.73-8.33,24-6,8.42,4.47,11.58,6.51,22,5,0,0,11.3-1.75,32-10,1.42-9.07,4.72,6.12,11.99,12,10.1,9.09,19.95-.4,31,8,10.86,8.26,13.5,26.66,13,31-1.65,4.39,6.37,10.16,6,10-4.41-.77-20.72-10.82-25-11-6.8-1.26-15.53-2.26-24-5-17.1-5.24-15.17-10.82-34-10-7.53.04-6.69-.47-12,1-2.54-.23-9.74.73-13-1-18.29-11.87-9.94,11.78-36,3-9.47,1.86-14.72.65-18.02-1.12-2.21-1.19-4.61-5.33-6.74-4.61-.57.19-.74.58-2.24,1.74-1.2.93-2.27,1.58-3,2-.91.36-1.91.7-3,1-2.93.8-5.59,1.02-7.75,1.02-.74,0-1.87-.01-3.25-.02-3.97,0-3.61.03-4,0-2.87-.21-3.75-.93-7-1-.42,0-.77,0-1,0h-6c-3,.22-5.39.65-7,1-1.72.37-3.36.82-10,3-3.07,1.01-4.59,1.59-6,2-1.81.53-5.13,1.49-9,2-5.07.67-9,.3-12,0-6.54-.65-11.56-2.18-14-3-4.6-1.55-26.12-13.37-20-10,0,0,0,0,0,0-.03-.02-20.88-13.37-28-32-1.09-2.85-2-6-2-6-.52-1.8-1.44-5.03-2-9-.44-3.12-1.34-9.53,0-10,1.69-.59,6.23,8.51,7.27,10.48,5.15,9.76,18.12,22.54,52.73,35.52Z"/>
|
||||||
|
<path class="cls-32" d="m633,394c-13.63,7.43-2.93,57.29,2,57,1.82-.11,1.13-6.97,8-16,3-3.94,3.81-3.37,5-6,.88-3.8,2.06-11.66-2-19-.61-1.11-1.29-2.11-2-3-.31-.36-.8-1.04-1-2-.06-.32-.19-.91,0-1,.26-.13.82.87,2,2,.84.81,1.71,1.61,3,2,1.06.32,1.94.17,3,0,1.38-.23,2.37-.69,3-1,1.31-.64,2.25-1.09,3-2,1.84-2.22,1.14-5.41,1-6-.33-1.36-.69-1.29-2-4-.87-1.8-.57-1.55-2-5-.49-1.19-1-2.79-2-6-.12-.39-.37-1.22,0-2,0,0,.29-.6,1-1,1.98-1.11,11.6.55,15,1,2.66.35,13.92,1.61,15.83,2.95.42.3.8.64,1.17,1.05,2.43,2.73.93,4.31,3,9,3.83,8.69,13.16,12.57,19,15,5.09,2.12,8.54,2.5,13,3,6.22.69,7.53-.22,8-1,.74-1.23-.27-2.7-1-5-1.53-4.78-.3-8.09,0-12,.51-6.64-1.77-13.74-4-17-9.26-13.54-41.29,4.77-71-2-1.28-.29-9.89-2.3-12,1-1.87,2.94,2.99,7.55,1,12-1.49,3.33-5.5,3.63-8,5Z"/>
|
||||||
|
<path class="cls-32" d="m683,228c-22.42,19.49,74.7,203.11,32,245-9.08,8.91-26.9,13.94-28,28-.65,8.33,4.78,18.3,13,23,13.88,7.94,28.83,2.05,33-1,2.68-1.96,4-4,4-4,1.44-2.22,1.56-3.91,3-8,.76-2.17,1.5-3.9,2-5,.43-1.13.95-2.86,1-5,.04-1.88-.32-2.29-.25-4.13.04-1.01.22-5.22,2.25-5.87.27-.09,1.3-.35,3,1-.17-.41-.33-.87-.21-.95.24-.16,1.16,1.42,2.21,1.95,2.87,1.44,7.56-.07,8-2-10.79-5.85-14.4-6.84-15-6-.79,1.11,3.49,5.56,3,6-.37.33-3.05-1.93-3-2,.05-.07,3.08,1.97,4,3,.08.09.44.51,1,1,.23.2.43.36.55.46.1.12.26.31.45.54,2.9,3.62,4.2,7.01,4.62,8.05.92,2.28,2.67,5.77,6.38,10.95,15.05,16.54,34.83,19.18,54,9,16.33,3.81,7.85,10.54,33,5,25.9-4.5,50.39,1.98,49-25-1.26-10.66-5.86-19.02,0-10,8.68,14.17,21.69,39.51,43,27,6.44-4.99,5.9-9.29,8-16,1.22-1.48,4.53-4.38,6-4,.01.08.16,1-.41,1.5-.6.53-1.8.43-2.59-.5,2.97,10.52,12.31,17.02,21,16,7.93-.94,13.74-10.13,14.27-11.06.54-.96.98-1.97.98-1.97s.41-.95.75-1.97c1.19-3.64,1.46-7.4,1.46-7.4.88-11.86.98-15.27.98-15.27.35-11.02.5-9.78.67-17.66.19-8.34-.04-7.03.13-13.62,0,0,.55-21.79-3.25-26.05-.48-.54-1-1-1-1-1.02-.91-1.79-1.28-3-2,0,0-1-.67-3-2-1-.67-2.08-1.22-3-2-1.25-1.06-1.85-1.94-3-2-.39-.02-.52.07-1,0-1.2-.18-1.99-1.02-2-1-.02.03.5.41,3,2,.1-.62,1.27-2.67,2-3,5.54-4.98,5.58-5.38,8-10,6.12-15.03-2.92-19.21-14-26-1.23-1.16-1.87-.9-3-1-.59-2.25-2.17-3.18-3-6-1.01-2.71-2.29-10.67-2-12,.57-5.41,2.39-8.84,4-11,2.1-2.82,3.85-3.49,6-7,1.22-2,2.84-4.65,3-8,.25-5.38-3.39-9.63-8-15-2.47-2.87-5.06-5.17-6-6-2.42-2.13-4.22-3.42-5-4-5.14-3.8-8.31-10.94-9.7-14.15-5.32-12.26-7.9-23.86-8.3-32.85-1.17-26.5-38.54-51.77-63-35-7.04,5.65-2.81,10.14-11,18-10.42,10-22.57,7.8-34,13-5.71,3.43-10.18.22-16-2-9.95-3.09-18.5-13.48-24-22-1.52-1.57-3.98-3.73-7.79-5.64-30.14-4.8-47.97-7.45-51.21-7.36-.78.02-4.27.18-7.57-1.74-7.85-9.54-30.21,6.06-40.43,13.74Z"/>
|
||||||
|
<path class="cls-32" d="m667,174c-4.66.36-8.11,1.64-10.79,3.57-13.35,9.62-7.67,24.47-21.35,37.56-3.88,3.71-4.86,2.87-33.86,12.87-.06.02-2.46.85-4,0-.23-.13-.75-.41-1-1-.23-.54-.15-1.16-.12-1.33.02-.16.09-.51.12-.67h0c1.24-1.71,8.11-11.55,4.97-21.02-3.76-11.34-20.93-19.28-39.97-12.98-12.11,2.27-15.97.27-17.33-1.85-1.94-3.02.84-6.86,5.33-19.16,3.86-10.58,5.89-16.13,6-22,.1-5.49-1.43-13.73-10-24-23.21-14.8-47-13.43-56-2-1.46,1.85-5.64,7.92-4,20-3.3,4.02-9.31,1.14-20,4-10.63,1.96-20.69,9.46-13,23,5.63,9.91,94.53,145.36,192.09,115.49,50.17-15.36,72.52-65.2,72.91-66.49.03-.1.51-1.68,0-2-.15-.1-.3-.03-1,0h-3c-1.55,0-3.44-.77-4-1-.5-.2-1.8-.75-5-3-1.04-.73-2.42-1.73-4-3-3.1-.72-4.4-1.96-5-3-.3-.52-.38-.9-1-2-1.21-2.14-1.61-1.92-2-3-.34-.93-.04-1.09,0-5,0-.35,0-.06,0-2,0-3.6.02-3.67,0-4-.12-1.85-.9-3.16-2-5-2.63-4.41-6.25-6.57-7-7-1.67-.96-2.99-1.38-5-2-2.56-.79-6.28-1.69-11-2Z"/>
|
||||||
|
</g>
|
||||||
|
<g id="_背景" data-name="背景">
|
||||||
|
<path class="cls-18" d="m572,182c-16.42-3.08-26.21,8.1-31,4-7.63-6.54,18.33-33.97,9-55-6.88-15.51-30.12-21.13-45-21-3.33.03-16.49.44-31,9-30.76,18.15-37.62,55.27-56,109-20.03,58.55-43.71,77.3-45,119-.4,13.04.88,31.37,1,33,2.91,40.64,9.7,47.97,12,64,.27,1.85.98,7.34,5,12,.83.96,1.59,1.64,2.01,2,.47.48,1.15,1.18,1.99,2,10.84,10.63,27.33,20.18,27.33,20.18,17.89,10.12,26.84,15.18,35.66,13.82,3.19-.49,6.88-1.68,16.62-3.27,3.46-.56,6.46-.79,12.39-1.73,3.95-.63,7.36-.89,10-1,3.64-.15,6.36-.03,7,0,4.66.22,8.01.84,9,1,3.81.61,10.14.32,21-4,3.96.13,4.67,2.49,9,4,4.59,1.6,5.73-.37,15,0,16.7,2.72,12.4-.95,25-4,5.48-.56,5.78,1.97,14,3,9.86,2.45,36.35-8.51,48,1,6.44,5.27,9.1,4.24,16,6,7.05,3.78,15.85,4.35,23,8,18.2,11.17,34.14,20.96,51,2,5.59-6.98,3.83-12.43,8-14,7.13-2.81,31.59,30.21,58,23,15.36-6.57,13.31-4.51,28,1,5.68,1.04,23.32-3.84,33-4,12.6-.87,15.51.92,21-2,11.5-6.32,8.35-12.82,9-21,6.52,3,17.82,31.94,43,18,6.28-4.14,7.41-10.27,11-10,3.81.29,3.43,7.28,9,11,7.22,4.82,20.84,1.79,26-6,1.88-2.84,1.95-5.28,2-16,.06-12.86,2.5-34.29,1-57-.27-4.14-.62-6.12-2-8-1.81-2.47-4.68-3.81-7.73-8.57-.11-.18-.21-.33-.27-.43,0-.08-.02-.19-.02-.33.03-1.6,1.77-2.75,2.36-3.17,1.19-.85,2.8-2.4,4.66-5.5,10.77-33.99-34.41-21.61-20-59,3.12-6.89,6.55-6.37,8-12,2.32-9.04-4.5-18.26-8-23-5.99-8.1-8.37-6.45-17-17-2.93-3.58-6.84-8.36-9.5-15.5-2.32-6.24-2.48-11.05-2.5-12.5,0-.42,0-.77,0-1,.13-4.73-.28-14.34-6-24-8.66-14.64-25.27-22.26-40-22-22.75.41-39.01,19.59-41,22-4.52,5.48-5.53,9.19-11,12-8.17,4.19-19.82,3.24-29-1-1.04-.48-1.78-.88-2-1-13.03-7.1-12.62-18.04-23-25-.78-.52-2.86-1.85-9.5-3.93-18.42-5.77-40.67-7.51-55.5-8.07-1.93.07-4.76-.05-8-1-3.67-1.08-6.36-2.77-8-4-5.34-3.78-6.82-2.84-9-5-3.59-3.56.14-10.39-3-17-2.84-5.97-10.15-7.96-14-9-2.47-.67-11.2-2.68-20,2-1.88,1-6.08,3.3-9,8-2.37,3.82-1.56,5.46-4,14-2.08,7.28-3.18,10.97-6,13-1.17.85-5.1,3.27-13,1-3.07-.18-7.45,0-12,2-8.86,3.88-12,11.82-14,11-2.79-1.15,5.52-15.64,0-28-5.58-12.5-22.22-15.85-23-16Z"/>
|
||||||
|
<g id="_主体" data-name="主体">
|
||||||
|
<path id="lite-l" class="cls-3" d="m516,141c.03-1.1-.07-2.97-1-5-.89-1.93-2.11-3.1-2.75-3.7-.4-.38-1.57-1.42-3.37-2.29-1.11-.53-2.12-.83-2.88-1.01-.48,0-1.16,0-1.98.04-1.4.09-4.59.32-7.8,1.81-3.86,1.79-6.04,4.59-7.21,6.15-1.03,1.36-.93,1.77-4,8-1.08,2.19-1.79,3.57-2,4-5.9,11.79-12,35-12,35-7.65,29.08-7.7,25.76-12,44-2.8,11.87-4.71,21.49-6,28-.61,3.07-2.21,11.25-4,22,0,0-1.57,9.87-3,30-.1,1.34-.46,7.05,1,14,.85,4.05,3,8,3,8h0c2.28,2.98,4.52,4.83,5.99,5.89,11.06,8,23.32,4.35,57.01,4.11,3.06-.02,5.53-.01,7,0,1.02-.28,2.51-.84,4-2,.52-.41,1.27-1.06,2-2,.45-.58,1.59-1.91,2-4,.21-1.08.43-2.87,0-5-.36-1.17-.7-2.18-1-3-.3-.83-.53-1.39-1-2-.36-.46-.73-.79-1-1-.24-.23-.76-.76-1-1-1.73-1.73-1.87-1.87-2-2-1.25-1.2-2.82-1.65-4-2-5.84-1.71-23-2-23-2-4.12-.07-10.14-.62-17.53-2.99,1.73-17.19,5.56-49.39,13.31-81.46,4.95-20.51,4.35-18.09,8.22-30.55,5.85-18.81,8.77-28.22,11-34,0,0,3.24-8.41,4.63-15.69.44-2.32.84-4.8.84-4.8.18-1.17.35-2.34.53-3.5Z"/>
|
||||||
|
<path id="lite-i-1" class="cls-15" d="m569,240c4.11.31,6.91,2.96,8,4,6.83,6.48,6.93,17.68,7,26,0,.06,0,.03,0,7,0,14.32,0,21.48,0,22,.04,13.27.66,35.34-4,42-1.29,1.84-3,3-3,3-2.97,2.01-6.17,1.99-8,2-1.45,0-7.74-.12-13-5-6.34-5.87-6.06-13.87-6-15,0-.07,0-9.93,0-10,0-38.04,0-37.85,0-38-.02-1.29-.01-3.53,0-8,.03-9.9.15-12.06,1-15,1.28-4.42,3.15-6.95,4-8,1.1-1.36,2.19-2.34,3-3,.7-.58,1.7-1.32,3-2,.98-.52,4.28-2.28,8-2Z"/>
|
||||||
|
<path id="lite-i-1-1" class="cls-30" d="m566.78,196.07c8.85-.96,18.71,7.52,18.2,17.09-.5,9.28-10.62,16.63-19.33,14.46-6.93-1.73-13.7-9.65-12.51-18.4,1.06-7.79,7.93-12.52,13.65-13.14Z"/>
|
||||||
|
<path id="lite-t" class="cls-4" d="m643,219c-5.46,4.9-13.26-2.45-24,3-1.76.89-7.94,4.02-9,10-.72,4.08.94,7.61,1.38,8.43.48.92,2.17,4.11,5.62,5.57,1.09.46,1.2.26,6,1,5.06.78,4.17.82,6,1,2.02.19,4,.68,6,1,.54.09,1.55.25,2,1,.42.71.13,1.6,0,2-.61,1.93-.44,4.05-1,6-1.01,3.51-.87,8.39-1,13-.29,10.62-1.82,12.94-2,20-.11,4.19-.42,18.97,9,31,1.49,1.9,10.06,12.84,21,12,1.28-.1,5.89-.45,9-4,4.48-5.11,2.13-12.61,2-13-1.5-4.54-4.19-4.73-8-10-4-5.53-5.15-11-6-15-1.67-7.89-.83-14.05,0-20,1.22-8.76,3.02-10.14,4-16,.13-.81.46-2.94,2-5,0,0,.85-1.13,2-2,2.17-1.64,8.68-.49,12.72-.42,3.25.06,5.06.09,7.28-.58,1.17-.35,8.31-2.66,10-9,1.37-5.14-1.51-11.55-6-14-3.8-2.07-12.48-2.26-15-3-1.03-.3-1.9-.93-2-1-.47-.34-.82-.6-1-1-.56-1.23.89-2.87,1-3,.54-.96,1.27-2.32,2-4,1.51-3.46,2.99-6.85,3-11,0-1.91.01-6.19-3-10-3.3-4.17-8.02-4.99-9.42-5.24-.92-.16-6.37-1-11.58,2.24-1.61,1-4.15,3-7,9-5.75,12.08-1.75,17.18-6,21Z"/>
|
||||||
|
<path id="lite-e" class="cls-7" d="m735,276c-.58.39-5.22,3.65-5,8,.19,3.92,4.21,6.49,5,7,5.42,3.48,9.31.51,25-1,10.15-.98,16.08-.47,21-5,1.89-1.74,2.72-3.39,3-4,2.32-5.01-.29-10.09-1-14-1.83-10.01-12.11-17.03-15-19-1.39-.95-8.43-5.63-19-7-4.47-.58-13.46-1.75-23,3-8.94,4.45-13.31,11.6-16,16-5.84,9.56-6.79,18.48-7,21-.4,4.87-1.09,14.86,5,25,4.96,8.26,11.87,12.39,15,14,8.24,4.25,15.6,4.12,23,4,9.99-.17,16.58-2.61,23-5,2-.74,5.17-2.02,8-5,1.68-1.77,4.08-4.29,4-8-.07-3.36-2.16-6.53-5-8-2.95-1.53-5.9-.81-9,0-6.07,1.58-6.81,4.01-12,6-6.49,2.49-12.52,1.46-15,1-3.77-.69-9.81-1.81-14-7-3.24-4.01-3.72-8.41-4-11-.26-2.43-1.1-10.07,4-17,.43-.59,7.21-9.48,18-9,1.43.06,9.65.59,14,7,1.16,1.71,2.94,4.33,2,6-2.22,3.93-15.76-4.29-25,2Z"/>
|
||||||
|
<path id="logo-snow" class="cls-21" d="m875,272l13.33,22,9.67-15-8-20,4-6,6,2,9,13,7-11,9,1,3,7-11,13,17,2,4,8-5,4-22-4-13.5,16.8,27.5,5.2,11-14,7,1,3,7-9,11,19,3,4,7-4,5-18-3,7,14-4,4-8-1-10-20-40-8-2-2-20-37-23-4-3-7,4-5,16,3-9-15,4-6,7,1,9,16,9-10,7,2,3,6-10,14Z"/>
|
||||||
|
<path id="yuki-y" class="cls-27" d="m717,426c-18.61-18.39-62.05-50.01-50-71,2.85-4.5,7.34-9.45,17-7,15.19,5.99,14.64,39.18,45,55,8.67-18.92,10.28-33.18,10-43-.12-4.37-.74-12.15,4-16,.82-.55,5.22-3.4,10.85-2.15,3.86.85,6.25,3.17,7.15,4.15.5.6,1.28,1.58,2.09,2.87,8.99,14.33.03,32.06-11.49,69.45-4.1,13.3-6.65,21.58-9.6,33.68-5.81,23.86-8.17,40.38-20,51-11.03,9.91-22.32.03-23-9-2.89-15.02,23.13-56.98,18-68Z"/>
|
||||||
|
<path id="yuki-u" class="cls-22" d="m776,433c-.54-.11-5.36-1.02-9,2-2.31,1.92-3.04,4.55-4,8-.74,2.66-.91,4.8-1,6-.59,8.25,0,15,0,15,1.18,13.55,1.77,20.33,3,23,1.04,2.27,4.07,8.71,11,13,6.21,3.85,12.31,3.91,21,4,.81,0,16.83.09,21-4,.22-.21,1.2-1.26,2-1,.93.3.69,2.05,2,4,0,0,.63.93,2,2,3.54,2.75,12.53,3.41,16-1,.62-.79,1.75-2.64,2-5,.07-.68.05-1.22.02-1.76-.13-2.75-.88-4.83-1.02-5.24-1.31-3.73-3.37-15.69-4-23-.58-6.71.42-5.3,0-19-.11-3.63-.12-9.19-3-15-1.36-2.75-2.63-4.09-4-5-2.95-1.96-6.82-2.22-10-1-.8.31-3.48,1.34-5,4-1.36,2.37-1.11,4.83-1,6,.66,6.98.45,14.01,1,21,.72,9.13.57,11.51-1,14-1.8,2.86-4.42,4.2-6,5-7.58,3.86-15,.82-17,0-2.54-1.04-3.49-2.11-4-3-.74-1.29-.88-2.78-1-4-.13-1.35-.05-2.34,0-3v-16c-.19-7.44-.28-11.16-2-14-.52-.85-3.02-4.98-8-6Z"/>
|
||||||
|
<path id="yuki-i-1-1" class="cls-2" d="m964,382c-6.65.3-12.55,6.12-12,13,.53,6.56,6.7,11.28,13,11,6.65-.3,12.55-6.12,12-13-.53-6.56-6.7-11.28-13-11Z"/>
|
||||||
|
<path id="yuki-i-1" class="cls-24" d="m964,413c-.8.03-3.41.23-6,2,0,0-1.73,1.18-3,3-3.44,4.92-2.32,14.54-2,25,.14,4.66,0,9.33,0,14,0,11.92,0,17.88,0,18-.51,8.41-1.54,11.05,0,16,.77,2.5,1.84,5.92,5,8,3.21,2.11,6.76,1.77,8.36,1.62.77-.07,5.65-.54,8.64-3.62,3.4-3.49,2.66-8.56,2-17-.09-1.11-1.18-15.43-1-28,.1-7.33-.76-14.71,0-22,.11-1.03.52-4.77-1-9-.64-1.78-1.55-4.19-4-6-2.89-2.13-6.05-2.04-7-2Z"/>
|
||||||
|
<path id="yuki-k" class="cls-28" d="m918,409c-.26-.11-.66-.27-1.17-.44,0,0-4.46-1.53-9.91-1-4.47.44-18.59,11.34-31.93,31.43-.35-10.53-.23-21.87.56-33.9.37-5.55.85-10.92,1.44-16.1.26-1.2.52-2.94.41-5.03-.09-1.81-.25-4.96-2.27-8.04-.56-.85-2.9-4.42-7.52-5.51-5.61-1.33-10.01,2.08-10.62,2.58-3.44,2.76-4.45,6.67-5,9-3.6,15.32-3,27-3,27,.42,8.15,1.67,32.57,1,50-.22,5.66.05,11.33,0,17-.05,6.02-.13,9.05,1,13,1.45,5.07,4.08,8.75,6,11,1.19,1.11,3.93,3.36,8,4,3.99.63,7.79-.51,9.84-1.85,11.06-7.21,1.65-39.59,4.55-40.56.39-.13,1.19.88,2.61,3.4,8.89,11.22,14.99,15.39,30,29,7.7,10.13,23.45,3.59,22-8-.19-16.59-39.62-33.08-31.91-39.47,1.89-2.38,6-8.21,6.91-9.53,5.47-7.8,10.83-8.44,13-15,1.34-4.04.69-6.57.43-7.38-1.01-3.15-3.39-4.94-4.43-5.62Z"/>
|
||||||
|
<path id="lite-jp-1" class="cls-19" d="m452,384c-1.75-1-2.61-.17-10,1-2.22.35-7.11,1.06-13,3-1.36.45-2.68.93-3,2-.49,1.65,1.56,4.27,4,5,.32.09.56.13.74.16,2.19.34,3.89-.56,5.26-1.16,1.96-.87,3.64-1.24,7-2,0,0,4.44-1,5,0,.02.04.04.07.04.07.07.18-.02.5-.04,2.93,0,.06,0,.71,0,2,0,5.01.09,5.71,0,7-.2,2.74-.3,4.11-1,5-1.25,1.58-3.23,1.52-7,2-5.62.72-4.41,1.27-10,2-7.19.94-9.49.07-11,2-1.32,1.68-1.32,4.57,0,6,1.74,1.88,5.46.88,9,0,7.35-1.82,19.55-4.84,29-6,4.81-.59,12-1.09,13-4,.57-1.65,0-3,0-3-.06-.14-.62-1.43-2-2-1.19-.49-2.36-.18-3,0-6.78,1.91-9.23,2.82-10,2-.45-.48-.17-1.39,0-2,1.77-6.29,1.22-12.36,1-14-.23-1.67-.84-6.18-4-8Z"/>
|
||||||
|
<path id="liteecho-1" class="cls-34" d="m448,440c-1.02.34-1.72,1.18-2,2-.31.93-.06,1.78,0,2,.38,1.39.25,7.26,0,19-.12,5.74-.36,7.73,0,12,.21,2.49.58,5.11,2,8,.87,1.76,1.83,3.72,4,5,2.08,1.23,4.09,1.14,7,1,2.69-.13,6.51-.31,7-2,.37-1.27-1.18-3.23-3-4-2.78-1.18-4.84.97-7,0-2.17-.97-2.69-4.29-3-7-1.07-9.45-.9-24.04-1-30-.02-1.36-.12-5.21-2-6-.58-.25-1.37-.21-2,0Z"/>
|
||||||
|
<path id="yuki-jp-4-1" class="cls-16" d="m636.06,390.95c-2.11.2-3.55,1.9-3.93,2.35-.57.68-.91,1.34-1.11,1.8,1.09,1.05,6.06,5.64,11.22,4.91,2.33-.33,5.1-1.81,5.34-2.63.03-.09.03-.17.03-.17,0-.29-.33-.71-1.89-1.83-1.33-.96-2.23-1.61-3.3-2.18-.69-.37-1.23-.6-1.68-.79-2.41-1.04-3.62-1.55-4.68-1.45Z"/>
|
||||||
|
<path id="yuki-jp-4" class="cls-12" d="m621,375c.37-.49,1.34-1.8,3-2,2.33-.28,3.93,1.89,4,2,.33.46.44.81,1,3,.59,2.3.88,3.45,1,4,.33,1.56.71,3.58,1,6,.65,5.37.61,6.78,1,10,.79,6.47,1.28,10.5,3,15,.07.18,1.23,3.21,1,7-.08,1.29-.29,2.25-1,3-1,1.07-2.67,1.39-4,1-.58-.17-1.69-.65-3-3-1.53-2.75-1.78-5.26-2-7-.3-2.39-.86-5.79-2-10-1-6.33-2-12.67-3-19-.33-1.67-.67-3.33-1-5-.1-.53-.53-2.95,1-5Z"/>
|
||||||
|
<path id="liteecho-i-1-1" class="cls-20" d="m474,451c-1.86-.04-3.59,1.27-4,3-.56,2.38,1.47,5.01,4,5,2.03-.01,4-1.72,4-4,0-2.25-1.92-3.96-4-4Z"/>
|
||||||
|
<path id="liteecho-i-1" class="cls-9" d="m475,464c-.61-.3-1.38-.31-2,0-.14.07-.62.33-1,1-1.18,2.08-1.01,7.51-1,8,.16,5.45,0,9,0,9-.08,1.78-.22,3.7,1,5,.21.22.94,1,2,1,1.08,0,1.81-.8,2-1,1.05-1.14,1.02-2.72,1-4-.03-2.33.04-4.67,0-7-.05-3.31.17-8.95-1-11-.12-.2-.41-.71-1-1Z"/>
|
||||||
|
<path id="liteecho-t" class="cls-8" d="m492.48,452.64c-.52.03-1.3.07-1.92.55-.25.19-.76.67-1.1,2.68-.15.92-.29,2.26-.14,3.91-1.17.01-3.52.16-5.32,1.22-.38.22-.77.51-1,1-.39.85-.08,1.91.41,2.59.74,1.01,1.99,1.19,3.59,1.41.85.12,1.57.12,2.05.1-.06.76-.12,1.85-.14,3.16-.01,1.22-.03,2.48.14,4.12.15,1.49.3,2.92.96,4.62.39,1.03.78,1.67,1,2,.25.39.74,1.08,1.48,1.76,1.12,1.05,2.67,2.5,4.52,2.24,1.2-.17,2.57-1.06,2.76-2.24.12-.76-.29-1.46-.55-1.92-.43-.76-.87-.99-1.51-1.65-.95-.97-1.44-1.93-1.78-2.61-.71-1.41-.9-2.61-1.1-3.85-.15-.97-.37-2.35-.14-4.12.09-.67.22-1.22.32-1.61.56,0,1.35-.04,2.29-.17,1.54-.21,2.32-.32,2.88-.82.8-.71,1.27-2.03.83-3.01-.13-.3-.38-.61-1-1-1.52-.94-3.22-1.02-4.36-.94.11-.49.27-1.25.41-2.2.49-3.18.14-3.81-.14-4.12-.26-.3-.59-.43-1.24-.69-.4-.16-1.18-.47-2.2-.41Z"/>
|
||||||
|
<path id="liteecho-e" class="cls-25" d="m515.41,469.49c-1.24,0-1.82.11-2.17.53-.63.76-.29,2.24.31,3.15,1.51,2.31,5.53,2.25,7.8,1.77,1.4-.3,4.49-.94,5.98-3.77,1.7-3.21-.04-6.62-.4-7.27-1.86-3.4-5.47-4.29-7.14-4.7-3.37-.83-6.16.05-7.27.4-1.07.34-2.81.91-4.53,2.4-3.45,2.98-3.92,7.09-4,8-.27,3.05.7,5.35,1,6,.27.6,1.17,2.42,3,4,1.04.89,2.16,1.53,3,2,.99.56,1.75.89,2,1,1.02.44,1.88.81,3,1,1.17.2,2.07.1,3,0,.34-.04,1.85-.22,4-1,3.3-1.2,4.59-2.54,5-3,.47-.53.68-.9.71-1.34.06-1.15-1.21-2.31-2.48-2.62-.51-.12-.94-.08-1.23-.05-2.01.26-3.04,1.28-4.31,1.86-2.59,1.19-5.84.41-7.69-.86-1.16-.8-1.95-1.93-2-2-.26-.38-.69-1.07-1-2-.26-.77-.95-2.86,0-5,.82-1.85,2.41-2.69,3-3,2.34-1.23,5.06-1.05,7,0,.69.37,1.64.9,2,2,.29.87.26,2.23-.52,2.84-1,.8-2.36-.34-6.07-.36Z"/>
|
||||||
|
<path id="liteecho-c" class="cls-29" d="m570,456c-1.16,0-4.12.04-7,2-1.54,1.05-2.49,2.26-3,3-1.62,2.38-1.87,4.7-2,6-.12,1.26-.36,4,1,7,2.14,4.72,6.61,6.52,8,7,1.04.36,4.93,1.64,9,0,.94-.38,2.74-1.13,4-3,.45-.66,1.99-2.94,1-5-.54-1.12-1.88-2.25-3-2-1.41.32-1.04,2.48-3,4-1.92,1.48-4.45,1.09-5,1-.54-.08-2.42-.41-4-2-2.4-2.42-2.04-5.66-2-6,.07-.51.43-3.37,3-5,2.25-1.43,5.33-1.38,7,0,.93.77.92,1.55,2,2,1.26.52,3.2.27,4-1,.72-1.15.17-2.56,0-3-.15-.38-.69-1.63-3-3-.98-.58-3.45-2.01-7-2Z"/>
|
||||||
|
<path id="liteecho-h" class="cls-17" d="m590,439c-.92-.49-2.08-.44-3,0-1.8.87-1.99,2.91-2,3v9c0,4,.04,8,0,12-.03,3,.1,6,0,9-.1,3.04-.29,5.38,1,8,.45.91,1.42,2.89,3,3,1.63.11,2.9-1.85,3-2,1.44-2.28.03-4.1,0-9-.02-2.85,0-5.82,2-8,.37-.4,1.8-1.97,4-2,2.44-.04,3.91,1.89,4,2,.92,1.22,1,2.52,1,3-.33,1.67-.67,3.33-1,5-.41,1.12-.91,2.85-1,5-.09,2.3-.16,3.99,1,5,1.28,1.11,3.61,1.02,5,0,1.65-1.21,1.8-3.61,2-7,.08-1.27.04-2.31,0-3v-8c-.02-.84-.16-2.36-1-4-.51-1-1.73-2.93-4-4-3.65-1.72-7.65-.14-8,0-1.5.62-2.24,1.36-3,1-.71-.34-.94-1.4-1-4-.12-5.04.61-6.66,0-10-.56-3.06-1.54-3.76-2-4Z"/>
|
||||||
|
<path id="liteecho-o" class="cls-33" d="m625,458c-4.27-.18-7.17,2.27-8,3-3.05,2.66-3.79,6-4,7-.18.88-1.21,5.84,2,10,2.08,2.69,4.82,3.62,6,4,1.29.42,4.46,1.39,8,0,2.95-1.16,4.51-3.31,5-4,1.43-2.02,1.81-3.97,2-5,.46-2.51.1-4.49,0-5-.67-3.35-2.52-5.47-3-6-.69-.76-3.46-3.8-8-4Z"/>
|
||||||
|
<path id="liteecho-o-white" class="cls-35" d="m623.5,464.5c-2.49.24-3.75,2.55-4,3-.09.17-1.81,3.42,0,6,1.68,2.39,5.6,3.06,8,1,2.1-1.8,2.13-4.93,1-7-.84-1.54-2.7-3.22-5-3Z"/>
|
||||||
|
<path id="lite-jp-2" class="cls-13" d="m481,384c-.71.63-1.32,1.81-1,3,.38,1.44,1.86,1.95,2,2,.77.25,1.44.12,2,0,4.88-1.04,5.31-1.31,6-1,1.18.54,1.54,2.08,2,4,.41,1.72.73,3.08,0,4-.65.81-2.11.89-5,1-1.25.05-2.29.03-3,0-.53.14-1.96.61-3,2-.4.54-1.21,1.61-1,3,.24,1.62,1.7,2.78,3,3,.44.08.79.03,1,0,4.59-.65,6.89-.98,7-1,2.55-.43,3.84-.64,4.45-.34,1.26.62,1.41,1.86,2.55,5.34,0,0,1.48,4.5,4,10,.8,1.75,1.53,3.13,2,4,.16.13,2.42,1.9,5,1,.16-.06,2.44-.88,3-3,.21-.78.1-1.42,0-2-.27-1.54-.96-2.26-2-4-.12-.21.03.04-2-4-.67-1.33-1.32-2.67-2-4-1.91-3.76-2.3-4.3-2-5,.2-.46.49-.53,4-2,1.13-.48,2.45-1.03,4-2,1.13-.71,1.71-1.21,2-2,.06-.17.35-1.03,0-2-.48-1.32-1.88-2.03-3-2-.31,0-.54.07-.66.11-2.2.63-4.77,1.67-5.34,1.89-2.21.88-3.31,1.31-4,1-.42-.19-.77-.54-2-4-1.21-3.42-1.11-3.77-1-4,.42-.85,1.37-.79,6-2,2.46-.64,3.57-1.02,4-2,.3-.68.14-1.39,0-2-.09-.4-.54-2.17-2-3-1.17-.66-2.4-.38-4,0-3.65.88-4.88,2.55-6,2-.55-.27-1.15-1.13-1-4-.42-2-.76-3-1-3h0c-.76-1.48-2.4-2.29-4-2-1.51.27-2.7,1.47-3,3-.17,2.45.41,4.01,1,5,.57.95,1.14,1.36,1,2-.24,1.14-2.45,1.64-4,2-2.38.55-3.11.2-4,1Z"/>
|
||||||
|
<path id="yuki-jp-1" class="cls-5" d="m526,396c-.46,1.12-.62,2.69,0,4,.19.41.79,1.49,2,2,1.22.51,2.43.16,3,0,5-1.43,7.51-2.15,8-2,4.42,1.34,3.64,20.08,7,22,2.14,1.22,4,1,4,1,1.43-.17,3.03-.97,3.02-1,0,0,0,0-.02,0,.27-.2.65-.52,1-1,1.53-2.12.85-5.32-1-10-3.3-8.33-6.24-11.07-5-13,.71-1.1,1.84-.46,5.57-2.36,2.51-1.27,4.06-2.06,4.43-3.64.46-1.98-1.11-4.46-3-5-1.01-.29-2.23.21-4.65,1.22-3.32,1.39-3.58,2.02-4.35,1.78-2.25-.7-.9-6.34-4-8-1.22-.65-2.84-.54-4,0-.31.14-1.56.73-2,2-.24.7-.14,1.29,0,2,.51,2.66,2.08,3.57,2,5.99,0,0,0,0,0,0,.01,0,.02,0,.02,0,.01.1-10.37-.01-12.02,4Z"/>
|
||||||
|
<path id="yuki-jp-2-3" class="cls-31" d="m603,386c-.23-.2-.95-.74-2-1-.58-.14-1.39-.34-2,0-.79.44-.86,1.6-1,3,0,0-.62,6.23-2,9-.43.86-.97,1.66-.97,1.66-.12.18-.24.35-.35.5-.2.27-.42.55-.68.84-1.47,1.68-5.93,4.2-5.93,4.2-3.23,1.82-3.66,2.04-4.07,2.8-.61,1.13-.9,2.9,0,4,.8.97,2.17.99,3,1,.7,0,3.05-.07,7.17-3.17,1.64-1.24,3.78-2.89,5.83-5.83,3.15-4.53,3.72-8.76,4-11,.52-4.2-.4-5.48-1-6Z"/>
|
||||||
|
<path id="liteecho-e2" class="cls-14" d="m540.81,469.18c-1.13.52-1.6.87-1.74,1.41-.25.96.69,2.15,1.62,2.72,2.35,1.44,5.96-.31,7.81-1.71,1.14-.86,3.66-2.76,3.81-5.96.17-3.63-2.85-5.97-3.45-6.41-3.13-2.29-6.78-1.55-8.46-1.22-3.41.68-5.55,2.66-6.41,3.45-.83.76-2.15,2.02-3.08,4.1-1.85,4.16-.53,8.09-.22,8.94,1.05,2.88,2.91,4.54,3.46,5,.5.42,2.09,1.69,4.42,2.34,1.32.37,2.61.46,3.57.53,1.13.08,1.96.06,2.24.05,1.11-.04,2.04-.06,3.14-.37,1.14-.32,1.92-.79,2.71-1.28.29-.18,1.58-.98,3.19-2.61,2.48-2.49,3.07-4.25,3.25-4.84.2-.68.24-1.11.07-1.51-.43-1.07-2.08-1.58-3.36-1.31-.51.11-.88.32-1.13.48-1.71,1.09-2.2,2.45-3.11,3.52-1.84,2.18-5.11,2.86-7.32,2.49-1.39-.23-2.59-.92-2.66-.96-.4-.23-1.08-.67-1.76-1.38-.56-.59-2.08-2.19-2.13-4.52-.04-2.02,1.04-3.46,1.44-3.99,1.59-2.11,4.14-3.1,6.33-2.98.79.04,1.86.12,2.66.96.63.67,1.18,1.91.74,2.79-.57,1.15-2.28.69-5.65,2.26Z"/>
|
||||||
|
</g>
|
||||||
|
<circle class="cls-23" cx="535" cy="411" r="4"/>
|
||||||
|
<ellipse class="cls-11" cx="556.49" cy="380.5" rx="2.51" ry="2.5"/>
|
||||||
|
<ellipse class="cls-26" cx="549.49" cy="383.5" rx="2.51" ry="2.5"/>
|
||||||
|
<circle class="cls-10" cx="557.98" cy="404.39" r="4"/>
|
||||||
|
<circle class="cls-1" cx="582.42" cy="391.26" r="4"/>
|
||||||
|
<circle class="cls-6" cx="590.42" cy="385.26" r="4"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 31 KiB |
73
docs/.vuepress/public/js/en/get_data.js
Normal file
73
docs/.vuepress/public/js/en/get_data.js
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
// 定义全局变量来存储数据
|
||||||
|
|
||||||
|
let globalTotal = 0;
|
||||||
|
|
||||||
|
let globalOnline = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// 从API获取数据并更新全局变量
|
||||||
|
|
||||||
|
function fetchAndUpdateData() {
|
||||||
|
|
||||||
|
Promise.all([
|
||||||
|
|
||||||
|
fetch("https://api.liteyuki.icu/count").then(res => res.json()),
|
||||||
|
|
||||||
|
fetch("https://api.liteyuki.icu/online").then(res => res.json())
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
.then(([countRes, onlineRes]) => {
|
||||||
|
|
||||||
|
globalTotal = countRes.register;
|
||||||
|
|
||||||
|
globalOnline = onlineRes.online;
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
.catch(err => {
|
||||||
|
|
||||||
|
console.error("Error fetching data:", err);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 更新页面显示,使用全局变量中的数据
|
||||||
|
|
||||||
|
function updatePageDisplay() {
|
||||||
|
|
||||||
|
let countInfo = document.getElementById("count-info");
|
||||||
|
|
||||||
|
if (!countInfo) {
|
||||||
|
|
||||||
|
let info = `<div id="count-info" style="text-align: center; font-size: 20px; font-weight: 500">
|
||||||
|
|
||||||
|
Instances:<span id="total">${globalTotal}</span> Online:<span id="online">${globalOnline}</span></div>`;
|
||||||
|
|
||||||
|
let mainDescription = document.querySelector("#main-description");
|
||||||
|
|
||||||
|
if (mainDescription) {
|
||||||
|
|
||||||
|
mainDescription.insertAdjacentHTML('afterend', info);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 初始调用更新数据
|
||||||
|
|
||||||
|
fetchAndUpdateData();
|
||||||
|
|
||||||
|
updatePageDisplay();
|
||||||
|
|
||||||
|
|
||||||
|
// 设置定时器,分别以不同频率调用更新数据和更新页面的函数
|
||||||
|
|
||||||
|
setInterval(fetchAndUpdateData, 10000); // 每10秒更新一次数据
|
||||||
|
|
||||||
|
setInterval(updatePageDisplay, 1000); // 每1秒更新一次页面显示
|
93
docs/.vuepress/public/js/geo.js
Normal file
93
docs/.vuepress/public/js/geo.js
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
echart = require('echarts');
|
||||||
|
let chart = echarts.init(document.getElementById('main-chart'));
|
||||||
|
const color = ['#9ae5fc', '#dcbf71']; // 自定义图中要用到的颜色
|
||||||
|
console.log("加载图标");
|
||||||
|
// 在地图加载完成后设置所有地区不可选
|
||||||
|
function setAllRegionsUnselectable(geoModel) {
|
||||||
|
const regions = geoModel.get('regions');
|
||||||
|
|
||||||
|
// 遍历所有地区并设置selected为false
|
||||||
|
for (let i = 0; i < regions.length; i++) {
|
||||||
|
const region = regions[i];
|
||||||
|
region.selected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新模型以反映更改
|
||||||
|
geoModel.set('regions', regions);
|
||||||
|
|
||||||
|
// 更新图表以显示更改
|
||||||
|
chart.setOption({
|
||||||
|
geo: {
|
||||||
|
regions: regions
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取数据并初始化图表
|
||||||
|
fetch('https://api.liteyuki.icu/distribution')
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
// 构造 ECharts 需要的数据格式
|
||||||
|
const locations = data.locations;
|
||||||
|
const seriesData = locations.map(location => ({
|
||||||
|
value: [location[1], location[0]] // 直接使用经纬度数组
|
||||||
|
}));
|
||||||
|
console.log(seriesData);
|
||||||
|
// 初始化图表选项
|
||||||
|
chart.setOption({
|
||||||
|
backgroundColor: '#454545',
|
||||||
|
title: {
|
||||||
|
text: 'LiteyukiBot分布demo',
|
||||||
|
subtext: 'LiteyukiBot分布',
|
||||||
|
textStyle: {
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: 20
|
||||||
|
},
|
||||||
|
top: '10px',
|
||||||
|
left: '10px'
|
||||||
|
},
|
||||||
|
geo: {
|
||||||
|
map: 'world',
|
||||||
|
roam: false,
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
areaColor: '#000',
|
||||||
|
borderType: null, // 设置边界线类型为无
|
||||||
|
borderColor: '#000', // 设置边界线颜色
|
||||||
|
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
areaColor: '#000',
|
||||||
|
borderType: null, // 设置边界线类型为无
|
||||||
|
borderColor: '#000', // 设置边界线颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
regions: [] // 先保留为空
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
// 散点效果
|
||||||
|
type: 'scatter',
|
||||||
|
coordinateSystem: 'geo', // 表示使用的坐标系为地理坐标系
|
||||||
|
symbolSize: 5, // 设置散点的大小为20
|
||||||
|
itemStyle: {
|
||||||
|
color: '#ffeb3b', // 黄色
|
||||||
|
},
|
||||||
|
data: seriesData
|
||||||
|
}],
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 在地图加载完成后设置所有地区不可选
|
||||||
|
chart.on('ready', function () {
|
||||||
|
const geoModel = chart.getModel().componentModels.geo[0];
|
||||||
|
setAllRegionsUnselectable(geoModel);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 自适应窗口大小变化
|
||||||
|
window.addEventListener("resize", function () {
|
||||||
|
chart.resize();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(error => console.error('Error fetching data:', error));
|
31
docs/.vuepress/public/js/style.js
Normal file
31
docs/.vuepress/public/js/style.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
function applyStyle() {
|
||||||
|
// 先检测页面中是否有macos-tab,有则不再添加
|
||||||
|
let tabs = document.body.querySelectorAll('.macos-tab')
|
||||||
|
if (tabs.length > 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let lineNumbers = document.body.querySelectorAll('[class^="language-"].line-numbers-mode')
|
||||||
|
lineNumbers.forEach((item) => {
|
||||||
|
// 插入现成的html文本
|
||||||
|
let title = item.getAttribute('data-title')
|
||||||
|
let tabStr =
|
||||||
|
"<div class='tab macos-tab' style='display: flex; background-color: #d0e9ff'>" +
|
||||||
|
" <div class='tab-buttons'>" +
|
||||||
|
" <div class='tab-button' style='background-color: #FF5F57'></div>" +
|
||||||
|
" <div class='tab-button' style='background-color: #FFBD2E'></div>" +
|
||||||
|
" <div class='tab-button' style='background-color: #27C93F'></div>" +
|
||||||
|
" </div>" +
|
||||||
|
` <div class='tab-title'>${title}</div>` +
|
||||||
|
" <div style='flex: 1'></div>" +
|
||||||
|
"</div>"
|
||||||
|
// 在代码块前插入选项卡
|
||||||
|
item.insertAdjacentHTML('beforebegin', tabStr);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
applyStyle()
|
||||||
|
// 定时器,每隔1s检查一次
|
||||||
|
setInterval(() => {
|
||||||
|
applyStyle()
|
||||||
|
}, 1000)
|
1116
docs/.vuepress/public/js/world.js
Normal file
1116
docs/.vuepress/public/js/world.js
Normal file
File diff suppressed because one or more lines are too long
73
docs/.vuepress/public/js/zh/get_data.js
Normal file
73
docs/.vuepress/public/js/zh/get_data.js
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
// 定义全局变量来存储数据
|
||||||
|
|
||||||
|
let globalTotal = 0;
|
||||||
|
|
||||||
|
let globalOnline = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// 从API获取数据并更新全局变量
|
||||||
|
|
||||||
|
function fetchAndUpdateData() {
|
||||||
|
|
||||||
|
Promise.all([
|
||||||
|
|
||||||
|
fetch("https://api.liteyuki.icu/count").then(res => res.json()),
|
||||||
|
|
||||||
|
fetch("https://api.liteyuki.icu/online").then(res => res.json())
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
.then(([countRes, onlineRes]) => {
|
||||||
|
|
||||||
|
globalTotal = countRes.register;
|
||||||
|
|
||||||
|
globalOnline = onlineRes.online;
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
.catch(err => {
|
||||||
|
|
||||||
|
console.error("Error fetching data:", err);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 更新页面显示,使用全局变量中的数据
|
||||||
|
|
||||||
|
function updatePageDisplay() {
|
||||||
|
|
||||||
|
let countInfo = document.getElementById("count-info");
|
||||||
|
|
||||||
|
if (!countInfo) {
|
||||||
|
|
||||||
|
let info = `<div id="count-info" style="text-align: center; font-size: 20px; font-weight: 500">
|
||||||
|
|
||||||
|
全球实例:<span id="total">${globalTotal}</span> 当前在线:<span id="online">${globalOnline}</span></div>`;
|
||||||
|
|
||||||
|
let mainDescription = document.querySelector("#main-description");
|
||||||
|
|
||||||
|
if (mainDescription) {
|
||||||
|
|
||||||
|
mainDescription.insertAdjacentHTML('afterend', info);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 初始调用更新数据
|
||||||
|
|
||||||
|
fetchAndUpdateData();
|
||||||
|
|
||||||
|
updatePageDisplay();
|
||||||
|
|
||||||
|
|
||||||
|
// 设置定时器,分别以不同频率调用更新数据和更新页面的函数
|
||||||
|
|
||||||
|
setInterval(fetchAndUpdateData, 10000); // 每10秒更新一次数据
|
||||||
|
|
||||||
|
setInterval(updatePageDisplay, 1000); // 每1秒更新一次页面显示
|
@ -1,25 +0,0 @@
|
|||||||
import {sidebar} from "vuepress-theme-hope";
|
|
||||||
|
|
||||||
export default sidebar({
|
|
||||||
"/": [
|
|
||||||
"",
|
|
||||||
{
|
|
||||||
text: "项目部署",
|
|
||||||
icon: "laptop-code",
|
|
||||||
prefix: "deployment/",
|
|
||||||
children: "structure",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "使用手册",
|
|
||||||
icon: "book",
|
|
||||||
prefix: "usage/",
|
|
||||||
children: "structure",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "商店",
|
|
||||||
icon: "store",
|
|
||||||
prefix: "store/",
|
|
||||||
children: "structure",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
});
|
|
10
docs/.vuepress/sidebar/en.ts
Normal file
10
docs/.vuepress/sidebar/en.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import {sidebar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
|
export const enSidebarConfig = sidebar(
|
||||||
|
{
|
||||||
|
"/en/deploy/": "structure",
|
||||||
|
"/en/usage/": "structure",
|
||||||
|
"/en/store/": "structure",
|
||||||
|
"/en/dev/": "structure",
|
||||||
|
}
|
||||||
|
)
|
2
docs/.vuepress/sidebar/index.ts
Normal file
2
docs/.vuepress/sidebar/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from "./zh.js"
|
||||||
|
export * from "./en.js"
|
11
docs/.vuepress/sidebar/zh.ts
Normal file
11
docs/.vuepress/sidebar/zh.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import {sidebar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
|
|
||||||
|
export const zhSidebarConfig = sidebar(
|
||||||
|
{
|
||||||
|
"/deploy/": "structure",
|
||||||
|
"/usage/": "structure",
|
||||||
|
"/store/": "structure",
|
||||||
|
"/dev/": "structure",
|
||||||
|
}
|
||||||
|
)
|
@ -1,5 +1,10 @@
|
|||||||
// place your custom styles here
|
// place your custom styles here
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--code-window-border-radius: 10px;
|
||||||
|
--button-distance: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
#main-title {
|
#main-title {
|
||||||
font-family: ColorTube, "Fira Code", serif;
|
font-family: ColorTube, "Fira Code", serif;
|
||||||
color: #ff0000 !important; /* 你想要的颜色 */
|
color: #ff0000 !important; /* 你想要的颜色 */
|
||||||
@ -14,3 +19,82 @@
|
|||||||
code {
|
code {
|
||||||
font-family: "Fira Code", monospace !important;
|
font-family: "Fira Code", monospace !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vp-hero-image {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: -50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-title {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-hope-content pre {
|
||||||
|
overflow: auto;
|
||||||
|
margin: 0 0;
|
||||||
|
padding: 1rem;
|
||||||
|
border-radius: 6px;
|
||||||
|
line-height: 1.375;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除该before
|
||||||
|
.theme-hope-content pre::before {
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-hope-content > div[class*=language-] {
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
// 仅下半部分有圆弧
|
||||||
|
border-radius: 0 0 var(--code-window-border-radius) var(--code-window-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab {
|
||||||
|
display: flex;
|
||||||
|
height: 25px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
border-top-left-radius: var(--code-window-border-radius);
|
||||||
|
border-top-right-radius: var(--code-window-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-buttons {
|
||||||
|
padding: 7px;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
height: 60%;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-button {
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
margin-right: var(--button-distance);
|
||||||
|
border-radius: 50%;
|
||||||
|
height: 100%;
|
||||||
|
aspect-ratio: 1/1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-title {
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-search-box {
|
||||||
|
border-radius: 100px;
|
||||||
|
width: 80%;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 10px 0;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box-div {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-search-box {
|
||||||
|
width: 80%;
|
||||||
|
}
|
@ -1,30 +1,40 @@
|
|||||||
import {hopeTheme} from "vuepress-theme-hope";
|
import {hopeTheme} from "vuepress-theme-hope";
|
||||||
import navbar from "./navbar.js";
|
import {enSidebarConfig, zhSidebarConfig} from "./sidebar/index.js";
|
||||||
import sidebar from "./sidebar.js";
|
import {enNavbarConfig, zhNavbarConfig} from "./navbar/index.js";
|
||||||
|
|
||||||
export default hopeTheme({
|
export default hopeTheme({
|
||||||
|
|
||||||
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
|
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
|
||||||
|
hotReload: true,
|
||||||
|
|
||||||
|
locales: {
|
||||||
|
"/": {
|
||||||
|
navbar: zhNavbarConfig,
|
||||||
|
sidebar: zhSidebarConfig,
|
||||||
author: {
|
author: {
|
||||||
name: "远野千束",
|
name: "远野千束",
|
||||||
url: "https://snowykami.me",
|
url: "https://sfkm.me",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/en/": {
|
||||||
|
navbar: enNavbarConfig,
|
||||||
|
sidebar: enSidebarConfig,
|
||||||
|
author: {
|
||||||
|
name: "SnowyKami",
|
||||||
|
url: "https://sfkm.me",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
iconAssets: "fontawesome-with-brands",
|
iconAssets: "fontawesome-with-brands",
|
||||||
|
|
||||||
logo: "https://cdn.liteyuki.icu/static/img/liteyuki_icon_640.png",
|
logo: "https://cdn.liteyuki.icu/static/img/liteyuki_icon_640.png",
|
||||||
|
|
||||||
repo: "https://github.com/snowykami/LiteyukiBot",
|
repo: "https://github.com/LiteyukiStudio/LiteyukiBot",
|
||||||
|
|
||||||
docsDir: "docs",
|
docsDir: "docs",
|
||||||
|
|
||||||
// 导航栏
|
|
||||||
navbar,
|
|
||||||
|
|
||||||
// 侧边栏
|
|
||||||
sidebar,
|
|
||||||
|
|
||||||
// 页脚
|
// 页脚
|
||||||
footer: "LiteyukiBot",
|
footer: "LiteyukiBot",
|
||||||
displayFooter: true,
|
displayFooter: true,
|
||||||
@ -38,7 +48,7 @@ export default hopeTheme({
|
|||||||
|
|
||||||
// 多语言配置
|
// 多语言配置
|
||||||
metaLocales: {
|
metaLocales: {
|
||||||
editLink: "在 GitHub 上编辑此页",
|
editLink: "在 GitHub 上编辑",
|
||||||
},
|
},
|
||||||
|
|
||||||
// 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响
|
// 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响
|
||||||
@ -62,6 +72,7 @@ export default hopeTheme({
|
|||||||
|
|
||||||
// 此处开启了很多功能用于演示,你应仅保留用到的功能。
|
// 此处开启了很多功能用于演示,你应仅保留用到的功能。
|
||||||
mdEnhance: {
|
mdEnhance: {
|
||||||
|
echarts: true,
|
||||||
alert: true,
|
alert: true,
|
||||||
align: true,
|
align: true,
|
||||||
attrs: true,
|
attrs: true,
|
@ -2,18 +2,19 @@
|
|||||||
home: true
|
home: true
|
||||||
icon: home
|
icon: home
|
||||||
title: 首页
|
title: 首页
|
||||||
heroImage: https://cdn.liteyuki.icu/static/img/logo.png
|
heroImage: https://cdn.liteyuki.icu/static/svg/lylogo-full.svg
|
||||||
|
heroImageDark: https://cdn.liteyuki.icu/static/svg/lylogo-full-dark.svg
|
||||||
bgImage:
|
bgImage:
|
||||||
bgImageDark:
|
bgImageDark:
|
||||||
bgImageStyle:
|
bgImageStyle:
|
||||||
background-attachment: fixed
|
background-attachment: fixed
|
||||||
heroText: LiteyukiBot
|
heroText: LiteyukiBot
|
||||||
tagline: 轻雪机器人,一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人
|
tagline: LiteyukiBot 轻雪机器人,综合性的机器人应用及管理框架
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
- text: 快速部署
|
- text: 快速部署
|
||||||
icon: lightbulb
|
icon: rocket
|
||||||
link: ./deployment/install.html
|
link: ./deploy/install.html
|
||||||
type: primary
|
type: primary
|
||||||
|
|
||||||
- text: 使用手册
|
- text: 使用手册
|
||||||
@ -21,7 +22,6 @@ actions:
|
|||||||
link: ./usage/basic_command.html
|
link: ./usage/basic_command.html
|
||||||
|
|
||||||
highlights:
|
highlights:
|
||||||
|
|
||||||
- header: 简洁至上
|
- header: 简洁至上
|
||||||
image: /assets/image/layout.svg
|
image: /assets/image/layout.svg
|
||||||
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
|
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
|
||||||
@ -30,68 +30,50 @@ highlights:
|
|||||||
background-repeat: repeat
|
background-repeat: repeat
|
||||||
background-size: initial
|
background-size: initial
|
||||||
features:
|
features:
|
||||||
- title: 基于Nonebot2
|
- title: 支持多种框架
|
||||||
icon: robot
|
icon: robot
|
||||||
details: 拥有良好的生态支持
|
details: 兼容nonebot,melobot等,拥有良好的生态支持
|
||||||
link: https://nonebot.dev/
|
link: https://nonebot.dev/
|
||||||
|
|
||||||
- title: 可视化插件管理
|
- title: 便捷管理
|
||||||
icon: plug
|
icon: plug
|
||||||
details: 使用<code>npm</code>,无需命令行操作即可安装/卸载插件
|
details: 使用包管理器,便捷管理插件及资源包
|
||||||
|
|
||||||
- title: 点击交互
|
|
||||||
icon: mouse-pointer
|
|
||||||
details: 新的点击交互模式,拒绝手打指令
|
|
||||||
|
|
||||||
- title: 主题支持
|
- title: 主题支持
|
||||||
icon: paint-brush
|
icon: paint-brush
|
||||||
details: 支持多种主题,可自定义资源包,满足你的审美需求
|
details: 使用资源包对外观进行完全自定义
|
||||||
link: https://bot.liteyuki.icu/usage/resource_pack.html
|
link: https://bot.liteyuki.icu/usage/resource_pack.html
|
||||||
|
|
||||||
- title: 国际化
|
- title: 国际化
|
||||||
icon: globe
|
icon: globe
|
||||||
details: 支持多种语言,包括i18n部分语言和自行扩展的语言代码
|
details: 通过资源包支持多种语言
|
||||||
link: https://baike.baidu.com/item/i18n/6771940
|
link: https://baike.baidu.com/item/i18n/6771940
|
||||||
|
|
||||||
- title: 简易配置
|
- title: 简易使用
|
||||||
icon: cog
|
icon: cog
|
||||||
details: 无需过多配置,开箱即用
|
details: 无需繁琐前期过程,开箱即用
|
||||||
link: https://bot.liteyuki.icu/deployment/config.html
|
link: https://bot.liteyuki.icu/deployment/config.html
|
||||||
|
|
||||||
- title: 低占用
|
- title: 超高性能
|
||||||
icon: memory
|
icon: tachometer-alt
|
||||||
details: 使用更少的依赖和资源
|
details: 500个插件,2s内启动
|
||||||
|
|
||||||
- title: OneBot标准
|
- title: 滚动更新
|
||||||
icon: link
|
|
||||||
details: 支持OneBotv11/12标准的四种通信协议
|
|
||||||
link: https://onebot.dev/
|
|
||||||
|
|
||||||
- title: Alconna命令解析
|
|
||||||
icon: link
|
|
||||||
details: 使用Alconna实现高效命令解析
|
|
||||||
link: https://github.com/nonebot/plugin-alconna
|
|
||||||
|
|
||||||
- title: 便捷更新
|
|
||||||
icon: cloud-download
|
icon: cloud-download
|
||||||
details: 聊天窗口命令更新,无需手动下载
|
details: 让你的机器人保持最新提交
|
||||||
|
|
||||||
- title: 服务支持
|
- title: 开源项目
|
||||||
icon: server
|
|
||||||
details: 内置轻雪API,可自动收集错误,提供图床服务
|
|
||||||
|
|
||||||
- title: 开源
|
|
||||||
icon: code
|
icon: code
|
||||||
details: 项目遵循MIT协议开源,欢迎各位的贡献
|
details: 项目遵循MIT LICENCE开源,欢迎各位的贡献
|
||||||
|
|
||||||
- header: 快速部署
|
- header: 快速部署
|
||||||
image: /assets/image/box.svg
|
image: /assets/image/box.svg
|
||||||
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
|
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
|
||||||
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
|
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
|
||||||
highlights:
|
highlights:
|
||||||
- title: 安装 Git 和 Python3.10+
|
- title: 安装 Git 及 Python3.10+
|
||||||
- title: 使用 <code>git clone https://github.com/snowykami/LiteyukiBot</code> 以克隆项目至本地。
|
- title: 使用 <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> 以克隆项目至本地。
|
||||||
details: 如果无法连接到GitHub,可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot</code>。
|
details: 如果无法连接到GitHub,可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot --depth=1</code>。
|
||||||
- title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。
|
- title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。
|
||||||
- title: 使用 <code>pip install -r requirements.txt</code> 安装项目依赖。
|
- title: 使用 <code>pip install -r requirements.txt</code> 安装项目依赖。
|
||||||
details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。
|
details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。
|
||||||
|
9
docs/deploy/cfg.txt
Normal file
9
docs/deploy/cfg.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# note
|
||||||
|
开发者选项
|
||||||
|
allow_update: true # 是否允许更新
|
||||||
|
log_level: "INFO" # 日志等级
|
||||||
|
log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
|
||||||
|
auto_report: true # 是否自动上报问题给轻雪服务器
|
||||||
|
auto_update: true # 是否自动更新轻雪,每天4点检查更新
|
||||||
|
safe_mode: false # 安全模式,开启后将不会加载任何第三方插件
|
||||||
|
dev_mode: false # 开发者模式,开启后将会启动看门狗
|
78
docs/deploy/config.md
Normal file
78
docs/deploy/config.md
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
---
|
||||||
|
title: 配置
|
||||||
|
icon: cog
|
||||||
|
order: 2
|
||||||
|
category: 使用指南
|
||||||
|
tag:
|
||||||
|
- 配置
|
||||||
|
- 部署
|
||||||
|
---
|
||||||
|
|
||||||
|
轻雪支持`yaml`、`json`和`toml`作为配置文件,取决于你个人的喜好
|
||||||
|
|
||||||
|
首次运行后生成`config.yml`和`config`目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改`superusers`及`nickname`字段即可
|
||||||
|
|
||||||
|
启动时会加载项目目录下`config.yml/yaml/json/toml`和`config`目录下的所有配置文件,你可在`config`目录下创建多个配置文件,轻雪会自动合并这些配置文件
|
||||||
|
|
||||||
|
## **基础配置项**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
nonebot:
|
||||||
|
# Nonebot机器人的配置,以前的最外层配置项仍可为Nonebot服务,但是部分内容会被覆盖,请尽快迁移
|
||||||
|
command_start: [ "/", "" ] # 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常
|
||||||
|
host: 127.0.0.1 # 监听地址,默认为本机,若要接收外部请求请填写0.0.0.0
|
||||||
|
port: 20216 # 绑定端口
|
||||||
|
nickname: [ "liteyuki" ] # 机器人昵称列表
|
||||||
|
superusers: [ "1919810" ] # 超级用户列表
|
||||||
|
liteyuki:
|
||||||
|
# 写在外层的配置项将会被覆盖,建议迁移到liteyuki下
|
||||||
|
log_level: "INFO" # 日志等级
|
||||||
|
log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
|
||||||
|
auto_report: true # 是否自动上报问题给轻雪服务器
|
||||||
|
auto_update: true # 是否自动更新轻雪,每天4点检查更新
|
||||||
|
plugins: [ ] # 轻雪插件列表
|
||||||
|
plugin_dirs: [ ] # 轻雪插件目录列表
|
||||||
|
```
|
||||||
|
|
||||||
|
## **其他配置**
|
||||||
|
|
||||||
|
以下为默认值,如需自定义请手动添加
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# 高级NoneBot配置
|
||||||
|
nonebot:
|
||||||
|
onebot_access_token: "" # 访问令牌,对公开放时建议设置
|
||||||
|
default_language: "zh-CN" # 默认语言
|
||||||
|
alconna_auto_completion: false # alconna是否自动补全指令,默认false,建议开启
|
||||||
|
safe_mode: false # 安全模式,开启后将不会加载任何第三方NoneBot插件
|
||||||
|
# 其他Nonebot插件的配置项
|
||||||
|
custom_config_1: "custom_value1"
|
||||||
|
custom_config_2: "custom_value2"
|
||||||
|
|
||||||
|
# 开发者选项
|
||||||
|
liteyuki:
|
||||||
|
allow_update: true # 是否允许更新
|
||||||
|
debug: false # 轻雪调试,开启会自动重载Bot或者资源,其他插件自带的调试功能也将开启
|
||||||
|
dev_mode: false # 开发者模式,开启后将会启动监视者,监视文件变化并自动重载
|
||||||
|
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> 如果要使用NoneBot和dotenv配置文件,请自行创建`.env.{ENVIRONMENT}`,并在`config.yml`中添加`nonebot.environment:{ENVIRONMENT}`字段
|
||||||
|
|
||||||
|
## **与NoneBot对接的OneBot实现端配置**
|
||||||
|
|
||||||
|
生产环境中推荐反向WebSocket
|
||||||
|
不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值
|
||||||
|
|
||||||
|
| 字段 | 参考值 | 说明 |
|
||||||
|
|-------------|------------------------------------|----------------------------------|
|
||||||
|
| 协议 | 反向WebSocket | 推荐使用反向ws协议进行通信,即轻雪作为服务端 |
|
||||||
|
| 地址 | ws://127.0.0.1:20216/onebot/v11/ws | 地址取决于配置文件,本机默认为`127.0.0.1:20216` |
|
||||||
|
| AccessToken | `""` | 如果你给轻雪配置了`AccessToken`,请在此填写相同的值 |
|
||||||
|
|
||||||
|
## **其他**
|
||||||
|
|
||||||
|
- 要使用其他通信方式请访问[OneBot Adapter](https://onebot.adapters.nonebot.dev/)获取详细信息
|
||||||
|
- 轻雪不局限于OneBot适配器,你可以使用NoneBot2支持的任何适配器
|
@ -7,44 +7,54 @@ tag:
|
|||||||
- 安装
|
- 安装
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## **开始安装**
|
## **开始安装**
|
||||||
### **常规方法**
|
|
||||||
1. 安装 [`Git`](https://git-scm.com/download/) 和 [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) 环境
|
|
||||||
2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot`
|
|
||||||
3. 进入轻雪目录 `cd LiteyukiBot`
|
|
||||||
4. 安装依赖 `pip install -r requirements.txt`
|
|
||||||
5. 启动 `python main.py`
|
|
||||||
|
|
||||||
### **使用Docker(测试中)**
|
### **常规部署**
|
||||||
|
|
||||||
|
1. 安装 [`Git`](https://git-scm.com/download/) 和 [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) 环境
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项
|
||||||
|
git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
|
||||||
|
# 切换到Bot目录下
|
||||||
|
cd LiteyukiBot
|
||||||
|
# 安装依赖
|
||||||
|
pip install -r requirements.txt
|
||||||
|
# 启动Bot
|
||||||
|
python main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> 推荐使用虚拟环境来运行轻雪,以避免依赖冲突,你可以使用`python -m venv .venv`来创建虚拟环境,然后使用`.venv\Scripts\activate`来激活虚拟环境(Linux下使用`source .venv/bin/activate`激活)
|
||||||
|
|
||||||
|
### **使用Docker构建镜像部署**
|
||||||
|
|
||||||
1. 安装 [`Docker`](https://docs.docker.com/get-docker/)
|
1. 安装 [`Docker`](https://docs.docker.com/get-docker/)
|
||||||
2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot`
|
2. 克隆项目 `git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1`
|
||||||
3. 进入轻雪目录 `cd LiteyukiBot`
|
3. 进入轻雪目录 `cd LiteyukiBot`
|
||||||
4. 构建镜像 `docker build -t liteyukibot .`
|
4. 构建镜像 `docker build -t liteyukibot .`
|
||||||
5. 启动容器 `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
|
5. 启动容器 `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
|
||||||
|
|
||||||
|
|
||||||
> [!tip]
|
> [!tip]
|
||||||
> Windows请使用项目绝对目录`/path/to/LiteyukiBot`代替`$(pwd)` <br>
|
> Windows请使用项目绝对目录`/path/to/LiteyukiBot`代替`$(pwd)` <br>
|
||||||
> 若你修改了端口号请将`20216:20216`中的`20216`替换为你的端口号
|
> 若你修改了端口号请将`20216:20216`中的`20216`替换为你的端口号
|
||||||
|
|
||||||
|
### **使用TRSS Scripts部署**
|
||||||
|
[TRSS_Liteyuki轻雪机器人管理脚本](https://timerainstarsky.github.io/TRSS_Liteyuki/),该功能由TRSS提供支持,不是LiteyukiBot官方提供的功能,推荐使用`Arch Linux`
|
||||||
|
|
||||||
|
|
||||||
## **设备要求**
|
## **设备要求**
|
||||||
|
|
||||||
- Windows系统版本最低`Windows10+`/`Windows Server 2019+`
|
- Windows系统版本最低`Windows10+`/`Windows Server 2019+`
|
||||||
- Linux系统要支持Python3.10+,推荐`Ubuntu 20.04+`(~~别用你那b CentOS~~)
|
- Linux系统要支持Python3.10+,推荐`Ubuntu 20.04+`(~~别用你那b CentOS~~)
|
||||||
- CPU: 至少`1vCPU`
|
- CPU: 至少`1vCPU`
|
||||||
- 内存: Bot无其他插件会占用`200~300MB`,其他插件占用视具体插件而定,建议`1GB`以上
|
- 内存: Bot无其他插件会占用`300~500MB`,包括`chromium` 及 `node`等进程,其他插件占用视具体插件而定,建议`1GB`以上
|
||||||
- 硬盘: 至少`1GB`空间
|
- 硬盘: 至少`1GB`空间
|
||||||
|
|
||||||
> [!warning]
|
> [!warning]
|
||||||
> 如果设备上有多个环境,请使用`path/to/python -m pip install -r requirements.txt`来安装依赖,`path/to/python`为你的Python可执行文件路径
|
> 如果设备上有多个环境,请使用`path/to/python -m pip install -r requirements.txt`来安装依赖,`path/to/python`为你的Python可执行文件路径
|
||||||
|
|
||||||
> [!tip]
|
|
||||||
> 推荐使用虚拟环境来运行轻雪,以避免依赖冲突,你可以使用`python -m venv venv`来创建虚拟环境,然后使用`venv\Scripts\activate`来激活虚拟环境
|
|
||||||
|
|
||||||
> [!warning]
|
> [!warning]
|
||||||
> 轻雪的更新功能依赖Git,如果你没有安装Git,你将无法使用更新功能
|
> 轻雪的更新功能依赖Git,如果你没有安装Git直接下载源代码运行,你将无法使用更新功能
|
||||||
|
|
||||||
#### 其他问题请移步至[答疑](/deployment/fandq)
|
#### 其他问题请移步至[答疑](/deployment/fandq)
|
||||||
|
|
||||||
[//]: # (#### 想在Linux命令行中拥有更好的体验?试试[TRSS_Liteyuki轻雪机器人管理脚本](https://timerainstarsky.github.io/TRSS_Liteyuki/),该功能仅供参考,不是LiteyukiBot官方提供的功能)
|
|
@ -1,61 +0,0 @@
|
|||||||
---
|
|
||||||
title: 配置
|
|
||||||
icon: cog
|
|
||||||
order: 2
|
|
||||||
category: 使用指南
|
|
||||||
tag:
|
|
||||||
- 配置
|
|
||||||
- 部署
|
|
||||||
---
|
|
||||||
|
|
||||||
首次运行后生成`config.yml`,你可以修改配置项后重启轻雪,绝大多数情况下,你只需要修改`superusers`和`nickname`字段即可
|
|
||||||
|
|
||||||
## **基础配置项**
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
command_start: [ "/", "" ] # 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常
|
|
||||||
host: 127.0.0.1 # 监听地址,默认为本机,若要接收外部请求请填写0.0.0.0
|
|
||||||
port: 20216 # 绑定端口
|
|
||||||
nickname: [ "liteyuki" ] # 机器人昵称列表
|
|
||||||
superusers: [ "1919810" ] # 超级用户列表
|
|
||||||
```
|
|
||||||
|
|
||||||
## **其他配置**
|
|
||||||
|
|
||||||
以下为默认值,如需自定义请手动添加
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
onebot_access_token: "" # 访问令牌,对公开放时建议设置
|
|
||||||
default_language: "zh-CN" # 默认语言
|
|
||||||
alconna_auto_completion: false # alconna是否自动补全指令,默认false,建议开启
|
|
||||||
# 开发者选项
|
|
||||||
log_level: "INFO" # 日志等级
|
|
||||||
log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
|
|
||||||
auto_report: true # 是否自动上报问题给轻雪服务器
|
|
||||||
auto_update: true # 是否自动更新轻雪,每天4点检查更新
|
|
||||||
debug: false # 轻雪调试,开启后在调试时修改代码或资源会自动重载相应内容
|
|
||||||
safe_mode: false # 安全模式,开启后将不会加载任何第三方插件
|
|
||||||
# 其他Nonebot插件的配置项
|
|
||||||
custom_config_1: "custom_value1"
|
|
||||||
custom_config_2: "custom_value2"
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!tip]
|
|
||||||
> 如果要使用dotenv配置文件,请自行创建`.env.{ENVIRONMENT}`,并在`config.yml`中添加`environment:{ENVIRONMENT}`字段
|
|
||||||
|
|
||||||
## **OneBot实现端配置**
|
|
||||||
|
|
||||||
生产环境中推荐反向WebSocket
|
|
||||||
不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值
|
|
||||||
|
|
||||||
| 字段 | 参考值 | 说明 |
|
|
||||||
|-------------|------------------------------------|----------------------------------|
|
|
||||||
| 协议 | 反向WebSocket | 推荐使用反向ws协议进行通信,即轻雪作为服务端 |
|
|
||||||
| 地址 | ws://127.0.0.1:20216/onebot/v11/ws | 地址取决于配置文件,本机默认为`127.0.0.1:20216` |
|
|
||||||
| AccessToken | `""` | 如果你给轻雪配置了`AccessToken`,请在此填写相同的值 |
|
|
||||||
|
|
||||||
## **其他**
|
|
||||||
|
|
||||||
- 要使用其他通信方式请访问[OneBot Adapter](https://onebot.adapters.nonebot.dev/)获取详细信息
|
|
||||||
- 轻雪不局限于OneBot适配器,你可以使用NoneBot2支持的任何适配器
|
|
8
docs/dev/README.md
Normal file
8
docs/dev/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: 开发及贡献
|
||||||
|
index: false
|
||||||
|
icon: laptop-code
|
||||||
|
category: 开发
|
||||||
|
---
|
||||||
|
|
||||||
|
<Catalog />
|
7
docs/dev/api/README.md
Normal file
7
docs/dev/api/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki
|
||||||
|
index: true
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
227
docs/dev/api/bot/README.md
Normal file
227
docs/dev/api/bot/README.md
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.bot
|
||||||
|
index: true
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `get_bot() -> LiteyukiBot`
|
||||||
|
|
||||||
|
获取轻雪实例
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
LiteyukiBot: 当前的轻雪实例
|
||||||
|
|
||||||
|
### ***def*** `get_config(key: str, default: Any) -> Any`
|
||||||
|
|
||||||
|
获取配置
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
key: 配置键
|
||||||
|
|
||||||
|
default: 默认值
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Any: 配置值
|
||||||
|
|
||||||
|
### ***def*** `get_config_with_compat(key: str, compat_keys: tuple[str], default: Any) -> Any`
|
||||||
|
|
||||||
|
获取配置,兼容旧版本
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
key: 配置键
|
||||||
|
|
||||||
|
compat_keys: 兼容键
|
||||||
|
|
||||||
|
default: 默认值
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Any: 配置值
|
||||||
|
|
||||||
|
### ***def*** `print_logo() -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `LiteyukiBot`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###   ***def*** `__init__(self) -> None`
|
||||||
|
|
||||||
|
 初始化轻雪实例
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
*args:
|
||||||
|
|
||||||
|
**kwargs: 配置
|
||||||
|
|
||||||
|
###   ***def*** `run(self) -> None`
|
||||||
|
|
||||||
|
 启动逻辑
|
||||||
|
|
||||||
|
###   ***def*** `keep_alive(self) -> None`
|
||||||
|
|
||||||
|
 保持轻雪运行
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `restart(self, delay: int) -> None`
|
||||||
|
|
||||||
|
 重启轻雪本体
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `restart_process(self, name: Optional[str]) -> None`
|
||||||
|
|
||||||
|
 停止轻雪
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
name: 进程名称, 默认为None, 所有进程
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `init(self) -> None`
|
||||||
|
|
||||||
|
 初始化轻雪, 自动调用
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `init_logger(self) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `stop(self) -> None`
|
||||||
|
|
||||||
|
 停止轻雪
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_before_start(self, func: LIFESPAN_FUNC) -> None`
|
||||||
|
|
||||||
|
 注册启动前的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_start(self, func: LIFESPAN_FUNC) -> None`
|
||||||
|
|
||||||
|
 注册启动后的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_shutdown(self, func: LIFESPAN_FUNC) -> None`
|
||||||
|
|
||||||
|
 注册停止后的函数:未实现
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> None`
|
||||||
|
|
||||||
|
 注册进程停止前的函数,为子进程停止时调用
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_before_process_restart(self, func: LIFESPAN_FUNC) -> None`
|
||||||
|
|
||||||
|
 注册进程重启前的函数,为子进程重启时调用
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_restart(self, func: LIFESPAN_FUNC) -> None`
|
||||||
|
|
||||||
|
 注册重启后的函数:未实现
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_nonebot_init(self, func: LIFESPAN_FUNC) -> None`
|
||||||
|
|
||||||
|
 注册nonebot初始化后的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***var*** `executable = sys.executable`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `args = sys.argv`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `chan_active = get_channel(f'{name}-active')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `cmd = 'start'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `chan_active = get_channel(f'{process_name}-active')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `cmd = 'nohup'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `cmd = 'open'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `cmd = 'nohup'`
|
||||||
|
|
||||||
|
|
||||||
|
|
170
docs/dev/api/bot/lifespan.md
Normal file
170
docs/dev/api/bot/lifespan.md
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.bot.lifespan
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None`
|
||||||
|
|
||||||
|
运行函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
funcs:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***class*** `Lifespan`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###   ***def*** `__init__(self) -> None`
|
||||||
|
|
||||||
|
 轻雪生命周期管理,启动、停止、重启
|
||||||
|
|
||||||
|
###   ***@staticmethod***
|
||||||
|
###   ***def*** `run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None`
|
||||||
|
|
||||||
|
 运行函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
funcs:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||||
|
|
||||||
|
 注册启动时的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
LIFESPAN_FUNC:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||||
|
|
||||||
|
 注册启动时的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
LIFESPAN_FUNC:
|
||||||
|
|
||||||
|
###   ***def*** `on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||||
|
|
||||||
|
 注册停止前的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
LIFESPAN_FUNC:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||||
|
|
||||||
|
 注册停止后的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
LIFESPAN_FUNC:
|
||||||
|
|
||||||
|
###   ***def*** `on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||||
|
|
||||||
|
 注册重启时的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
LIFESPAN_FUNC:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||||
|
|
||||||
|
 注册重启后的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
LIFESPAN_FUNC:
|
||||||
|
|
||||||
|
###   ***def*** `on_after_nonebot_init(self, func: Any) -> None`
|
||||||
|
|
||||||
|
 注册 NoneBot 初始化后的函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `before_start(self) -> None`
|
||||||
|
|
||||||
|
 启动前
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `after_start(self) -> None`
|
||||||
|
|
||||||
|
 启动后
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `before_process_shutdown(self) -> None`
|
||||||
|
|
||||||
|
 停止前
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `after_shutdown(self) -> None`
|
||||||
|
|
||||||
|
 停止后
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `before_process_restart(self) -> None`
|
||||||
|
|
||||||
|
 重启前
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `after_restart(self) -> None`
|
||||||
|
|
||||||
|
 重启后
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***var*** `tasks = []`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `loop = asyncio.get_event_loop()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `loop = asyncio.new_event_loop()`
|
||||||
|
|
||||||
|
|
||||||
|
|
7
docs/dev/api/comm/README.md
Normal file
7
docs/dev/api/comm/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.comm
|
||||||
|
index: true
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
149
docs/dev/api/comm/channel.md
Normal file
149
docs/dev/api/comm/channel.md
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.comm.channel_
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `set_channel(name: str, channel: Channel) -> None`
|
||||||
|
|
||||||
|
设置通道实例
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
name: 通道名称
|
||||||
|
|
||||||
|
channel: 通道实例
|
||||||
|
|
||||||
|
### ***def*** `set_channels(channels: dict[str, Channel]) -> None`
|
||||||
|
|
||||||
|
设置通道实例
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
channels: 通道名称
|
||||||
|
|
||||||
|
### ***def*** `get_channel(name: str) -> Channel`
|
||||||
|
|
||||||
|
获取通道实例
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
name: 通道名称
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***def*** `get_channels() -> dict[str, Channel]`
|
||||||
|
|
||||||
|
获取通道实例
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***def*** `on_set_channel(data: tuple[str, dict[str, Any]]) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `on_get_channel(data: tuple[str, dict[str, Any]]) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `on_get_channels(data: tuple[str, dict[str, Any]]) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `decorator(func: Callable[[T], Any]) -> Callable[[T], Any]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***async def*** `wrapper(data: T) -> Any`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `Channel(Generic[T])`
|
||||||
|
|
||||||
|
通道类,可以在进程间和进程内通信,双向但同时只能有一个发送者和一个接收者
|
||||||
|
|
||||||
|
有两种接收工作方式,但是只能选择一种,主动接收和被动接收,主动接收使用 `receive` 方法,被动接收使用 `on_receive` 装饰器
|
||||||
|
|
||||||
|
###   ***def*** `__init__(self, _id: str, type_check: bool) -> None`
|
||||||
|
|
||||||
|
 初始化通道
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
_id: 通道ID
|
||||||
|
|
||||||
|
###   ***def*** `send(self, data: T) -> None`
|
||||||
|
|
||||||
|
 发送数据
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
data: 数据
|
||||||
|
|
||||||
|
###   ***def*** `receive(self) -> T`
|
||||||
|
|
||||||
|
 接收数据
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
###   ***def*** `close(self) -> None`
|
||||||
|
|
||||||
|
 关闭通道
|
||||||
|
|
||||||
|
###   ***def*** `on_receive(self, filter_func: Optional[FILTER_FUNC]) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]`
|
||||||
|
|
||||||
|
 接收数据并执行函数
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
filter_func: 过滤函数,为None则不过滤
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
装饰器,装饰一个函数在接收到数据后执行
|
||||||
|
|
||||||
|
### ***var*** `T = TypeVar('T')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `channel_deliver_active_channel = Channel(_id='channel_deliver_active_channel')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `channel_deliver_passive_channel = Channel(_id='channel_deliver_passive_channel')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `recv_chan = data[1]['recv_chan']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `recv_chan = Channel[Channel[Any]]('recv_chan')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `recv_chan = Channel[dict[str, Channel[Any]]]('recv_chan')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `data = self.conn_recv.recv()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `func = _callback_funcs[func_id]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `func = _callback_funcs[func_id]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `data = self.conn_recv.recv()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `data = self.conn_recv.recv()`
|
||||||
|
|
||||||
|
|
||||||
|
|
15
docs/dev/api/comm/event.md
Normal file
15
docs/dev/api/comm/event.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.comm.event
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***class*** `Event`
|
||||||
|
|
||||||
|
事件类
|
||||||
|
|
||||||
|
###   ***def*** `__init__(self, name: str, data: dict[str, Any]) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
140
docs/dev/api/comm/storage.md
Normal file
140
docs/dev/api/comm/storage.md
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.comm.storage
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `on_get(data: tuple[str, dict[str, Any]]) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `on_set(data: tuple[str, dict[str, Any]]) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `on_delete(data: tuple[str, dict[str, Any]]) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `on_get_all(data: tuple[str, dict[str, Any]]) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `KeyValueStore`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###   ***def*** `__init__(self) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `set(self, key: str, value: Any) -> None`
|
||||||
|
|
||||||
|
 设置键值对
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
key: 键
|
||||||
|
|
||||||
|
value: 值
|
||||||
|
|
||||||
|
###   ***def*** `get(self, key: str, default: Optional[Any]) -> Optional[Any]`
|
||||||
|
|
||||||
|
 获取键值对
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
key: 键
|
||||||
|
|
||||||
|
default: 默认值
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Any: 值
|
||||||
|
|
||||||
|
###   ***def*** `delete(self, key: str, ignore_key_error: bool) -> None`
|
||||||
|
|
||||||
|
 删除键值对
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
key: 键
|
||||||
|
|
||||||
|
ignore_key_error: 是否忽略键不存在的错误
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `get_all(self) -> dict[str, Any]`
|
||||||
|
|
||||||
|
 获取所有键值对
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
dict[str, Any]: 键值对
|
||||||
|
|
||||||
|
### ***class*** `GlobalKeyValueStore`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###   ***@classmethod***
|
||||||
|
###   ***def*** `get_instance(cls: Any) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***attr*** `_instance: None`
|
||||||
|
|
||||||
|
###   ***attr*** `_lock: threading.Lock()`
|
||||||
|
|
||||||
|
### ***var*** `key = data[1]['key']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `default = data[1]['default']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `recv_chan = data[1]['recv_chan']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `key = data[1]['key']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `value = data[1]['value']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `key = data[1]['key']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `recv_chan = data[1]['recv_chan']`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `lock = _get_lock(key)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `lock = _get_lock(key)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `recv_chan = Channel[Optional[Any]]('recv_chan')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `lock = _get_lock(key)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `recv_chan = Channel[dict[str, Any]]('recv_chan')`
|
||||||
|
|
||||||
|
|
||||||
|
|
99
docs/dev/api/config.md
Normal file
99
docs/dev/api/config.md
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.config
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `flat_config(config: dict[str, Any]) -> dict[str, Any]`
|
||||||
|
|
||||||
|
扁平化配置文件
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{a:{b:{c:1}}} -> {"a.b.c": 1}
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
config: 配置项目
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
扁平化后的配置文件,但也包含原有的键值对
|
||||||
|
|
||||||
|
### ***def*** `load_from_yaml(file: str) -> dict[str, Any]`
|
||||||
|
|
||||||
|
Load config from yaml file
|
||||||
|
|
||||||
|
### ***def*** `load_from_json(file: str) -> dict[str, Any]`
|
||||||
|
|
||||||
|
Load config from json file
|
||||||
|
|
||||||
|
### ***def*** `load_from_toml(file: str) -> dict[str, Any]`
|
||||||
|
|
||||||
|
Load config from toml file
|
||||||
|
|
||||||
|
### ***def*** `load_from_files() -> dict[str, Any]`
|
||||||
|
|
||||||
|
从指定文件加载配置项,会自动识别文件格式
|
||||||
|
|
||||||
|
默认执行扁平化选项
|
||||||
|
|
||||||
|
### ***def*** `load_configs_from_dirs() -> dict[str, Any]`
|
||||||
|
|
||||||
|
从目录下加载配置文件,不递归
|
||||||
|
|
||||||
|
按照读取文件的优先级反向覆盖
|
||||||
|
|
||||||
|
默认执行扁平化选项
|
||||||
|
|
||||||
|
### ***def*** `load_config_in_default(no_waring: bool) -> dict[str, Any]`
|
||||||
|
|
||||||
|
从一个标准的轻雪项目加载配置文件
|
||||||
|
|
||||||
|
项目目录下的config.*和config目录下的所有配置文件
|
||||||
|
|
||||||
|
项目目录下的配置文件优先
|
||||||
|
|
||||||
|
### ***class*** `SatoriNodeConfig(BaseModel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `SatoriConfig(BaseModel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `BasicConfig(BaseModel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `new_config = copy.deepcopy(config)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `config = yaml.safe_load(open(file, 'r', encoding='utf-8'))`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `config = json.load(open(file, 'r', encoding='utf-8'))`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `config = toml.load(open(file, 'r', encoding='utf-8'))`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `config = {}`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `config = {}`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `config = load_configs_from_dirs('config', no_waring=no_waring)`
|
||||||
|
|
||||||
|
|
||||||
|
|
7
docs/dev/api/core/README.md
Normal file
7
docs/dev/api/core/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.core
|
||||||
|
index: true
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
111
docs/dev/api/core/manager.md
Normal file
111
docs/dev/api/core/manager.md
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.core.manager
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***class*** `ChannelDeliver`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###   ***def*** `__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]]) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### ***class*** `ProcessManager`
|
||||||
|
|
||||||
|
进程管理器
|
||||||
|
|
||||||
|
###   ***def*** `__init__(self, lifespan: 'Lifespan') -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `start(self, name: str) -> None`
|
||||||
|
|
||||||
|
 开启后自动监控进程,并添加到进程字典中
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
name:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `start_all(self) -> None`
|
||||||
|
|
||||||
|
 启动所有进程
|
||||||
|
|
||||||
|
###   ***def*** `add_target(self, name: str, target: TARGET_FUNC, args: tuple, kwargs: Any) -> None`
|
||||||
|
|
||||||
|
 添加进程
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
name: 进程名,用于获取和唯一标识
|
||||||
|
|
||||||
|
target: 进程函数
|
||||||
|
|
||||||
|
args: 进程函数参数
|
||||||
|
|
||||||
|
kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
|
||||||
|
|
||||||
|
###   ***def*** `join_all(self) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `terminate(self, name: str) -> None`
|
||||||
|
|
||||||
|
 终止进程并从进程字典中删除
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
name:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
###   ***def*** `terminate_all(self) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `is_process_alive(self, name: str) -> bool`
|
||||||
|
|
||||||
|
 检查进程是否存活
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
name:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***var*** `TIMEOUT = 10`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `chan_active = get_channel(f'{name}-active')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `channel_deliver = ChannelDeliver(active=chan_active, passive=chan_passive, channel_deliver_active=channel_deliver_active_channel, channel_deliver_passive=channel_deliver_passive_channel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `process = self.processes[name]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `process = Process(target=self.targets[name][0], args=self.targets[name][1], kwargs=self.targets[name][2], daemon=True)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `data = chan_active.receive()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `kwargs = {}`
|
||||||
|
|
||||||
|
|
||||||
|
|
7
docs/dev/api/dev/README.md
Normal file
7
docs/dev/api/dev/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.dev
|
||||||
|
index: true
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
91
docs/dev/api/dev/observer.md
Normal file
91
docs/dev/api/dev/observer.md
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.dev.observer
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `debounce(wait: Any) -> None`
|
||||||
|
|
||||||
|
防抖函数
|
||||||
|
|
||||||
|
### ***def*** `on_file_system_event(directories: tuple[str], recursive: bool, event_filter: FILTER_FUNC) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]`
|
||||||
|
|
||||||
|
注册文件系统变化监听器
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
directories: 监听目录们
|
||||||
|
|
||||||
|
recursive: 是否递归监听子目录
|
||||||
|
|
||||||
|
event_filter: 事件过滤器, 返回True则执行回调函数
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
装饰器,装饰一个函数在接收到数据后执行
|
||||||
|
|
||||||
|
### ***def*** `decorator(func: Any) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `decorator(func: CALLBACK_FUNC) -> CALLBACK_FUNC`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `wrapper() -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `wrapper(event: FileSystemEvent) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `CodeModifiedHandler(FileSystemEventHandler)`
|
||||||
|
|
||||||
|
Handler for code file changes
|
||||||
|
|
||||||
|
###   ***def*** `on_modified(self, event: Any) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `on_created(self, event: Any) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `on_deleted(self, event: Any) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `on_moved(self, event: Any) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
###   ***def*** `on_any_event(self, event: Any) -> None`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### ***var*** `liteyuki_bot = get_bot()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `observer = Observer()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `last_call_time = None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `code_modified_handler = CodeModifiedHandler()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `current_time = time.time()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `last_call_time = current_time`
|
||||||
|
|
||||||
|
|
||||||
|
|
27
docs/dev/api/dev/plugin.md
Normal file
27
docs/dev/api/dev/plugin.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.dev.plugin
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `run_plugins() -> None`
|
||||||
|
|
||||||
|
运行插件,无需手动初始化bot
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
module_path: 插件路径,参考`liteyuki.load_plugin`的函数签名
|
||||||
|
|
||||||
|
### ***var*** `cfg = load_config_in_default()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `plugins = cfg.get('liteyuki.plugins', [])`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `bot = LiteyukiBot(**cfg)`
|
||||||
|
|
||||||
|
|
||||||
|
|
11
docs/dev/api/exception.md
Normal file
11
docs/dev/api/exception.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.exception
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***class*** `LiteyukiException(BaseException)`
|
||||||
|
|
||||||
|
Liteyuki的异常基类。
|
||||||
|
|
21
docs/dev/api/log.md
Normal file
21
docs/dev/api/log.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.log
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `get_format(level: str) -> str`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `init_log(config: dict) -> None`
|
||||||
|
|
||||||
|
在语言加载完成后执行
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***var*** `show_icon = config.get('log_icon', True)`
|
||||||
|
|
||||||
|
|
||||||
|
|
271
docs/dev/api/mkdoc.md
Normal file
271
docs/dev/api/mkdoc.md
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.mkdoc
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `get_relative_path(base_path: str, target_path: str) -> str`
|
||||||
|
|
||||||
|
获取相对路径
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
base_path: 基础路径
|
||||||
|
|
||||||
|
target_path: 目标路径
|
||||||
|
|
||||||
|
### ***def*** `write_to_files(file_data: dict[str, str]) -> None`
|
||||||
|
|
||||||
|
输出文件
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
file_data: 文件数据 相对路径
|
||||||
|
|
||||||
|
### ***def*** `get_file_list(module_folder: str) -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***def*** `get_module_info_normal(file_path: str, ignore_private: bool) -> ModuleInfo`
|
||||||
|
|
||||||
|
获取函数和类
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
file_path: Python 文件路径
|
||||||
|
|
||||||
|
ignore_private: 忽略私有函数和类
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
模块信息
|
||||||
|
|
||||||
|
### ***def*** `generate_markdown(module_info: ModuleInfo, front_matter: Any) -> str`
|
||||||
|
|
||||||
|
生成模块的Markdown
|
||||||
|
|
||||||
|
你可在此自定义生成的Markdown格式
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
module_info: 模块信息
|
||||||
|
|
||||||
|
front_matter: 自定义选项title, index, icon, category
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Markdown 字符串
|
||||||
|
|
||||||
|
### ***def*** `generate_docs(module_folder: str, output_dir: str, with_top: bool, ignored_paths: Any) -> None`
|
||||||
|
|
||||||
|
生成文档
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
module_folder: 模块文件夹
|
||||||
|
|
||||||
|
output_dir: 输出文件夹
|
||||||
|
|
||||||
|
with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
|
||||||
|
|
||||||
|
ignored_paths: 忽略的路径
|
||||||
|
|
||||||
|
### ***class*** `DefType(Enum)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###   ***attr*** `FUNCTION: 'function'`
|
||||||
|
|
||||||
|
###   ***attr*** `METHOD: 'method'`
|
||||||
|
|
||||||
|
###   ***attr*** `STATIC_METHOD: 'staticmethod'`
|
||||||
|
|
||||||
|
###   ***attr*** `CLASS_METHOD: 'classmethod'`
|
||||||
|
|
||||||
|
###   ***attr*** `PROPERTY: 'property'`
|
||||||
|
|
||||||
|
### ***class*** `FunctionInfo(BaseModel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `AttributeInfo(BaseModel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `ClassInfo(BaseModel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***class*** `ModuleInfo(BaseModel)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `NO_TYPE_ANY = 'Any'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `NO_TYPE_HINT = 'NoTypeHint'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `FUNCTION = 'function'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `METHOD = 'method'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `STATIC_METHOD = 'staticmethod'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `CLASS_METHOD = 'classmethod'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `PROPERTY = 'property'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `file_list = []`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `dot_sep_module_path = file_path.replace(os.sep, '.').replace('.py', '').replace('.pyi', '')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `module_docstring = ast.get_docstring(tree)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `module_info = ModuleInfo(module_path=dot_sep_module_path, functions=[], classes=[], attributes=[], docstring=module_docstring if module_docstring else '')`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `content = ''`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `front_matter = '---\n' + '\n'.join([f'{k}: {v}' for k, v in front_matter.items()]) + '\n---\n\n'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `file_list = get_file_list(module_folder)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `replace_data = {'__init__': 'README', '.py': '.md'}`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `file_content = file.read()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `tree = ast.parse(file_content)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in func.args]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `ignored_paths = []`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `no_module_name_pyfile_path = get_relative_path(module_folder, pyfile_path)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `rel_md_path = pyfile_path if with_top else no_module_name_pyfile_path`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `abs_md_path = os.path.join(output_dir, rel_md_path)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `module_info = get_module_info_normal(pyfile_path)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `md_content = generate_markdown(module_info, front_matter)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `inherit = f"({', '.join(cls.inherit)})" if cls.inherit else ''`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `rel_md_path = rel_md_path.replace(rk, rv)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `front_matter = {'title': module_info.module_path.replace('.__init__', '').replace('_', '\\n'), 'index': 'true', 'icon': 'laptop-code', 'category': 'API'}`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `front_matter = {'title': module_info.module_path.replace('_', '\\n'), 'order': '1', 'icon': 'laptop-code', 'category': 'API'}`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `function_docstring = ast.get_docstring(node)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `func_info = FunctionInfo(name=node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in node.args.args], return_type=ast.unparse(node.returns) if node.returns else 'None', docstring=function_docstring if function_docstring else '', type=DefType.FUNCTION, is_async=isinstance(node, ast.AsyncFunctionDef))`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `class_docstring = ast.get_docstring(node)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `class_info = ClassInfo(name=node.name, docstring=class_docstring if class_docstring else '', methods=[], attributes=[], inherit=[ast.unparse(base) for base in node.bases])`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in method.args]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] and arg[0] != 'self' else arg[0] for arg in method.args]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `first_arg = node.args.args[0]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `method_docstring = ast.get_docstring(class_node)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `def_type = DefType.METHOD`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `def_type = DefType.STATIC_METHOD`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `attr_type = NO_TYPE_HINT`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `def_type = DefType.CLASS_METHOD`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `attr_type = ast.unparse(node.value.annotation)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `def_type = DefType.PROPERTY`
|
||||||
|
|
||||||
|
|
||||||
|
|
15
docs/dev/api/plugin/README.md
Normal file
15
docs/dev/api/plugin/README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.plugin
|
||||||
|
index: true
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `get_loaded_plugins() -> dict[str, Plugin]`
|
||||||
|
|
||||||
|
获取已加载的插件
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
dict[str, Plugin]: 插件字典
|
||||||
|
|
103
docs/dev/api/plugin/load.md
Normal file
103
docs/dev/api/plugin/load.md
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.plugin.load
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `load_plugin(module_path: str | Path) -> Optional[Plugin]`
|
||||||
|
|
||||||
|
加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
参数:
|
||||||
|
|
||||||
|
module_path: 插件名称 `path.to.your.plugin`
|
||||||
|
|
||||||
|
或插件路径 `pathlib.Path(path/to/your/plugin)`
|
||||||
|
|
||||||
|
### ***def*** `load_plugins() -> set[Plugin]`
|
||||||
|
|
||||||
|
导入文件夹下多个插件
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
参数:
|
||||||
|
|
||||||
|
plugin_dir: 文件夹路径
|
||||||
|
|
||||||
|
ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
|
||||||
|
|
||||||
|
### ***def*** `format_display_name(display_name: str, plugin_type: PluginType) -> str`
|
||||||
|
|
||||||
|
设置插件名称颜色,根据不同类型插件设置颜色
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
display_name: 插件名称
|
||||||
|
|
||||||
|
plugin_type: 插件类型
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
str: 设置后的插件名称 <y>name</y>
|
||||||
|
|
||||||
|
### ***var*** `module_path = path_to_module_name(Path(module_path)) if isinstance(module_path, Path) else module_path`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `plugins = set()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `color = 'y'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `module = import_module(module_path)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `display_name = module.__name__.split('.')[-1]`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `path = Path(os.path.join(dir_path, f))`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `module_name = None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `color = 'm'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `color = 'g'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `color = 'e'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `color = 'c'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `module_name = f'{path_to_module_name(Path(dir_path))}.{f[:-3]}'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `module_name = path_to_module_name(path)`
|
||||||
|
|
||||||
|
|
||||||
|
|
7
docs/dev/api/plugin/manager.md
Normal file
7
docs/dev/api/plugin/manager.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.plugin.manager
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
89
docs/dev/api/plugin/model.md
Normal file
89
docs/dev/api/plugin/model.md
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.plugin.model
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***class*** `PluginType(Enum)`
|
||||||
|
|
||||||
|
插件类型枚举值
|
||||||
|
|
||||||
|
###   ***attr*** `APPLICATION: 'application'`
|
||||||
|
|
||||||
|
###   ***attr*** `SERVICE: 'service'`
|
||||||
|
|
||||||
|
###   ***attr*** `IMPLEMENTATION: 'implementation'`
|
||||||
|
|
||||||
|
###   ***attr*** `MODULE: 'module'`
|
||||||
|
|
||||||
|
###   ***attr*** `UNCLASSIFIED: 'unclassified'`
|
||||||
|
|
||||||
|
### ***class*** `PluginMetadata(BaseModel)`
|
||||||
|
|
||||||
|
轻雪插件元数据,由插件编写者提供,name为必填项
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
name: str
|
||||||
|
|
||||||
|
插件名称
|
||||||
|
|
||||||
|
description: str
|
||||||
|
|
||||||
|
插件描述
|
||||||
|
|
||||||
|
usage: str
|
||||||
|
|
||||||
|
插件使用方法
|
||||||
|
|
||||||
|
type: str
|
||||||
|
|
||||||
|
插件类型
|
||||||
|
|
||||||
|
author: str
|
||||||
|
|
||||||
|
插件作者
|
||||||
|
|
||||||
|
homepage: str
|
||||||
|
|
||||||
|
插件主页
|
||||||
|
|
||||||
|
extra: dict[str, Any]
|
||||||
|
|
||||||
|
额外信息
|
||||||
|
|
||||||
|
### ***class*** `Plugin(BaseModel)`
|
||||||
|
|
||||||
|
存储插件信息
|
||||||
|
|
||||||
|
###   ***attr*** `model_config: {'arbitrary_types_allowed': True}`
|
||||||
|
|
||||||
|
### ***var*** `APPLICATION = 'application'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `SERVICE = 'service'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `IMPLEMENTATION = 'implementation'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `MODULE = 'module'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `UNCLASSIFIED = 'unclassified'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `model_config = {'arbitrary_types_allowed': True}`
|
||||||
|
|
||||||
|
|
||||||
|
|
79
docs/dev/api/utils.md
Normal file
79
docs/dev/api/utils.md
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
---
|
||||||
|
title: liteyuki.utils
|
||||||
|
order: 1
|
||||||
|
icon: laptop-code
|
||||||
|
category: API
|
||||||
|
---
|
||||||
|
|
||||||
|
### ***def*** `is_coroutine_callable(call: Callable[..., Any]) -> bool`
|
||||||
|
|
||||||
|
判断是否为协程可调用对象
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
call: 可调用对象
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
bool: 是否为协程可调用对象
|
||||||
|
|
||||||
|
### ***def*** `run_coroutine() -> None`
|
||||||
|
|
||||||
|
运行协程
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
coro:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
### ***def*** `path_to_module_name(path: Path) -> str`
|
||||||
|
|
||||||
|
转换路径为模块名
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
path: 路径a/b/c/d -> a.b.c.d
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
str: 模块名
|
||||||
|
|
||||||
|
### ***def*** `async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]`
|
||||||
|
|
||||||
|
异步包装器
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
func: Sync Callable
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Coroutine: Asynchronous Callable
|
||||||
|
|
||||||
|
### ***async def*** `wrapper() -> None`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `IS_MAIN_PROCESS = multiprocessing.current_process().name == 'MainProcess'`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `func_ = getattr(call, '__call__', None)`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `rel_path = path.resolve().relative_to(Path.cwd().resolve())`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `loop = asyncio.get_event_loop()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### ***var*** `loop = asyncio.new_event_loop()`
|
||||||
|
|
||||||
|
|
||||||
|
|
99
docs/dev/dev_comm.md
Normal file
99
docs/dev/dev_comm.md
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
---
|
||||||
|
title: 进程通信
|
||||||
|
icon: exchange-alt
|
||||||
|
order: 4
|
||||||
|
category: 开发
|
||||||
|
---
|
||||||
|
|
||||||
|
## **通道通信**
|
||||||
|
|
||||||
|
### 简介
|
||||||
|
|
||||||
|
轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道`Channel`用于跨进程通信,你可以通过`Channel`发送消息给其他进程,也可以监听其他进程的消息。
|
||||||
|
|
||||||
|
例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。
|
||||||
|
|
||||||
|
### 示例
|
||||||
|
|
||||||
|
通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由`chan.on_receive()`装饰回调函数实现,主动模式需调用`chan.receive()`实现
|
||||||
|
|
||||||
|
- 创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为`{process_name}-active`和`{process_name}-passive`,
|
||||||
|
- 主进程中通过`get_channel`函数获取通道对象
|
||||||
|
- 子进程中导入单例`active_channel`及`passive_channel`即可
|
||||||
|
|
||||||
|
> 在轻雪插件中(主进程中)
|
||||||
|
|
||||||
|
```python
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
from liteyuki.comm import get_channel, Channel
|
||||||
|
from liteyuki import get_bot
|
||||||
|
|
||||||
|
# get_channel函数获取通道对象,参数为调用set_channel时的通道标识
|
||||||
|
channel_passive = get_channel("nonebot-passive") # 获取被动通道
|
||||||
|
channel_active = get_channel("nonebot-active") # 获取主动通道
|
||||||
|
liteyuki_bot = get_bot()
|
||||||
|
|
||||||
|
|
||||||
|
# 注册一个函数在轻雪启动后运行
|
||||||
|
@liteyuki_bot.on_after_start
|
||||||
|
async def send_data():
|
||||||
|
while True:
|
||||||
|
channel_passive.send("I am liteyuki main process passive")
|
||||||
|
channel_active.send("I am liteyuki main process active")
|
||||||
|
await asyncio.sleep(3) # 每3秒发送一次消息
|
||||||
|
```
|
||||||
|
|
||||||
|
> 在子进程中(例如NoneBot插件中)
|
||||||
|
|
||||||
|
```python
|
||||||
|
from nonebot import get_driver
|
||||||
|
from liteyuki.comm import active_channel, passive_channel # 子进程中获取通道直接导入进程全局单例即可
|
||||||
|
from liteyuki.log import logger
|
||||||
|
|
||||||
|
driver = get_driver()
|
||||||
|
|
||||||
|
|
||||||
|
# 被动模式,通过装饰器注册一个函数在接收到消息时运行,每次接收到字符串数据时都会运行
|
||||||
|
@passive_channel.on_receive(filter_func=lambda data: isinstance(data, str))
|
||||||
|
async def on_passive_receive(data):
|
||||||
|
logger.info(f"Passive receive: {data}")
|
||||||
|
|
||||||
|
|
||||||
|
# 注册一个函数在NoneBot启动后运行
|
||||||
|
@driver.on_startup
|
||||||
|
def on_startup():
|
||||||
|
while True:
|
||||||
|
data = active_channel.receive()
|
||||||
|
logger.info(f"Active receive: {data}")
|
||||||
|
```
|
||||||
|
|
||||||
|
> 启动后控制台输出
|
||||||
|
|
||||||
|
```log
|
||||||
|
0000-00-00 00:00:00 [ℹ️信息] Passive receive: I am liteyuki main process passive
|
||||||
|
0000-00-00 00:00:00 [ℹ️信息] Active receive: I am liteyuki main process active
|
||||||
|
0000-00-00 00:00:03 [ℹ️信息] Passive receive: I am liteyuki main process passive
|
||||||
|
0000-00-00 00:00:03 [ℹ️信息] Active receive: I am liteyuki main process active
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## **共享内存通信**
|
||||||
|
|
||||||
|
### 简介
|
||||||
|
|
||||||
|
- 相比于普通进程通信,内存共享使得代码编写更加简洁,轻雪框架提供了一个内存共享通信的接口,你可以通过`storage`模块实现内存共享通信,该模块封装通道实现
|
||||||
|
- 内存共享是线程安全的,你可以在多个线程中读写共享内存,线程锁会自动保护共享内存的读写操作
|
||||||
|
|
||||||
|
### 示例
|
||||||
|
|
||||||
|
> 在任意进程中均可使用
|
||||||
|
|
||||||
|
```python
|
||||||
|
from liteyuki.comm.storage import shared_memory
|
||||||
|
|
||||||
|
shared_memory.set("key", "value") # 设置共享内存
|
||||||
|
value = shared_memory.get("key") # 获取共享内存
|
||||||
|
```
|
||||||
|
|
||||||
|
源代码:[liteyuki/comm/storage.py](https://github.com/LiteyukiStudio/LiteyukiBot/blob/main/liteyuki/comm/storage.py)
|
74
docs/dev/dev_lyfunc.md
Normal file
74
docs/dev/dev_lyfunc.md
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
title: 轻雪函数
|
||||||
|
icon: code
|
||||||
|
order: 2
|
||||||
|
category: 开发
|
||||||
|
---
|
||||||
|
|
||||||
|
## **轻雪函数**
|
||||||
|
|
||||||
|
轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.
|
||||||
|
|
||||||
|
### **函数文件**
|
||||||
|
|
||||||
|
函数文件放在资源包的`functions`目录下,文件名以`.mcfunction` `.lyfunction` `.lyf`结尾,例如`test.mcfunction`,文件内容为一系列的命令,每行一个命令,支持单行注释`#`(编辑时的语法高亮可采取`shell`格式),例如:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 在发信器输出"hello world"
|
||||||
|
cmd echo hello world
|
||||||
|
|
||||||
|
# 如果你想同时输出多行内容可以尝试换行符(Python格式)
|
||||||
|
cmd echo hello world\nLiteyuki bot
|
||||||
|
```
|
||||||
|
|
||||||
|
也支持句末注释,例如:
|
||||||
|
```shell
|
||||||
|
cmd echo hello world # 输出"hello world"
|
||||||
|
```
|
||||||
|
|
||||||
|
### **命令文档**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
var <var1=value1> [var2=value2] ... # 定义变量
|
||||||
|
cmd <command> # 在设备上执行命令
|
||||||
|
api <api_name> [var=value...] # 调用Bot API
|
||||||
|
function <func_name> # 调用函数,可递归
|
||||||
|
sleep <time> # 异步等待,单位s
|
||||||
|
nohup <command> # 使用新的task执行命令,即不等待
|
||||||
|
end # 结束函数关键字,包括子task
|
||||||
|
await # 等待所有异步任务结束,若函数中启动了其他task,需要在最后调用,否则task对象会被销毁
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### **示例**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 疯狂戳好友
|
||||||
|
# 使用 /function poke user_id=123456 执行
|
||||||
|
# 每隔0.2s戳两次,无限戳,会触发最大递归深度限制
|
||||||
|
# 若要戳20s后停止,则需要删除await,添加sleep 20和end
|
||||||
|
api friend_poke user_id=user_id
|
||||||
|
api friend_poke user_id=user_id
|
||||||
|
sleep 0.2
|
||||||
|
nohup function poke
|
||||||
|
await
|
||||||
|
```
|
||||||
|
|
||||||
|
### **API**
|
||||||
|
|
||||||
|
理论上所有基于onebotv11的api都可调用,不同Adapter api也有差别.
|
||||||
|
|
||||||
|
[Onebot v11 API文档](https://283375.github.io/onebot_v11_vitepress/api/index.html)
|
||||||
|
|
||||||
|
### **结束关键字**
|
||||||
|
|
||||||
|
由于LiteyukiBot基于异步运行, 所以在编写lyfunction时也要注意异步的调用,避免出现"单线程走到底"的情况是效率提升的关键.
|
||||||
|
|
||||||
|
`await` 异步任务结束关键字,用于结束当前已完成function的执行
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> 但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁
|
||||||
|
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> 编写轻雪函数推荐你使用VS Code插件[Liteyuki Function](https://github.com/LiteyukiStudio/lyfunctionTextmate)实现语法高亮
|
82
docs/dev/dev_lyplugin.md
Normal file
82
docs/dev/dev_lyplugin.md
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
---
|
||||||
|
title: 轻雪插件开发
|
||||||
|
icon: laptop-code
|
||||||
|
order: 3
|
||||||
|
category: 开发
|
||||||
|
---
|
||||||
|
|
||||||
|
## 简介
|
||||||
|
|
||||||
|
轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能
|
||||||
|
|
||||||
|
## 开始
|
||||||
|
|
||||||
|
### 创建插件
|
||||||
|
|
||||||
|
一个`.py`文件或一个包含`__init__.py`的文件夹即可被识别为插件
|
||||||
|
|
||||||
|
首先创建一个文件夹,例如`watchdog_plugin`,并在其中创建一个`__init__.py`文件,即可创建一个插件
|
||||||
|
|
||||||
|
`__init__.py`
|
||||||
|
```python
|
||||||
|
from liteyuki.plugin import PluginMetadata, PluginType
|
||||||
|
from .watch_dog import * # 导入逻辑部分
|
||||||
|
|
||||||
|
# 定义插件元数据
|
||||||
|
__plugin_meta__ = PluginMetadata(
|
||||||
|
name="NoneDog", # 插件名称
|
||||||
|
version="1.0.0", # 插件版本
|
||||||
|
description="A simple plugin for nonebot developer", # 插件描述
|
||||||
|
type=PluginType.SERVICE # 插件类型
|
||||||
|
)
|
||||||
|
|
||||||
|
# 你的插件代码
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
### 编写逻辑部分
|
||||||
|
|
||||||
|
轻雪主进程不涉及聊天部分,因此插件主要是一些后台任务或者与聊天机器人的通信
|
||||||
|
以下我们会编写一个简单的插件,用于开发NoneBot时进行文件系统变更重载
|
||||||
|
`watch_dog.py`
|
||||||
|
```python
|
||||||
|
import os
|
||||||
|
from liteyuki.dev import observer # 导入文件系统观察器
|
||||||
|
from liteyuki import get_bot, logger # 导入轻雪Bot和日志
|
||||||
|
from watchdog.events import FileSystemEvent # 导入文件系统事件
|
||||||
|
|
||||||
|
liteyuki = get_bot() # 获取唯一的轻雪Bot实例
|
||||||
|
|
||||||
|
exclude_extensions = (".pyc", ".pyo") # 排除的文件扩展名
|
||||||
|
|
||||||
|
|
||||||
|
# 用observer的on_file_system_event装饰器监听文件系统事件
|
||||||
|
@observer.on_file_system_event(
|
||||||
|
directories=("src/nonebot_plugins",),
|
||||||
|
event_filter=lambda event: not event.src_path.endswith(exclude_extensions) and ("__pycache__" not in event.src_path) and os.path.isfile(event.src_path)
|
||||||
|
)
|
||||||
|
def restart_nonebot_process(event: FileSystemEvent):
|
||||||
|
logger.debug(f"File {event.src_path} changed, reloading nonebot...")
|
||||||
|
liteyuki.restart_process("nonebot") # 调用重启进程方法
|
||||||
|
```
|
||||||
|
|
||||||
|
### 加载插件
|
||||||
|
|
||||||
|
#### 方法1
|
||||||
|
|
||||||
|
- 在配置文件中的`liteyuki.plugins`中添加你的插件路径,例如`watchdog_plugin`,重启轻雪即可加载插件。
|
||||||
|
|
||||||
|
#### 方法2
|
||||||
|
|
||||||
|
- 使用开发工具快速运行插件,无需手动创建实例
|
||||||
|
- 创建入口文件,例如`main.py`,并在其中写入以下代码
|
||||||
|
|
||||||
|
```python
|
||||||
|
from liteyuki.dev.plugin import run_plugins
|
||||||
|
|
||||||
|
run_plugins("watchdog_plugin")
|
||||||
|
```
|
||||||
|
|
||||||
|
然后运行`python main.py`即可启动插件
|
||||||
|
|
||||||
|
启用插件后,我们在src/nonebot_plugins下创建一个文件,例如`test.py`,并在其中写入一些代码,保存后轻雪会自动重载NoneBot进程
|
@ -1,20 +1,28 @@
|
|||||||
---
|
---
|
||||||
title: 资源包
|
title: 资源包开发
|
||||||
icon: paint-brush
|
icon: box
|
||||||
order: 3
|
order: 1
|
||||||
category: 使用手册
|
category: 开发
|
||||||
---
|
---
|
||||||
|
|
||||||
## 简介
|
## 简介
|
||||||
|
|
||||||
资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码
|
资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码
|
||||||
|
|
||||||
- [资源/主题商店](/store/)提供了一些资源包供你选择,你也可以自己制作资源包
|
- [资源/主题商店](/store/)提供了一些资源包供你选择,你也可以自己制作资源包
|
||||||
- 资源包的制作很简单,如果你接触过`Minecraft`的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。
|
- 资源包的制作很简单,如果你接触过`Minecraft`的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。
|
||||||
- 部分内容制作需要一点点前端基础,例如`html`,`css`
|
- 部分内容制作需要一点点前端基础,例如`html`,`css`
|
||||||
- 轻雪原版资源包请查看`LiteyukiBot/liteyuki/resources`,可以在此基础上进行修改
|
- 轻雪原版资源包请查看`LiteyukiBot/liteyuki/resources`,可以在此基础上进行修改
|
||||||
- 欢迎各位投稿资源包到轻雪资源商店
|
- 欢迎各位投稿资源包到轻雪资源商店
|
||||||
|
|
||||||
|
请注意,主题包中的html渲染使用Js来规定数据的渲染位置,请确保您所编写的html代码能被Bot解析,否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码,以避免出现无法预料的问题。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 加载资源包
|
## 加载资源包
|
||||||
|
|
||||||
- 资源包通常是以`.zip`格式压缩的,只需要将其解压到根目录`resources`目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
|
- 资源包通常是以`.zip`格式压缩的,只需要将其解压到根目录`resources`目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
main.py
|
main.py
|
||||||
resources
|
resources
|
||||||
@ -26,8 +34,10 @@ resources
|
|||||||
├─metadata.yml
|
├─metadata.yml
|
||||||
└─...
|
└─...
|
||||||
```
|
```
|
||||||
|
|
||||||
- 你自己制作的资源包也应该遵循这个规则,并且应该在`metadata.yml`中填写一些信息
|
- 你自己制作的资源包也应该遵循这个规则,并且应该在`metadata.yml`中填写一些信息
|
||||||
- 若没有`metadata.yml`文件,则该文件夹不会被识别为资源包
|
- 若没有`metadata.yml`文件,则该文件夹不会被识别为资源包
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: "资源包名称"
|
name: "资源包名称"
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
@ -35,5 +45,9 @@ description: "资源包描述"
|
|||||||
# 你可以自定义一些信息,但请保证以上三个字段
|
# 你可以自定义一些信息,但请保证以上三个字段
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
- 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,例如,你在A包中定义了一个`index.html`文件,B包也定义了一个`index.html`文件,那么加载B包后,A包中的`index.html`文件会被覆盖
|
- 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,例如,你在A包中定义了一个`index.html`文件,B包也定义了一个`index.html`文件,那么加载B包后,A包中的`index.html`文件会被覆盖
|
||||||
- 对于不同资源包的不同文件,是可以相对引用的,例如你在A中定义了`templates/index.html`,在B中定义了`templates/style.css`,可以在A的`index.html`中用`./style.css`相对路径引用B中的css
|
- 对于不同资源包的不同文件,是可以相对引用的,例如你在A中定义了`templates/index.html`,在B中定义了`templates/style.css`,可以在A的`index.html`中用`./style.css`相对路径引用B中的css
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> 资源包的结构会随着轻雪的更新而有变动,第三方资源包开发者需要注意版本兼容性,同时用户也应该自行选择可用的资源包
|
82
docs/en/README.md
Normal file
82
docs/en/README.md
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
---
|
||||||
|
home: true
|
||||||
|
icon: home
|
||||||
|
title: Home
|
||||||
|
heroImage: https://cdn.liteyuki.icu/static/svg/lylogo-full.svg
|
||||||
|
heroImageDark: https://cdn.liteyuki.icu/static/svg/lylogo-full-dark.svg
|
||||||
|
bgImage:
|
||||||
|
bgImageDark:
|
||||||
|
bgImageStyle:
|
||||||
|
background-attachment: fixed
|
||||||
|
heroText: LiteyukiBot
|
||||||
|
tagline: LiteyukiBot A high-performance, easy-to-use chatbot framework and application
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- text: Get Started
|
||||||
|
icon: rocket
|
||||||
|
link: ./deploy/install.html
|
||||||
|
type: primary
|
||||||
|
|
||||||
|
- text: Usage
|
||||||
|
icon: book
|
||||||
|
link: ./usage/basic_command.html
|
||||||
|
|
||||||
|
highlights:
|
||||||
|
- header: Simple and Efficient
|
||||||
|
image: /assets/image/layout.svg
|
||||||
|
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
|
||||||
|
bgImageDark: https://theme-hope-assets.vuejs.press/bg/2-dark.svg
|
||||||
|
bgImageStyle:
|
||||||
|
background-repeat: repeat
|
||||||
|
background-size: initial
|
||||||
|
features:
|
||||||
|
- title: Multi-Framework Support
|
||||||
|
icon: robot
|
||||||
|
details: Compatible with nonebot, melobot, etc., with good ecological support
|
||||||
|
link: https://nonebot.dev/
|
||||||
|
|
||||||
|
- title: Convenient Management
|
||||||
|
icon: plug
|
||||||
|
details: Use package manager to manage plugins and resource packs
|
||||||
|
|
||||||
|
- title: Custom Themes Support
|
||||||
|
icon: paint-brush
|
||||||
|
details: Fully customize the appearance with resource packs
|
||||||
|
link: https://bot.liteyuki.icu/usage/resource_pack.html
|
||||||
|
|
||||||
|
- title: i18n
|
||||||
|
icon: globe
|
||||||
|
details: Support multiple languages through resource packs
|
||||||
|
link: https://baike.baidu.com/item/i18n/6771940
|
||||||
|
|
||||||
|
- title: Easy to Use
|
||||||
|
icon: cog
|
||||||
|
details: No need for cumbersome pre-processes, ready to use
|
||||||
|
link: https://bot.liteyuki.icu/deployment/config.html
|
||||||
|
|
||||||
|
- title: High Performance
|
||||||
|
icon: tachometer-alt
|
||||||
|
details: 500 plugins, start within 2s
|
||||||
|
|
||||||
|
- title: Rolling Update
|
||||||
|
icon: cloud-download
|
||||||
|
details: Keep your bot up to date
|
||||||
|
|
||||||
|
- title: OpenSource
|
||||||
|
icon: code
|
||||||
|
details: MIT LICENCE open source project, welcome your contribution
|
||||||
|
|
||||||
|
- header: Quick Start
|
||||||
|
image: /assets/image/box.svg
|
||||||
|
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
|
||||||
|
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
|
||||||
|
highlights:
|
||||||
|
- title: Install Git and Python3.10+ environment
|
||||||
|
- title: Use <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> to clone the project locally
|
||||||
|
- title: Use <code>cd LiteyukiBot</code> to change the directory to the project root
|
||||||
|
- title: Use <code>pip install -r requirements.txt</code> install the project dependencies
|
||||||
|
details: If you have multiple Python environments, please use <code>pythonx -m pip install -r requirements.txt</code>.
|
||||||
|
- title: Start bot with <code>python main.py</code>.
|
||||||
|
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
||||||
|
|
||||||
|
---
|
8
docs/en/deploy/README.md
Normal file
8
docs/en/deploy/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Deploy
|
||||||
|
index: false
|
||||||
|
icon: laptop-code
|
||||||
|
category: deploy
|
||||||
|
---
|
||||||
|
|
||||||
|
<Catalog />
|
9
docs/en/deploy/cfg.txt
Normal file
9
docs/en/deploy/cfg.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# note
|
||||||
|
开发者选项
|
||||||
|
allow_update: true # 是否允许更新
|
||||||
|
log_level: "INFO" # 日志等级
|
||||||
|
log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
|
||||||
|
auto_report: true # 是否自动上报问题给轻雪服务器
|
||||||
|
auto_update: true # 是否自动更新轻雪,每天4点检查更新
|
||||||
|
safe_mode: false # 安全模式,开启后将不会加载任何第三方插件
|
||||||
|
dev_mode: false # 开发者模式,开启后将会启动看门狗
|
77
docs/en/deploy/config.md
Normal file
77
docs/en/deploy/config.md
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
title: Configuration
|
||||||
|
icon: cog
|
||||||
|
order: 2
|
||||||
|
category: deployment
|
||||||
|
tag:
|
||||||
|
- Configuration
|
||||||
|
---
|
||||||
|
|
||||||
|
轻雪支持`yaml`、`json`和`toml`作为配置文件,取决于你个人的喜好
|
||||||
|
|
||||||
|
首次运行后生成`config.yml`和`config`目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改`superusers`及`nickname`字段即可
|
||||||
|
|
||||||
|
启动时会加载项目目录下`config.yml/yaml/json/toml`和`config`目录下的所有配置文件,你可在`config`目录下创建多个配置文件,轻雪会自动合并这些配置文件
|
||||||
|
|
||||||
|
## **基础配置项**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
nonebot:
|
||||||
|
# Nonebot机器人的配置,以前的最外层配置项仍可为Nonebot服务,但是部分内容会被覆盖,请尽快迁移
|
||||||
|
command_start: [ "/", "" ] # 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常
|
||||||
|
host: 127.0.0.1 # 监听地址,默认为本机,若要接收外部请求请填写0.0.0.0
|
||||||
|
port: 20216 # 绑定端口
|
||||||
|
nickname: [ "liteyuki" ] # 机器人昵称列表
|
||||||
|
superusers: [ "1919810" ] # 超级用户列表
|
||||||
|
liteyuki:
|
||||||
|
# 写在外层的配置项将会被覆盖,建议迁移到liteyuki下
|
||||||
|
log_level: "INFO" # 日志等级
|
||||||
|
log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
|
||||||
|
auto_report: true # 是否自动上报问题给轻雪服务器
|
||||||
|
auto_update: true # 是否自动更新轻雪,每天4点检查更新
|
||||||
|
plugins: [ ] # 轻雪插件列表
|
||||||
|
plugin_dirs: [ ] # 轻雪插件目录列表
|
||||||
|
```
|
||||||
|
|
||||||
|
## **其他配置**
|
||||||
|
|
||||||
|
以下为默认值,如需自定义请手动添加
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# 高级NoneBot配置
|
||||||
|
nonebot:
|
||||||
|
onebot_access_token: "" # 访问令牌,对公开放时建议设置
|
||||||
|
default_language: "zh-CN" # 默认语言
|
||||||
|
alconna_auto_completion: false # alconna是否自动补全指令,默认false,建议开启
|
||||||
|
safe_mode: false # 安全模式,开启后将不会加载任何第三方NoneBot插件
|
||||||
|
# 其他Nonebot插件的配置项
|
||||||
|
custom_config_1: "custom_value1"
|
||||||
|
custom_config_2: "custom_value2"
|
||||||
|
|
||||||
|
# 开发者选项
|
||||||
|
liteyuki:
|
||||||
|
allow_update: true # 是否允许更新
|
||||||
|
debug: false # 轻雪调试,开启会自动重载Bot或者资源,其他插件自带的调试功能也将开启
|
||||||
|
dev_mode: false # 开发者模式,开启后将会启动监视者,监视文件变化并自动重载
|
||||||
|
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> 如果要使用NoneBot和dotenv配置文件,请自行创建`.env.{ENVIRONMENT}`,并在`config.yml`中添加`nonebot.environment:{ENVIRONMENT}`字段
|
||||||
|
|
||||||
|
## **与NoneBot对接的OneBot实现端配置**
|
||||||
|
|
||||||
|
生产环境中推荐反向WebSocket
|
||||||
|
不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值
|
||||||
|
|
||||||
|
| 字段 | 参考值 | 说明 |
|
||||||
|
|-------------|------------------------------------|----------------------------------|
|
||||||
|
| 协议 | 反向WebSocket | 推荐使用反向ws协议进行通信,即轻雪作为服务端 |
|
||||||
|
| 地址 | ws://127.0.0.1:20216/onebot/v11/ws | 地址取决于配置文件,本机默认为`127.0.0.1:20216` |
|
||||||
|
| AccessToken | `""` | 如果你给轻雪配置了`AccessToken`,请在此填写相同的值 |
|
||||||
|
|
||||||
|
## **其他**
|
||||||
|
|
||||||
|
- 要使用其他通信方式请访问[OneBot Adapter](https://onebot.adapters.nonebot.dev/)获取详细信息
|
||||||
|
- 轻雪不局限于OneBot适配器,你可以使用NoneBot2支持的任何适配器
|
57
docs/en/deploy/fandq.md
Normal file
57
docs/en/deploy/fandq.md
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
title: FAQ
|
||||||
|
icon: question
|
||||||
|
order: 3
|
||||||
|
category: deployment
|
||||||
|
tag:
|
||||||
|
- FAQ
|
||||||
|
---
|
||||||
|
|
||||||
|
## **常见问题**
|
||||||
|
|
||||||
|
- 设备上Python环境太乱了,pip和python不对应怎么办?
|
||||||
|
- 请使用`/path/to/python -m pip install -r requirements.txt`来安装依赖,
|
||||||
|
然后用`/path/to/python main.py`来启动Bot,
|
||||||
|
其中`/path/to/python`是你要用来运行Bot的可执行文件
|
||||||
|
|
||||||
|
- 为什么我启动后机器人没有反应?
|
||||||
|
- 请检查配置文件的`command_start`或`superusers`,确认你有权限使用命令并按照正确的命令发送
|
||||||
|
- 确认命令头没有和`nickname{}`冲突,例如一个命令是`help`,但是`Bot`昵称有一个`help`,那么将会被解析为nickname而不是命令
|
||||||
|
|
||||||
|
- 更新轻雪失败,报错`InvalidGitRepositoryError`
|
||||||
|
- 请正确安装`Git`,并使用克隆而非直接下载的方式部署轻雪
|
||||||
|
|
||||||
|
- 怎么登录聊天平台,例如QQ?
|
||||||
|
- 你有这个问题说明你不是很了解这个项目,本项目不负责实现登录功能,只负责处理和回应消息,登录功能由实现端(协议端)提供,
|
||||||
|
实现端本身不负责处理响应逻辑,将消息按照OneBot标准处理好上报给轻雪
|
||||||
|
你需要使用Onebot标准的实现端来连接到轻雪并将消息上报给轻雪,下面已经列出一些推荐的实现端
|
||||||
|
- `Playwright`安装失败
|
||||||
|
- 输入`playwright install`安装浏览器
|
||||||
|
- 有的插件安装后报错无法启动
|
||||||
|
- 请先查阅插件文档,确认插件必要配置项完好后,仍然出现问题,请联系插件作者或在安全模式`safe_mode: true`下启动轻雪,在安全模式下你可以使用`npm uninstall`卸载问题插件
|
||||||
|
- 其他问题
|
||||||
|
-
|
||||||
|
加入QQ群[775840726](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=SzmDYbfR6jY94o9KFNon7AwelRyI6M_u&authKey=ygeBdEmdFNyCWuNR4w0M1M8%2B5oDg7k%2FDfN0tzBkYcnbB%2FGHNnlVEnCIGbdftsnn7&noverify=0&group_code=775840726)
|
||||||
|
|
||||||
|
## **推荐方案(QQ)**
|
||||||
|
|
||||||
|
1. [Lagrange.OneBot](https://github.com/KonataDev/Lagrange.Core),基于NTQQ的OneBot实现,目前Markdown消息支持Lagrange
|
||||||
|
2. [LLOneBot](https://github.com/LLOneBot/LLOneBot),NTQQ的OneBot插件,需要安装NTQQ
|
||||||
|
3. [OpenShamrock](https://github.com/whitechi73/OpenShamrock),基于Lsposed的OneBot11实现
|
||||||
|
4. [TRSS-Yunzai](https://github.com/TimeRainStarSky/Yunzai),基于`node.js`,可使用`ws-plugin`进行通信
|
||||||
|
5. [go-cqhttp](https://github.com/Mrs4s/go-cqhttp),`go`语言实现的OneBot11实现端,目前可用性较低
|
||||||
|
6. [Gensokyo](https://github.com/Hoshinonyaruko/Gensokyo),基于 OneBot QQ官方机器人Api Golang 原生实现,需要官方机器人权限
|
||||||
|
7. 人工实现的`Onebot`协议,自己整一个WebSocket客户端,看着QQ的消息,然后给轻雪传输数据
|
||||||
|
|
||||||
|
## **推荐方案(Minecraft)**
|
||||||
|
|
||||||
|
1. [MinecraftOneBot](https://github.com/snowykami/MinecraftOnebot),我们专门为Minecraft开发的服务器Bot,支持OneBotV11标准
|
||||||
|
|
||||||
|
使用其他项目连接请先自行查阅文档,若有困难请联系对应开发者而不是Liteyuki的开发者
|
||||||
|
|
||||||
|
## **鸣谢**
|
||||||
|
|
||||||
|
- [Nonebot2](https://nonebot.dev)提供的框架支持
|
||||||
|
- [nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender/tree/master)提供的渲染功能
|
||||||
|
- [nonebot-plugin-alconna](https://github.com/ArcletProject/nonebot-plugin-alconna)提供的命令解析功能
|
||||||
|
- [MiSans](https://hyperos.mi.com/font/zh/),[MapleMono](https://gitee.com/mirrors/Maple-Mono)提供的字体,且遵守了相关字体开源协议
|
61
docs/en/deploy/install.md
Normal file
61
docs/en/deploy/install.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
title: Installation
|
||||||
|
icon: download
|
||||||
|
order: 1
|
||||||
|
category: deployment
|
||||||
|
tag:
|
||||||
|
- 安装
|
||||||
|
---
|
||||||
|
|
||||||
|
## **Installation**
|
||||||
|
|
||||||
|
### **Conventional deployment**
|
||||||
|
|
||||||
|
1. Install [`Git`](https://git-scm.com/download/) and [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) environment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the project locally, --depth=1 to reduce the size of the cloned repository, this project updates depend on Git
|
||||||
|
git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
|
||||||
|
# change the directory to the project root
|
||||||
|
cd LiteyukiBot
|
||||||
|
# install the project dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
# start bot
|
||||||
|
python main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> Recommended to use `venv` to run Liteyuki to avoid dependency conflicts, you can use `python -m venv .venv` to create a virtual environment, and then use `.venv\Scripts\activate` to activate the virtual environment (use `source .venv/bin/activate` to activate on Linux)
|
||||||
|
|
||||||
|
### **Use docker**
|
||||||
|
|
||||||
|
1. Install [`Docker`](https://docs.docker.com/get-docker/)
|
||||||
|
2. Clone project repo `git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1`
|
||||||
|
3. change directory `cd LiteyukiBot`
|
||||||
|
4. build image with `docker build -t liteyukibot .`
|
||||||
|
5. start container `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> For Windows, please use the absolute project directory `/path/to/LiteyukiBot` instead of $(pwd)
|
||||||
|
>
|
||||||
|
> If you have changed the port number, replace `20216` in `20216:20216` with your port number
|
||||||
|
|
||||||
|
### **Use TRSS Scripts**
|
||||||
|
[TRSS_Liteyuki LiteyukiBot manage script](https://timerainstarsky.github.io/TRSS_Liteyuki/), This feature is supported by TRSS and is not an official feature of LiteyukiBot. It is recommended to use Arch Linux.
|
||||||
|
|
||||||
|
|
||||||
|
## **Device requirements**
|
||||||
|
|
||||||
|
- Minimum Windows system version: `Windows 10+` / `Windows Server 2019+`
|
||||||
|
- Linux systems need to support Python 3.10+, with `Ubuntu 20.04+` recommended
|
||||||
|
- CPU: `1 vCPU` and more(Bot is multi processes, the more cores, the better the performance)
|
||||||
|
- Memory: Without other plugins, the Bot will occupy `300~500MB`, including processes like `chromium` and `node`. The memory occupied by other plugins depends on the specific plugins, and it is recommended to have more than `1GB`.
|
||||||
|
- Storage: At least `1GB` of space is required.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> If there are multiple environments on the device, please use `path/to/python -m pip install -r requirements.txt` to install dependencies, where `path/to/python` is the path to your Python executable.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> The update feature of Liteyuki depends on Git. If you have not installed Git and directly download the source code to run, you will not be able to use the update feature.
|
||||||
|
|
||||||
|
#### For other issues, please go to [Q&A](/deployment/fandq)
|
8
docs/en/dev/README.md
Normal file
8
docs/en/dev/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Contribute
|
||||||
|
index: false
|
||||||
|
icon: laptop-code
|
||||||
|
category: 开发
|
||||||
|
---
|
||||||
|
|
||||||
|
<Catalog />
|
99
docs/en/dev/dev_comm.md
Normal file
99
docs/en/dev/dev_comm.md
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
---
|
||||||
|
title: Communication
|
||||||
|
icon: exchange-alt
|
||||||
|
order: 4
|
||||||
|
category: development
|
||||||
|
---
|
||||||
|
|
||||||
|
## **通道通信**
|
||||||
|
|
||||||
|
### 简介
|
||||||
|
|
||||||
|
轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道`Channel`用于跨进程通信,你可以通过`Channel`发送消息给其他进程,也可以监听其他进程的消息。
|
||||||
|
|
||||||
|
例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。
|
||||||
|
|
||||||
|
### 示例
|
||||||
|
|
||||||
|
通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由`chan.on_receive()`装饰回调函数实现,主动模式需调用`chan.receive()`实现
|
||||||
|
|
||||||
|
- 创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为`{process_name}-active`和`{process_name}-passive`,
|
||||||
|
- 主进程中通过`get_channel`函数获取通道对象
|
||||||
|
- 子进程中导入单例`active_channel`及`passive_channel`即可
|
||||||
|
|
||||||
|
> 在轻雪插件中(主进程中)
|
||||||
|
|
||||||
|
```python
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
from liteyuki.comm import get_channel, Channel
|
||||||
|
from liteyuki import get_bot
|
||||||
|
|
||||||
|
# get_channel函数获取通道对象,参数为调用set_channel时的通道标识
|
||||||
|
channel_passive = get_channel("nonebot-passive") # 获取被动通道
|
||||||
|
channel_active = get_channel("nonebot-active") # 获取主动通道
|
||||||
|
liteyuki_bot = get_bot()
|
||||||
|
|
||||||
|
|
||||||
|
# 注册一个函数在轻雪启动后运行
|
||||||
|
@liteyuki_bot.on_after_start
|
||||||
|
async def send_data():
|
||||||
|
while True:
|
||||||
|
channel_passive.send("I am liteyuki main process passive")
|
||||||
|
channel_active.send("I am liteyuki main process active")
|
||||||
|
await asyncio.sleep(3) # 每3秒发送一次消息
|
||||||
|
```
|
||||||
|
|
||||||
|
> 在子进程中(例如NoneBot插件中)
|
||||||
|
|
||||||
|
```python
|
||||||
|
from nonebot import get_driver
|
||||||
|
from liteyuki.comm import active_channel, passive_channel # 子进程中获取通道直接导入进程全局单例即可
|
||||||
|
from liteyuki.log import logger
|
||||||
|
|
||||||
|
driver = get_driver()
|
||||||
|
|
||||||
|
|
||||||
|
# 被动模式,通过装饰器注册一个函数在接收到消息时运行,每次接收到字符串数据时都会运行
|
||||||
|
@passive_channel.on_receive(filter_func=lambda data: isinstance(data, str))
|
||||||
|
async def on_passive_receive(data):
|
||||||
|
logger.info(f"Passive receive: {data}")
|
||||||
|
|
||||||
|
|
||||||
|
# 注册一个函数在NoneBot启动后运行
|
||||||
|
@driver.on_startup
|
||||||
|
def on_startup():
|
||||||
|
while True:
|
||||||
|
data = active_channel.receive()
|
||||||
|
logger.info(f"Active receive: {data}")
|
||||||
|
```
|
||||||
|
|
||||||
|
> 启动后控制台输出
|
||||||
|
|
||||||
|
```log
|
||||||
|
0000-00-00 00:00:00 [ℹ️信息] Passive receive: I am liteyuki main process passive
|
||||||
|
0000-00-00 00:00:00 [ℹ️信息] Active receive: I am liteyuki main process active
|
||||||
|
0000-00-00 00:00:03 [ℹ️信息] Passive receive: I am liteyuki main process passive
|
||||||
|
0000-00-00 00:00:03 [ℹ️信息] Active receive: I am liteyuki main process active
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## **共享内存通信**
|
||||||
|
|
||||||
|
### 简介
|
||||||
|
|
||||||
|
- 相比于普通进程通信,内存共享使得代码编写更加简洁,轻雪框架提供了一个内存共享通信的接口,你可以通过`storage`模块实现内存共享通信,该模块封装通道实现
|
||||||
|
- 内存共享是线程安全的,你可以在多个线程中读写共享内存,线程锁会自动保护共享内存的读写操作
|
||||||
|
|
||||||
|
### 示例
|
||||||
|
|
||||||
|
> 在任意进程中均可使用
|
||||||
|
|
||||||
|
```python
|
||||||
|
from liteyuki.comm.storage import shared_memory
|
||||||
|
|
||||||
|
shared_memory.set("key", "value") # 设置共享内存
|
||||||
|
value = shared_memory.get("key") # 获取共享内存
|
||||||
|
```
|
||||||
|
|
||||||
|
- 源代码:[liteyuki/comm/storage.py](https://github.com/LiteyukiStudio/LiteyukiBot/blob/main/liteyuki/comm/storage.py)
|
74
docs/en/dev/dev_lyfunc.md
Normal file
74
docs/en/dev/dev_lyfunc.md
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
title: Liteyuki Function
|
||||||
|
icon: code
|
||||||
|
order: 2
|
||||||
|
category: development
|
||||||
|
---
|
||||||
|
|
||||||
|
## **轻雪函数**
|
||||||
|
|
||||||
|
轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.
|
||||||
|
|
||||||
|
### **函数文件**
|
||||||
|
|
||||||
|
函数文件放在资源包的`functions`目录下,文件名以`.mcfunction` `.lyfunction` `.lyf`结尾,例如`test.mcfunction`,文件内容为一系列的命令,每行一个命令,支持单行注释`#`(编辑时的语法高亮可采取`shell`格式),例如:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 在发信器输出"hello world"
|
||||||
|
cmd echo hello world
|
||||||
|
|
||||||
|
# 如果你想同时输出多行内容可以尝试换行符(Python格式)
|
||||||
|
cmd echo hello world\nLiteyuki bot
|
||||||
|
```
|
||||||
|
|
||||||
|
也支持句末注释,例如:
|
||||||
|
```shell
|
||||||
|
cmd echo hello world # 输出"hello world"
|
||||||
|
```
|
||||||
|
|
||||||
|
### **命令文档**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
var <var1=value1> [var2=value2] ... # 定义变量
|
||||||
|
cmd <command> # 在设备上执行命令
|
||||||
|
api <api_name> [var=value...] # 调用Bot API
|
||||||
|
function <func_name> # 调用函数,可递归
|
||||||
|
sleep <time> # 异步等待,单位s
|
||||||
|
nohup <command> # 使用新的task执行命令,即不等待
|
||||||
|
end # 结束函数关键字,包括子task
|
||||||
|
await # 等待所有异步任务结束,若函数中启动了其他task,需要在最后调用,否则task对象会被销毁
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### **示例**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 疯狂戳好友
|
||||||
|
# 使用 /function poke user_id=123456 执行
|
||||||
|
# 每隔0.2s戳两次,无限戳,会触发最大递归深度限制
|
||||||
|
# 若要戳20s后停止,则需要删除await,添加sleep 20和end
|
||||||
|
api friend_poke user_id=user_id
|
||||||
|
api friend_poke user_id=user_id
|
||||||
|
sleep 0.2
|
||||||
|
nohup function poke
|
||||||
|
await
|
||||||
|
```
|
||||||
|
|
||||||
|
### **API**
|
||||||
|
|
||||||
|
理论上所有基于onebotv11的api都可调用,不同Adapter api也有差别.
|
||||||
|
|
||||||
|
[Onebot v11 API文档](https://283375.github.io/onebot_v11_vitepress/api/index.html)
|
||||||
|
|
||||||
|
### **结束关键字**
|
||||||
|
|
||||||
|
由于LiteyukiBot基于异步运行, 所以在编写lyfunction时也要注意异步的调用,避免出现"单线程走到底"的情况是效率提升的关键.
|
||||||
|
|
||||||
|
`await` 异步任务结束关键字,用于结束当前已完成function的执行
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> 但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁
|
||||||
|
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> 编写轻雪函数推荐你使用VS Code插件[Liteyuki Function](https://github.com/LiteyukiStudio/lyfunctionTextmate)实现语法高亮
|
63
docs/en/dev/dev_lyplugin.md
Normal file
63
docs/en/dev/dev_lyplugin.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
title: Liteyuki Plugin
|
||||||
|
icon: laptop-code
|
||||||
|
order: 3
|
||||||
|
category: development
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## 简介
|
||||||
|
|
||||||
|
轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能
|
||||||
|
|
||||||
|
## 开始
|
||||||
|
|
||||||
|
### 创建插件
|
||||||
|
|
||||||
|
在标准项目中,位于liteyuki/plugins和src/liteyuki_plugins下的Python modules均会被当作插件加载,你可自行添加配置文件以指定插件的加载路径
|
||||||
|
一个`.py`文件或一个包含`__init__.py`的文件夹即可被识别为插件
|
||||||
|
创建一个文件夹,例如`watchdog_plugin`,并在其中创建一个`__init__.py`文件,即可创建一个插件
|
||||||
|
|
||||||
|
```python
|
||||||
|
from liteyuki.plugin import PluginMetadata
|
||||||
|
|
||||||
|
# 定义插件元数据,推荐填写
|
||||||
|
__plugin_meta__ = PluginMetadata(
|
||||||
|
name="NoneDog", # 插件名称
|
||||||
|
version="1.0.0", # 插件版本
|
||||||
|
description="A simple plugin for nonebot developer" # 插件描述
|
||||||
|
)
|
||||||
|
|
||||||
|
# 你的插件代码
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
### 编写逻辑部分
|
||||||
|
|
||||||
|
轻雪主进程不涉及聊天部分,因此插件主要是一些后台任务或者与聊天机器人的通信
|
||||||
|
以下我们会编写一个简单的插件,用于开发NoneBot时进行文件系统变更重载
|
||||||
|
|
||||||
|
```python
|
||||||
|
import os
|
||||||
|
from liteyuki.dev import observer # 导入文件系统观察器
|
||||||
|
from liteyuki import get_bot, logger # 导入轻雪Bot和日志
|
||||||
|
from watchdog.events import FileSystemEvent # 导入文件系统事件
|
||||||
|
|
||||||
|
liteyuki = get_bot() # 获取唯一的轻雪Bot实例
|
||||||
|
|
||||||
|
exclude_extensions = (".pyc", ".pyo") # 排除的文件扩展名
|
||||||
|
|
||||||
|
|
||||||
|
# 用observer的on_file_system_event装饰器监听文件系统事件
|
||||||
|
@observer.on_file_system_event(
|
||||||
|
directories=("src/nonebot_plugins",),
|
||||||
|
event_filter=lambda event: not event.src_path.endswith(exclude_extensions) and ("__pycache__" not in event.src_path) and os.path.isfile(event.src_path)
|
||||||
|
)
|
||||||
|
def restart_nonebot_process(event: FileSystemEvent):
|
||||||
|
logger.debug(f"File {event.src_path} changed, reloading nonebot...")
|
||||||
|
liteyuki.restart_process("nonebot") # 调用重启进程方法
|
||||||
|
```
|
||||||
|
|
||||||
|
### 加载插件
|
||||||
|
|
||||||
|
在配置文件中的`liteyuki.plugins`中添加你的插件路径,例如`watchdog_plugin`,重启轻雪即可加载插件。然后我们在src/nonebot_plugins下创建一个文件,例如`test.py`,并在其中写入一些代码,保存后轻雪会自动重载NoneBot进程
|
53
docs/en/dev/dev_resource_pack.md
Normal file
53
docs/en/dev/dev_resource_pack.md
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
title: Resource Pack
|
||||||
|
icon: box
|
||||||
|
order: 1
|
||||||
|
category: development
|
||||||
|
---
|
||||||
|
|
||||||
|
## 简介
|
||||||
|
|
||||||
|
资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码
|
||||||
|
|
||||||
|
- [资源/主题商店](/store/)提供了一些资源包供你选择,你也可以自己制作资源包
|
||||||
|
- 资源包的制作很简单,如果你接触过`Minecraft`的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。
|
||||||
|
- 部分内容制作需要一点点前端基础,例如`html`,`css`
|
||||||
|
- 轻雪原版资源包请查看`LiteyukiBot/liteyuki/resources`,可以在此基础上进行修改
|
||||||
|
- 欢迎各位投稿资源包到轻雪资源商店
|
||||||
|
|
||||||
|
请注意,主题包中的html渲染使用Js来规定数据的渲染位置,请确保您所编写的html代码能被Bot解析,否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码,以避免出现无法预料的问题。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 加载资源包
|
||||||
|
|
||||||
|
- 资源包通常是以`.zip`格式压缩的,只需要将其解压到根目录`resources`目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
|
||||||
|
|
||||||
|
```shell
|
||||||
|
main.py
|
||||||
|
resources
|
||||||
|
└─resource_pack_1
|
||||||
|
├─metadata.yml
|
||||||
|
├─templates
|
||||||
|
└───...
|
||||||
|
└─resource_pack_2
|
||||||
|
├─metadata.yml
|
||||||
|
└─...
|
||||||
|
```
|
||||||
|
|
||||||
|
- 你自己制作的资源包也应该遵循这个规则,并且应该在`metadata.yml`中填写一些信息
|
||||||
|
- 若没有`metadata.yml`文件,则该文件夹不会被识别为资源包
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: "资源包名称"
|
||||||
|
version: "1.0.0"
|
||||||
|
description: "资源包描述"
|
||||||
|
# 你可以自定义一些信息,但请保证以上三个字段
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
- 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,例如,你在A包中定义了一个`index.html`文件,B包也定义了一个`index.html`文件,那么加载B包后,A包中的`index.html`文件会被覆盖
|
||||||
|
- 对于不同资源包的不同文件,是可以相对引用的,例如你在A中定义了`templates/index.html`,在B中定义了`templates/style.css`,可以在A的`index.html`中用`./style.css`相对路径引用B中的css
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> 资源包的结构会随着轻雪的更新而有变动,第三方资源包开发者需要注意版本兼容性,同时用户也应该自行选择可用的资源包
|
8
docs/en/store/README.md
Normal file
8
docs/en/store/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Extensions Store
|
||||||
|
index: false
|
||||||
|
icon: store
|
||||||
|
category: store
|
||||||
|
---
|
||||||
|
|
||||||
|
<Catalog />
|
8
docs/en/store/plugin.md
Normal file
8
docs/en/store/plugin.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Plugin Store
|
||||||
|
icon: plug
|
||||||
|
order: 2
|
||||||
|
category: extension
|
||||||
|
---
|
||||||
|
|
||||||
|
<pluginStoreComp />
|
8
docs/en/store/resource.md
Normal file
8
docs/en/store/resource.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Resource Store
|
||||||
|
icon: box
|
||||||
|
order: 1
|
||||||
|
category: extension
|
||||||
|
---
|
||||||
|
|
||||||
|
<resourceStoreComp />
|
8
docs/en/usage/README.md
Normal file
8
docs/en/usage/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Usage
|
||||||
|
index: false
|
||||||
|
icon: laptop-code
|
||||||
|
category: usage
|
||||||
|
---
|
||||||
|
|
||||||
|
<Catalog />
|
16
docs/en/usage/agreement.md
Normal file
16
docs/en/usage/agreement.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: User Agreement
|
||||||
|
icon: user-secret
|
||||||
|
order: 3
|
||||||
|
category: usage
|
||||||
|
---
|
||||||
|
|
||||||
|
1. 本项目遵循`MIT`协议,你可以自由使用,修改,分发,但是请保留原作者信息
|
||||||
|
2. 你可以选择开启`auto_report`(默认开启),轻雪会收集以下内容
|
||||||
|
- 运行环境的设备信息:CPU,内存,系统信息及Python信息
|
||||||
|
- 插件信息(不含插件数据)
|
||||||
|
- 部分异常信息,
|
||||||
|
- 会话负载信息(不含隐私部分)
|
||||||
|
以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把`auto_report`设定为`false`
|
||||||
|
3. 本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性
|
||||||
|
4. 使用此项目代表你已经同意以上协议
|
124
docs/en/usage/basic_command.md
Normal file
124
docs/en/usage/basic_command.md
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
---
|
||||||
|
title: Basic Commands
|
||||||
|
icon: comment
|
||||||
|
order: 1
|
||||||
|
category: usage
|
||||||
|
---
|
||||||
|
|
||||||
|
# 基础插件
|
||||||
|
---
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> **参数**:`<param>`为必填参数,`[option]`为可选参数。
|
||||||
|
>
|
||||||
|
> **命令别名**:配置了命令别名的命令可以使用别名代替原命令,例如`npm install ~`可以使用`插件 安装 ~`代替。
|
||||||
|
|
||||||
|
## **轻雪命令`liteyuki_command`**
|
||||||
|
|
||||||
|
|
||||||
|
| 命令 | 说明 | 权限 | 举例 | 可用参数 |
|
||||||
|
| :----------------------------------------: | :---------------------------------------------------------------------------------------------: | :----------------------------------------: | :---------------------------------------------------------: | :----------------------------------------------------------------------------------: |
|
||||||
|
| `reload-liteyuki` | 重载轻雪 | 超级用户 | ❌ | ❌ |
|
||||||
|
| `update-liteyuki` | 更新轻雪 | 超级用户 | ❌ | ❌ |
|
||||||
|
| `liteecho` | 查看当前bot 版本 | 超级用户 | ❌ | ❌ |
|
||||||
|
| `status` | 查看统计信息和状态 | 超级用户 | ❌ | ❌ |
|
||||||
|
| `config set <key> value` | 添加配置项,若存在则会覆盖,输入值会被执行以转换为正确的类型,"10"和10是不一样的 | 超级用户 | `config set name 'liteyuki-bot'` | `<key>`: 若存在则覆盖, 若不存在则创建于`config.yml` ; `value`: yml格式的所有合法内容 |
|
||||||
|
| `config get [key] ` | 查询配置项,不带key返回配置项列表,推荐私聊使用 | 超级用户 | `config get name` | `<key>`: 若存在则返回, 若不存在则返回空 |
|
||||||
|
| `switch-image-mode ` | 在普通图片和Markdown大图之间切换,该功能需要commit:505468b及以后的Lagrange.OneBot,默认普通图片 | 超级用户 | `switch-image-mode` | ❌ |
|
||||||
|
| `/api api_name [args] ` | 调用机器人API | 超级用户 | `/api get_group_member_list group_id=1234567` | `<args>`: 参数列表, 格式为onebot v11协议api, 可用%20代替空格 |
|
||||||
|
| `/function function_name [args] [kwargs] ` | 调用机器人函数(`.lyfunction`语法) | 超级用户 | `/function send_group_msg group_id=1234567 message='hello'` | `<args>`和`<kwargs>`: 参数列表, api格式为onebot v11协议api |
|
||||||
|
| group enable/disable [group_id] | 在群聊启用/停用机器人,group_id仅超级用户可用 | 超级用户,群聊仅群主、管理员、超级用户可用 | `group enable 1145141919810` | `<group_id>`: 群号 |
|
||||||
|
| liteyuki-docs | 查看轻雪文档 | 所有人 | ❌ | ❌ |
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
### **命令别名**
|
||||||
|
|
||||||
|
|
||||||
|
| 命令 | 别名 |
|
||||||
|
| :---------------: | :----------------------------------: |
|
||||||
|
| status | 状态 |
|
||||||
|
| reload-liteyuki | 重启轻雪 |
|
||||||
|
| update-liteyuki | 更新轻雪 |
|
||||||
|
| reload-resources | 重载资源 |
|
||||||
|
| config | 配置, `set` 设置 / `get` 查询 |
|
||||||
|
| switch-image-mode | 切换图片模式 |
|
||||||
|
| liteyuki-docs | 轻雪文档 |
|
||||||
|
| group | 群聊, `enable` 启用 / `disable` 停用 |
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **插件/包管理器 `liteyuki_pacman`**
|
||||||
|
|
||||||
|
- 插件管理
|
||||||
|
|
||||||
|
| 命令 | 说明 | 权限 |
|
||||||
|
| :-----------------------------------------------------: | :----------------------------------------: | :----------------------------------------------: |
|
||||||
|
| `npm update` | 更新插件商店索引 | 超级用户 |
|
||||||
|
| `npm install <plugin_name>` | 安装插件 | 超级用户 |
|
||||||
|
| `npm uninstall <plugin_name>` | 卸载插件 | 超级用户 |
|
||||||
|
| `npm search <keywords...>` | 通过关键词搜索插件 | 超级用户 |
|
||||||
|
| `npm enable-global/disable-global <plugin_name>` | 全局启用/停用插件 | 超级用户 |
|
||||||
|
| `npm enable/disable <plugin_name> [--group <group_id>]` | 当前会话启用/停用插件 | 群聊仅群主、管理员、超级用户可用,私聊所有人可用 |
|
||||||
|
| `npm list [page] [num]` | 列出所有插件 page为页数,num为每页显示数量 | 群聊仅群主、管理员、超级用户可用,私聊所有人可用 |
|
||||||
|
| `help <plugin_name>` | 查看插件帮助 | 所有人 |
|
||||||
|
|
||||||
|
|
||||||
|
- 资源包管理
|
||||||
|
|
||||||
|
| 命令 | 说明 | 权限 |
|
||||||
|
| :----------------------: | :------------------------------------------: | :------: |
|
||||||
|
| `rpm list [page] [num]` | 列出所有资源包 page为页数,num为每页显示数量 | 超级用户 |
|
||||||
|
| `rpm load <pack_name>` | 加载资源包 | 超级用户 |
|
||||||
|
| `rpm unload <pack_name>` | 卸载资源包 | 超级用户 |
|
||||||
|
| `rpm change <pack_name>` | 修改优先级 | 超级用户 |
|
||||||
|
| `rpm reload` | 重载所有资源包 | 超级用户 |
|
||||||
|
|
||||||
|
|
||||||
|
### 命令别名
|
||||||
|
|
||||||
|
| 命令 | 别名 |
|
||||||
|
| :--------------: | :------: |
|
||||||
|
| `npm` | 插件管理 |
|
||||||
|
| `update` | 更新 |
|
||||||
|
| `install` | 安装 |
|
||||||
|
| `uninstall` | 卸载 |
|
||||||
|
| `search` | 搜索 |
|
||||||
|
| `enable` | 启用 |
|
||||||
|
| `disable` | 停用 |
|
||||||
|
| `enable-global` | 全局启用 |
|
||||||
|
| `disable-global` | 全局停用 |
|
||||||
|
| `rpm` | 资源包 |
|
||||||
|
| `load` | 加载 |
|
||||||
|
| `unload` | 卸载 |
|
||||||
|
| `change` | 更改 |
|
||||||
|
| `reload` | 重载 |
|
||||||
|
| `list` | 列表 |
|
||||||
|
| `help` | 帮助 |
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> 受限于NoneBot2钩子函数的依赖注入参数,插件停用只能阻断传入响应,对于主动推送的插件不生效,请阅读插件主页的说明。
|
||||||
|
>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## **用户管理`liteyuki_user`**
|
||||||
|
|
||||||
|
| 命令 | 说明 | 权限 |
|
||||||
|
| :-------------------------: | :----------------------------: | :----: |
|
||||||
|
| `profile` | 查看用户信息菜单 | 所有人 |
|
||||||
|
| `profile set <key> [value]` | 设置用户信息或打开属性设置菜单 | 所有人 |
|
||||||
|
| `profile get <key>` | 获取用户信息 | 所有人 |
|
||||||
|
|
||||||
|
|
||||||
|
###命令别名
|
||||||
|
|
||||||
|
| 命令 | 别名 |
|
||||||
|
| :-------: | :------: |
|
||||||
|
| `profile` | 个人信息 |
|
||||||
|
| `set` | 设置 |
|
||||||
|
| `get` | 查询 |
|
||||||
|
|
||||||
|
|
70
docs/en/usage/extra_command.md
Normal file
70
docs/en/usage/extra_command.md
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
title: Extra Commands
|
||||||
|
icon: comment
|
||||||
|
order: 2
|
||||||
|
category: usage
|
||||||
|
---
|
||||||
|
|
||||||
|
## 功能插件命令
|
||||||
|
|
||||||
|
### **轻雪天气`liteyuki_weather`**
|
||||||
|
|
||||||
|
查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。
|
||||||
|
|
||||||
|
配置项
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
weather_key: "" # 和风天气的天气key,会自动判断key版本
|
||||||
|
```
|
||||||
|
|
||||||
|
命令
|
||||||
|
|
||||||
|
```shell
|
||||||
|
weather <keywords...> # Keywords为城市名,支持中英文
|
||||||
|
```
|
||||||
|
查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"
|
||||||
|
|
||||||
|
```shell
|
||||||
|
bind-city <keywords...> # Keywords为城市名,支持中英文
|
||||||
|
```
|
||||||
|
|
||||||
|
绑定查询城市,个人全局生效
|
||||||
|
|
||||||
|
#### 命令别名
|
||||||
|
|
||||||
|
| 命令 | 别名 |
|
||||||
|
| :-------: | :------- |
|
||||||
|
| weather | 天气 |
|
||||||
|
| bind-city | 绑定城市 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### **统计信息`liteyuki_statistics`**
|
||||||
|
|
||||||
|
统计信息
|
||||||
|
命令
|
||||||
|
|
||||||
|
```shell
|
||||||
|
statistic message --duration <duration> --period <period> --group [current|group_id] --bot [current|bot_id]
|
||||||
|
```
|
||||||
|
|
||||||
|
功能: 用于统计Bot接收到的消息, 统计周期为`period`, 统计时间范围为`duration`
|
||||||
|
|
||||||
|
| 参数 | 格式 |
|
||||||
|
| :------: | :------------------------------------------------------------: |
|
||||||
|
| duration | 使用通用日期简写: `1d`(天), `1h`(小时), `45m`(分钟), `14s`(秒) |
|
||||||
|
| period | 使用通用日期简写: `1d`(天), `1h`(小时), `45m`(分钟), `14s`(秒) |
|
||||||
|
| group | `current` (当前群聊) 或 `group_id` (QQ群号) |
|
||||||
|
| bot | `current` (当前Bot) 或 `bot_id` |
|
||||||
|
|
||||||
|
#### 命令别名
|
||||||
|
|
||||||
|
| 命令 | 别名 |
|
||||||
|
| :----------: | :---: |
|
||||||
|
| `statistic` | stat |
|
||||||
|
| `message` | m |
|
||||||
|
| `--duration` | -d |
|
||||||
|
| --period` | -p |
|
||||||
|
| `--group` | -g |
|
||||||
|
| `--bot` | -b |
|
||||||
|
| `current` | c |
|
106
docs/foolsday.md
106
docs/foolsday.md
@ -1,106 +0,0 @@
|
|||||||
---
|
|
||||||
home: true
|
|
||||||
icon: home
|
|
||||||
title: 首页
|
|
||||||
heroImage: https://cdn.liteyuki.icu/static/img/logo.png
|
|
||||||
bgImage:
|
|
||||||
bgImageDark:
|
|
||||||
bgImageStyle:
|
|
||||||
background-attachment: fixed
|
|
||||||
heroText: HeavyyukiBot666 # LiteyukiBot 6
|
|
||||||
tagline: 重雪机器人,一个以笨重和复杂为设计理念基于Koishi114514的OneBotv1919810标准聊天机器人,可用于雪地清扫,使用Typethon编写
|
|
||||||
#tagline: 轻雪机器人,一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人
|
|
||||||
|
|
||||||
actions:
|
|
||||||
- text: 快速结束 # 快速开始
|
|
||||||
icon: lightbulb
|
|
||||||
link: ./deployment/install.html
|
|
||||||
type: primary
|
|
||||||
|
|
||||||
- text: 奇怪的册子 # 使用手册
|
|
||||||
icon: book
|
|
||||||
link: ./usage/basic_command.html
|
|
||||||
|
|
||||||
#1. 安装 `Git` 和 `Python3.10+` 环境
|
|
||||||
#2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot` (无法连接可以用`https://gitee.com/snowykami/LiteyukiBot`)
|
|
||||||
#3. 切换目录`cd LiteyukiBot`
|
|
||||||
#4. 安装依赖`pip install -r requirements.txt`(如果多个Python环境请指定后安装`pythonx -m pip install -r requirements.txt`)
|
|
||||||
#5. 启动`python main.py`
|
|
||||||
|
|
||||||
highlights:
|
|
||||||
|
|
||||||
- header: 简洁至下 # 简洁至上
|
|
||||||
image: /assets/image/layout.svg
|
|
||||||
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
|
|
||||||
bgImageDark: https://theme-hope-assets.vuejs.press/bg/2-dark.svg
|
|
||||||
bgImageStyle:
|
|
||||||
background-repeat: repeat
|
|
||||||
background-size: initial
|
|
||||||
features:
|
|
||||||
- title: 基于Koishi.js233
|
|
||||||
icon: robot
|
|
||||||
details: 拥有良好的生态支持
|
|
||||||
link: https://nonebot.dev/
|
|
||||||
|
|
||||||
- title: 盲目插件管理
|
|
||||||
icon: plug
|
|
||||||
details: 基于nbshi使用<code>npmx和pip</code>,让你无法安装/卸载插件
|
|
||||||
|
|
||||||
- title: 点击无法交互
|
|
||||||
icon: mouse-pointer
|
|
||||||
details: 老的的点击交互模式,必须手打指令
|
|
||||||
|
|
||||||
- title: 猪蹄支持
|
|
||||||
icon: paint-brush
|
|
||||||
details: 支持多种主题,可自定义资源包,满足你的审美需求
|
|
||||||
|
|
||||||
- title: 非国际化
|
|
||||||
icon: globe
|
|
||||||
details: 支持多种语言,包括i18n部分语言和自行扩展的语言代码
|
|
||||||
link: https://baike.baidu.com/item/i18n/6771940
|
|
||||||
|
|
||||||
- title: 超难配置
|
|
||||||
icon: cog
|
|
||||||
details: 无需过多配置,开箱即用
|
|
||||||
link: https://bot.liteyuki.icu/deployment/config.html
|
|
||||||
|
|
||||||
- title: 高占用
|
|
||||||
icon: memory
|
|
||||||
details: 使用更多的意义不明的依赖和资源
|
|
||||||
|
|
||||||
- title: 一个Bot标准
|
|
||||||
icon: link
|
|
||||||
details: 支持OneBotv11/12标准的四种通信协议
|
|
||||||
link: https://onebot.dev/
|
|
||||||
|
|
||||||
- title: Alconna
|
|
||||||
icon: link
|
|
||||||
details: 使用Alconna实现低效命令解析
|
|
||||||
link: https://github.com/nonebot/plugin-alconna
|
|
||||||
|
|
||||||
- title: 不准更新
|
|
||||||
icon: cloud-download
|
|
||||||
details: 要更新自己下新版本去
|
|
||||||
|
|
||||||
- title: 服务支持
|
|
||||||
icon: server
|
|
||||||
details: 内置轻雪API,但随时可能跑路
|
|
||||||
|
|
||||||
- title: 闭源
|
|
||||||
icon: code
|
|
||||||
details: 要源代码自己逆向去
|
|
||||||
|
|
||||||
- header: 快速部署
|
|
||||||
image: /assets/image/box.svg
|
|
||||||
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
|
|
||||||
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
|
|
||||||
highlights:
|
|
||||||
- title: 安装 Git 和 node.js+
|
|
||||||
- title: 使用 <code>git clone https://github.com/snowykami/LiteyukiBot</code> 以克隆项目至本地。
|
|
||||||
details: 如果无法连接到GitHub,可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot</code>。
|
|
||||||
- title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。
|
|
||||||
- title: 使用 <code>npm install -r requirements.txt</code> 安装项目依赖。
|
|
||||||
details: 如果你有多个 node.js 环境,请使用 <code>pythonx -m npm install -r requirements.txt</code>。
|
|
||||||
- title: 使用 <code>node main.py</code> 启动项目。
|
|
||||||
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
|
||||||
---
|
|
@ -20,7 +20,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
|
"echarts": "^5.5.1",
|
||||||
"element-plus": "^2.7.0",
|
"element-plus": "^2.7.0",
|
||||||
"element-ui": "^2.15.14"
|
"element-ui": "^2.15.14",
|
||||||
|
"vue-echarts": "7.0.0-beta.0",
|
||||||
|
"vue-router": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
80
docs/pnpm-lock.yaml
generated
80
docs/pnpm-lock.yaml
generated
@ -8,12 +8,21 @@ dependencies:
|
|||||||
clipboard:
|
clipboard:
|
||||||
specifier: ^2.0.11
|
specifier: ^2.0.11
|
||||||
version: 2.0.11
|
version: 2.0.11
|
||||||
|
echarts:
|
||||||
|
specifier: ^5.5.1
|
||||||
|
version: 5.5.1
|
||||||
element-plus:
|
element-plus:
|
||||||
specifier: ^2.7.0
|
specifier: ^2.7.0
|
||||||
version: 2.7.0(vue@3.4.21)
|
version: 2.7.0(vue@3.4.21)
|
||||||
element-ui:
|
element-ui:
|
||||||
specifier: ^2.15.14
|
specifier: ^2.15.14
|
||||||
version: 2.15.14(vue@3.4.21)
|
version: 2.15.14(vue@3.4.21)
|
||||||
|
vue-echarts:
|
||||||
|
specifier: 7.0.0-beta.0
|
||||||
|
version: 7.0.0-beta.0(echarts@5.5.1)(vue@3.4.21)
|
||||||
|
vue-router:
|
||||||
|
specifier: ^4.4.0
|
||||||
|
version: 4.4.0(vue@3.4.21)
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@vuepress/bundler-vite':
|
'@vuepress/bundler-vite':
|
||||||
@ -33,7 +42,7 @@ devDependencies:
|
|||||||
version: 2.0.0-rc.34(vuepress@2.0.0-rc.9)
|
version: 2.0.0-rc.34(vuepress@2.0.0-rc.9)
|
||||||
vuepress-theme-hope:
|
vuepress-theme-hope:
|
||||||
specifier: 2.0.0-rc.32
|
specifier: 2.0.0-rc.32
|
||||||
version: 2.0.0-rc.32(@vuepress/plugin-search@2.0.0-rc.24)(markdown-it@14.1.0)(vuepress-plugin-search-pro@2.0.0-rc.34)(vuepress@2.0.0-rc.9)
|
version: 2.0.0-rc.32(@vuepress/plugin-search@2.0.0-rc.24)(echarts@5.5.1)(markdown-it@14.1.0)(vuepress-plugin-search-pro@2.0.0-rc.34)(vuepress@2.0.0-rc.9)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@ -716,6 +725,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-bur4JOxvYxfrAmocRJIW0SADs3QdEYK6TQ7dTNz6Z4/lySeu3Z1H/+tl0a4qDYv0bCdBpUYM0sYa/X+9ZqgfSQ==}
|
resolution: {integrity: sha512-bur4JOxvYxfrAmocRJIW0SADs3QdEYK6TQ7dTNz6Z4/lySeu3Z1H/+tl0a4qDYv0bCdBpUYM0sYa/X+9ZqgfSQ==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
@ -724,6 +734,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-ssp77SjcDIUSoUyj7DU7/5iwM4ZEluY+N8umtCT9nBRs3u045t0KkW02LTyHouHDomnMXaXSZcCSr2bdMK63kA==}
|
resolution: {integrity: sha512-ssp77SjcDIUSoUyj7DU7/5iwM4ZEluY+N8umtCT9nBRs3u045t0KkW02LTyHouHDomnMXaXSZcCSr2bdMK63kA==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [musl]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
@ -732,6 +743,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-Jv1DkIvwEPAb+v25/Unrnnq9BO3F5cbFPT821n3S5litkz+O5NuXuNhqtPx5KtcwOTtaqkTsO+IVzJOsxd11aQ==}
|
resolution: {integrity: sha512-Jv1DkIvwEPAb+v25/Unrnnq9BO3F5cbFPT821n3S5litkz+O5NuXuNhqtPx5KtcwOTtaqkTsO+IVzJOsxd11aQ==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
@ -740,6 +752,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-U564BrhEfaNChdATQaEODtquCC7Ez+8Hxz1h5MAdMYj0AqD0GA9rHCpElajb/sQcaFL6NXmHc5O+7FXpWMa73Q==}
|
resolution: {integrity: sha512-U564BrhEfaNChdATQaEODtquCC7Ez+8Hxz1h5MAdMYj0AqD0GA9rHCpElajb/sQcaFL6NXmHc5O+7FXpWMa73Q==}
|
||||||
cpu: [s390x]
|
cpu: [s390x]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
@ -748,6 +761,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-zGRDulLTeDemR8DFYyFIQ8kMP02xpUsX4IBikc7lwL9PrwR3gWmX2NopqiGlI2ZVWMl15qZeUjumTwpv18N7sQ==}
|
resolution: {integrity: sha512-zGRDulLTeDemR8DFYyFIQ8kMP02xpUsX4IBikc7lwL9PrwR3gWmX2NopqiGlI2ZVWMl15qZeUjumTwpv18N7sQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
@ -756,6 +770,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-VTk/MveyPdMFkYJJPCkYBw07KcTkGU2hLEyqYMsU4NjiOfzoaDTW9PWGRsNwiOA3qI0k/JQPjkl/4FCK1smskQ==}
|
resolution: {integrity: sha512-VTk/MveyPdMFkYJJPCkYBw07KcTkGU2hLEyqYMsU4NjiOfzoaDTW9PWGRsNwiOA3qI0k/JQPjkl/4FCK1smskQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [musl]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
@ -938,7 +953,6 @@ packages:
|
|||||||
|
|
||||||
/@vue/devtools-api@6.6.1:
|
/@vue/devtools-api@6.6.1:
|
||||||
resolution: {integrity: sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA==}
|
resolution: {integrity: sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA==}
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@vue/reactivity@3.4.21:
|
/@vue/reactivity@3.4.21:
|
||||||
resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==}
|
resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==}
|
||||||
@ -985,7 +999,7 @@ packages:
|
|||||||
rollup: 4.13.1
|
rollup: 4.13.1
|
||||||
vite: 5.2.6
|
vite: 5.2.6
|
||||||
vue: 3.4.21
|
vue: 3.4.21
|
||||||
vue-router: 4.3.0(vue@3.4.21)
|
vue-router: 4.4.0(vue@3.4.21)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
- jiti
|
- jiti
|
||||||
@ -1021,7 +1035,7 @@ packages:
|
|||||||
'@vue/devtools-api': 6.6.1
|
'@vue/devtools-api': 6.6.1
|
||||||
'@vuepress/shared': 2.0.0-rc.9
|
'@vuepress/shared': 2.0.0-rc.9
|
||||||
vue: 3.4.21
|
vue: 3.4.21
|
||||||
vue-router: 4.3.0(vue@3.4.21)
|
vue-router: 4.4.0(vue@3.4.21)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- typescript
|
- typescript
|
||||||
dev: true
|
dev: true
|
||||||
@ -1719,6 +1733,12 @@ packages:
|
|||||||
domhandler: 5.0.3
|
domhandler: 5.0.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/echarts@5.5.1:
|
||||||
|
resolution: {integrity: sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==}
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.3.0
|
||||||
|
zrender: 5.6.0
|
||||||
|
|
||||||
/electron-to-chromium@1.4.719:
|
/electron-to-chromium@1.4.719:
|
||||||
resolution: {integrity: sha512-FbWy2Q2YgdFzkFUW/W5jBjE9dj+804+98E4Pup78JBPnbdb3pv6IneY2JCPKdeKLh3AOKHQeYf+KwLr7mxGh6Q==}
|
resolution: {integrity: sha512-FbWy2Q2YgdFzkFUW/W5jBjE9dj+804+98E4Pup78JBPnbdb3pv6IneY2JCPKdeKLh3AOKHQeYf+KwLr7mxGh6Q==}
|
||||||
dev: true
|
dev: true
|
||||||
@ -2656,6 +2676,9 @@ packages:
|
|||||||
is-number: 7.0.0
|
is-number: 7.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/tslib@2.3.0:
|
||||||
|
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
|
||||||
|
|
||||||
/uc.micro@2.1.0:
|
/uc.micro@2.1.0:
|
||||||
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
|
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
|
||||||
dev: true
|
dev: true
|
||||||
@ -2725,6 +2748,21 @@ packages:
|
|||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/vue-demi@0.13.11(vue@3.4.21):
|
||||||
|
resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==}
|
||||||
|
engines: {node: '>=12'}
|
||||||
|
hasBin: true
|
||||||
|
requiresBuild: true
|
||||||
|
peerDependencies:
|
||||||
|
'@vue/composition-api': ^1.0.0-rc.1
|
||||||
|
vue: ^3.0.0-0 || ^2.6.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@vue/composition-api':
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
vue: 3.4.21
|
||||||
|
dev: false
|
||||||
|
|
||||||
/vue-demi@0.14.7(vue@3.4.21):
|
/vue-demi@0.14.7(vue@3.4.21):
|
||||||
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
|
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
@ -2739,14 +2777,30 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
vue: 3.4.21
|
vue: 3.4.21
|
||||||
|
|
||||||
/vue-router@4.3.0(vue@3.4.21):
|
/vue-echarts@7.0.0-beta.0(echarts@5.5.1)(vue@3.4.21):
|
||||||
resolution: {integrity: sha512-dqUcs8tUeG+ssgWhcPbjHvazML16Oga5w34uCUmsk7i0BcnskoLGwjpa15fqMr2Fa5JgVBrdL2MEgqz6XZ/6IQ==}
|
resolution: {integrity: sha512-DKmPak9+Al/GlIexC5OvvWIDyO39q/AmZm2aqF7+n2fTDyUq7l/dkdmg/9hBeLafZlU6Yf5J7io/BnDzzRK1+g==}
|
||||||
|
peerDependencies:
|
||||||
|
'@vue/runtime-core': ^3.0.0
|
||||||
|
echarts: ^5.5.1
|
||||||
|
vue: ^2.7.0 || ^3.1.1
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@vue/runtime-core':
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
echarts: 5.5.1
|
||||||
|
vue: 3.4.21
|
||||||
|
vue-demi: 0.13.11(vue@3.4.21)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@vue/composition-api'
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/vue-router@4.4.0(vue@3.4.21):
|
||||||
|
resolution: {integrity: sha512-HB+t2p611aIZraV2aPSRNXf0Z/oLZFrlygJm+sZbdJaW6lcFqEDQwnzUBXn+DApw+/QzDU/I9TeWx9izEjTmsA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 6.6.1
|
'@vue/devtools-api': 6.6.1
|
||||||
vue: 3.4.21
|
vue: 3.4.21
|
||||||
dev: true
|
|
||||||
|
|
||||||
/vue@3.4.21:
|
/vue@3.4.21:
|
||||||
resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==}
|
resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==}
|
||||||
@ -2805,7 +2859,7 @@ packages:
|
|||||||
- typescript
|
- typescript
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vuepress-plugin-md-enhance@2.0.0-rc.32(markdown-it@14.1.0)(vuepress@2.0.0-rc.9):
|
/vuepress-plugin-md-enhance@2.0.0-rc.32(echarts@5.5.1)(markdown-it@14.1.0)(vuepress@2.0.0-rc.9):
|
||||||
resolution: {integrity: sha512-zZK8aEfbq26J5w8o9xGWXCHHrL3PYk25tloTPcx96nZWYPeD+5fMFAtVpHte0rXBWUf0MBtDQxddSeATteBE7Q==}
|
resolution: {integrity: sha512-zZK8aEfbq26J5w8o9xGWXCHHrL3PYk25tloTPcx96nZWYPeD+5fMFAtVpHte0rXBWUf0MBtDQxddSeATteBE7Q==}
|
||||||
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
|
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -2882,6 +2936,7 @@ packages:
|
|||||||
'@vuepress/helper': 2.0.0-rc.21(vuepress@2.0.0-rc.9)
|
'@vuepress/helper': 2.0.0-rc.21(vuepress@2.0.0-rc.9)
|
||||||
'@vueuse/core': 10.9.0(vue@3.4.21)
|
'@vueuse/core': 10.9.0(vue@3.4.21)
|
||||||
balloon-css: 1.2.0
|
balloon-css: 1.2.0
|
||||||
|
echarts: 5.5.1
|
||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
vue: 3.4.21
|
vue: 3.4.21
|
||||||
vuepress: 2.0.0-rc.9(@vuepress/bundler-vite@2.0.0-rc.9)(vue@3.4.21)
|
vuepress: 2.0.0-rc.9(@vuepress/bundler-vite@2.0.0-rc.9)(vue@3.4.21)
|
||||||
@ -2999,7 +3054,7 @@ packages:
|
|||||||
- typescript
|
- typescript
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vuepress-theme-hope@2.0.0-rc.32(@vuepress/plugin-search@2.0.0-rc.24)(markdown-it@14.1.0)(vuepress-plugin-search-pro@2.0.0-rc.34)(vuepress@2.0.0-rc.9):
|
/vuepress-theme-hope@2.0.0-rc.32(@vuepress/plugin-search@2.0.0-rc.24)(echarts@5.5.1)(markdown-it@14.1.0)(vuepress-plugin-search-pro@2.0.0-rc.34)(vuepress@2.0.0-rc.9):
|
||||||
resolution: {integrity: sha512-5S5qg5xa0TErqVjpubhBN5oy0QmROd+ja5EQKfORUCKdXKQvx0soojQZnCPkXsUEXonwiZ12oCLN2+UGO03eng==}
|
resolution: {integrity: sha512-5S5qg5xa0TErqVjpubhBN5oy0QmROd+ja5EQKfORUCKdXKQvx0soojQZnCPkXsUEXonwiZ12oCLN2+UGO03eng==}
|
||||||
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
|
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -3059,7 +3114,7 @@ packages:
|
|||||||
vue: 3.4.21
|
vue: 3.4.21
|
||||||
vuepress: 2.0.0-rc.9(@vuepress/bundler-vite@2.0.0-rc.9)(vue@3.4.21)
|
vuepress: 2.0.0-rc.9(@vuepress/bundler-vite@2.0.0-rc.9)(vue@3.4.21)
|
||||||
vuepress-plugin-components: 2.0.0-rc.32(vuepress@2.0.0-rc.9)
|
vuepress-plugin-components: 2.0.0-rc.32(vuepress@2.0.0-rc.9)
|
||||||
vuepress-plugin-md-enhance: 2.0.0-rc.32(markdown-it@14.1.0)(vuepress@2.0.0-rc.9)
|
vuepress-plugin-md-enhance: 2.0.0-rc.32(echarts@5.5.1)(markdown-it@14.1.0)(vuepress@2.0.0-rc.9)
|
||||||
vuepress-plugin-sass-palette: 2.0.0-rc.32(vuepress@2.0.0-rc.9)
|
vuepress-plugin-sass-palette: 2.0.0-rc.32(vuepress@2.0.0-rc.9)
|
||||||
vuepress-plugin-search-pro: 2.0.0-rc.34(vuepress@2.0.0-rc.9)
|
vuepress-plugin-search-pro: 2.0.0-rc.34(vuepress@2.0.0-rc.9)
|
||||||
vuepress-shared: 2.0.0-rc.32(vuepress@2.0.0-rc.9)
|
vuepress-shared: 2.0.0-rc.32(vuepress@2.0.0-rc.9)
|
||||||
@ -3178,3 +3233,8 @@ packages:
|
|||||||
y18n: 4.0.3
|
y18n: 4.0.3
|
||||||
yargs-parser: 18.1.3
|
yargs-parser: 18.1.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/zrender@5.6.0:
|
||||||
|
resolution: {integrity: sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==}
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.3.0
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 资源商店
|
title: 资源及插件商店
|
||||||
icon: store
|
|
||||||
index: false
|
index: false
|
||||||
|
icon: store
|
||||||
|
category: 商店
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<Catalog />
|
@ -4,4 +4,5 @@ icon: box
|
|||||||
order: 1
|
order: 1
|
||||||
category: 使用手册
|
category: 使用手册
|
||||||
---
|
---
|
||||||
|
|
||||||
<resourceStoreComp />
|
<resourceStoreComp />
|
@ -7,8 +7,8 @@ category: 使用手册
|
|||||||
|
|
||||||
1. 本项目遵循`MIT`协议,你可以自由使用,修改,分发,但是请保留原作者信息
|
1. 本项目遵循`MIT`协议,你可以自由使用,修改,分发,但是请保留原作者信息
|
||||||
2. 你可以选择开启`auto_report`(默认开启),轻雪会收集以下内容
|
2. 你可以选择开启`auto_report`(默认开启),轻雪会收集以下内容
|
||||||
- 运行环境的设备信息:CPU,内存,系统信息,Python信息
|
- 运行环境的设备信息:CPU,内存,系统信息及Python信息
|
||||||
- 插件信息(不含插件数据),
|
- 插件信息(不含插件数据)
|
||||||
- 部分异常信息,
|
- 部分异常信息,
|
||||||
- 会话负载信息(不含隐私部分)
|
- 会话负载信息(不含隐私部分)
|
||||||
以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把`auto_report`设定为`false`
|
以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把`auto_report`设定为`false`
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user