-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da05649
commit 6664bfd
Showing
9 changed files
with
449 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
name: Deploy Website | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- dev/main | ||
paths: | ||
- 'Writerside/**' | ||
- '.github/workflows/deploy-website.yml' | ||
|
||
tags-ignore: | ||
- v*.**.** | ||
# Specify to run a workflow manually from the Actions tab on GitHub | ||
workflow_dispatch: | ||
|
||
|
||
# Gives the workflow permissions to clone the repo and create a page deployment | ||
permissions: | ||
id-token: write | ||
pages: write | ||
|
||
env: | ||
# Name of module and id separated by a slash | ||
INSTANCE: Writerside/ob | ||
INSTANCE_NAME: ob | ||
# Replace HI with the ID of the instance in capital letters | ||
ARTIFACT: webHelpOB2-all.zip | ||
# Writerside docker image version | ||
DOCKER_VERSION: 241.16003 | ||
# Add the variable below to upload Algolia indexes | ||
# Replace HI with the ID of the instance in capital letters | ||
ALGOLIA_ARTIFACT: algolia-indexes-OB.zip | ||
ALGOLIA_APP_NAME: VLLZ4JZE8Z | ||
ALGOLIA_INDEX_NAME: ob-doc | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
config_json: ${{ steps.output-config-json.outputs.config_json }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Writerside docs using Docker | ||
uses: JetBrains/writerside-github-action@v4 | ||
with: | ||
instance: ${{ env.INSTANCE }} | ||
artifact: ${{ env.ARTIFACT }} | ||
docker-version: ${{ env.DOCKER_VERSION }} | ||
|
||
- name: Upload documentation | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: | | ||
artifacts/${{ env.ARTIFACT }} | ||
artifacts/report.json | ||
retention-days: 7 | ||
|
||
# Add the step below to upload Algolia indexes | ||
- name: Upload algolia-indexes | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: algolia-indexes | ||
path: artifacts/${{ env.ALGOLIA_ARTIFACT }} | ||
retention-days: 7 | ||
|
||
- name: Unzip artifact | ||
run: unzip -O UTF-8 -qq artifacts/${{ env.ARTIFACT }} -d dir | ||
|
||
- name: Output documentation config.json | ||
id: output-config-json | ||
run: | | ||
echo "config_json=$(cat dir/config.json)" >> $GITHUB_OUTPUT | ||
# Add the job below and artifacts/report.json on Upload documentation step above if you want to fail the build when documentation contains errors | ||
test: | ||
# Requires build job results | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: docs | ||
path: artifacts | ||
|
||
- name: Test documentation | ||
uses: JetBrains/writerside-checker-action@v1 | ||
with: | ||
instance: ${{ env.INSTANCE }} | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
# Requires the build job results | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: docs | ||
|
||
- name: Unzip artifact | ||
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v2 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: dir | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 | ||
|
||
# https://www.jetbrains.com/help/writerside/configure-search.html | ||
publish-indexes: | ||
# Requires the build-job results | ||
needs: [build, test] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3 | ||
|
||
env: | ||
|
||
CONFIG_JSON_VERSION: ${{ fromJSON(needs.build.outputs.config_json).productVersion }} | ||
|
||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: algolia-indexes | ||
|
||
|
||
- name: Unzip artifact | ||
run: | | ||
unzip -O UTF-8 -qq ${{ env.ALGOLIA_ARTIFACT }} -d algolia-indexes | ||
env "algolia-key=${{secrets.ALGOLIA_KEY}}" java -jar /opt/builder/help-publication-agent.jar \ | ||
update-index \ | ||
--application-name ${{env.ALGOLIA_APP_NAME}} \ | ||
--index-name ${{env.ALGOLIA_INDEX_NAME}} \ | ||
--product ${{env.INSTANCE_NAME}} \ | ||
--version ${{env.CONFIG_JSON_VERSION}} \ | ||
--index-directory algolia-indexes/ \ | ||
2>&1 | tee algolia-update-index-log.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# 事件 | ||
|
||
## 原始事件 | ||
|
||
我们根据 OneBot11 协议中定义的所有事件结构, | ||
在模块 `simbot-component-onebot-v11-event` 中提供了所有的实现类型。 | ||
它们是最基础的可序列化数据类,不含有任何功能。 | ||
|
||
<deflist> | ||
<def id="MetaEvent" title="元事件 MetaEvent"> | ||
<deflist> | ||
<def id="HeartbeatEvent" title="HeartbeatEvent"></def> | ||
<def id="LifecycleEvent" title="LifecycleEvent"></def> | ||
</deflist> | ||
</def> | ||
<def id="MessageEvent" title="消息事件 MessageEvent"> | ||
<deflist> | ||
<def id="GroupMessageEvent" title="GroupMessageEvent"></def> | ||
<def id="PrivateMessageEvent" title="PrivateMessageEvent"></def> | ||
</deflist> | ||
</def> | ||
<def id="RequestEvent" title="请求事件 RequestEvent"> | ||
<deflist> | ||
<def id="FriendRequestEvent" title="FriendRequestEvent"></def> | ||
<def id="GroupRequestEvent" title="GroupRequestEvent"></def> | ||
</deflist> | ||
</def> | ||
<def id="NoticeEvent" title="通知事件 NoticeEvent"> | ||
<deflist> | ||
<def id="FriendAddEvent" title="FriendAddEvent"></def> | ||
<def id="FriendRecallEvent" title="FriendRecallEvent"></def> | ||
<def id="GroupAdminEvent" title="GroupAdminEvent"></def> | ||
<def id="GroupBanEvent" title="GroupBanEvent"></def> | ||
<def id="GroupDecreaseEvent" title="GroupDecreaseEvent"></def> | ||
<def id="GroupIncreaseEvent" title="GroupIncreaseEvent"></def> | ||
<def id="GroupRecallEvent" title="GroupRecallEvent"></def> | ||
<def id="GroupUploadEvent" title="GroupUploadEvent"></def> | ||
<def id="NotifyEvent" title="NotifyEvent"></def> | ||
</deflist> | ||
</def> | ||
<def id="UnknownEvent" title="未知事件 UnknownEvent"> | ||
|
||
一个特殊的事件类型。 | ||
它是当遇到无法被上述这些类型所解析时使用的兜底类型, | ||
它不可序列化,除 `time`、`selfId`、`postType` | ||
之外直接提供 `raw` 属性(也就是原始的JSON字符串)。 | ||
|
||
</def> | ||
</deflist> | ||
|
||
## 组件事件 | ||
|
||
组件实现是基于simbot标准API中定义的事件类型、对上述**原始事件**的包装, | ||
并提供相对应的功能性API实现。 | ||
|
||
### 消息事件 | ||
|
||
<deflist> | ||
<def id="OneBotMessageEvent" title="OneBotMessageEvent"> | ||
与消息相关的事件。 | ||
|
||
<deflist> | ||
<def id="OneBotGroupMessageEvent" title="OneBotGroupMessageEvent"> | ||
与群消息相关的事件。 | ||
|
||
<deflist> | ||
<def id="OneBotNormalGroupMessageEvent" title="OneBotNormalGroupMessageEvent"> | ||
与普通群消息相关的事件。 | ||
</def> | ||
<def id="OneBotAnonymousGroupMessageEvent" title="OneBotAnonymousGroupMessageEvent"> | ||
与匿名群消息相关的事件。 | ||
</def> | ||
<def id="OneBotNoticeGroupMessageEvent" title="OneBotNoticeGroupMessageEvent"> | ||
与群系统消息通知相关的事件。 | ||
</def> | ||
</deflist> | ||
|
||
</def> | ||
<def id="OneBotPrivateMessageEvent" title="OneBotPrivateMessageEvent"> | ||
与私聊消息相关的事件。 | ||
|
||
<deflist> | ||
<def id="OneBotFriendMessageEvent" title="OneBotFriendMessageEvent"> | ||
好友私信消息事件。 | ||
</def> | ||
<def id="OneBotGroupPrivateMessageEvent" title="OneBotGroupPrivateMessageEvent"> | ||
群成员临时会话消息事件。 | ||
</def> | ||
</deflist> | ||
|
||
</def> | ||
</deflist> | ||
|
||
</def> | ||
</deflist> | ||
|
||
|
||
|
||
### 未知事件 | ||
|
||
`OneBotUnknownEvent` | ||
|
||
是对上述原始事件中的 `UnknownEvent` 类型的包装。 | ||
|
||
### 未支持事件 | ||
|
||
`OneBotUnsupportedEvent` | ||
|
||
是当出现了原始事件中有(除了 `UnknownEvent`)、 | ||
但是尚未提供对应的**组件事件**实现的事件类型时用来兜底的类型。 | ||
|
||
这些原始事件类型会被统一装入此事件中。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,56 @@ | ||
# Home | ||
# 欢迎! | ||
|
||
这里是 | ||
[**Simple Robot v4**](https://github.com/simple-robot/simpler-robot/tree/v4-dev) | ||
的 | ||
[OneBot组件](https://github.com/simple-robot/simbot-component-onebot/) | ||
应用手册! | ||
|
||
## 概述 | ||
|
||
Simple Robot OneBot 组件是一个将 | ||
[OneBot11协议](https://github.com/botuniverse/onebot-11) | ||
在 | ||
[Simple Robot](http://github.com/simple-robot/simpler-robot) 标准API下实现的组件库, | ||
并由此提供simbot中的各项能力。 | ||
|
||
借助simbot核心库提供的能力,它可以支持很多高级功能和封装,比如组件协同、Spring支持等, | ||
祝你快速开发 OneBot 客户端应用! | ||
|
||
序列化和网络请求相关分别基于 [Kotlin serialization](https://github.com/Kotlin/kotlinx.serialization) | ||
和 [Ktor](https://ktor.io/)。 | ||
|
||
|
||
### 了解 **Simple Robot** | ||
|
||
- [Simple Robot 应用手册](https://simbot.forte.love) | ||
- [Simple Robot 组织库](https://github.com/simple-robot) | ||
|
||
### API文档 | ||
|
||
- [API文档引导站](https://docs.simbot.forte.love) | ||
|
||
## 反馈与协助! | ||
|
||
我们欢迎并期望着您的 | ||
[反馈](https://github.com/simple-robot/simbot-component-onebot/issues) | ||
或 | ||
[协助](https://github.com/simple-robot/simbot-component-onebot/pulls), | ||
感谢您的贡献与支持! | ||
|
||
``` | ||
This program is free software: you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General | ||
Public License as published by the Free Software Foundation, | ||
either version 3 of the License, or (at your option) | ||
any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied | ||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
See the GNU Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public | ||
License along with this program. | ||
If not, see <https://www.gnu.org/licenses/>. | ||
``` |
Oops, something went wrong.