https://github.com/talentestors/nonebot-plugin-oi-helper
A Nonebot2 plugin providing information related to OI/ACM. 一个提供 OI/ACM 相关信息的 nonebot2 插件
https://github.com/talentestors/nonebot-plugin-oi-helper
nonebot2 python
Last synced: 5 months ago
JSON representation
A Nonebot2 plugin providing information related to OI/ACM. 一个提供 OI/ACM 相关信息的 nonebot2 插件
- Host: GitHub
- URL: https://github.com/talentestors/nonebot-plugin-oi-helper
- Owner: talentestors
- License: agpl-3.0
- Created: 2024-12-15T14:21:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-12T02:52:43.000Z (6 months ago)
- Last Synced: 2026-01-12T16:35:57.600Z (5 months ago)
- Topics: nonebot2, python
- Language: Python
- Homepage:
- Size: 2.24 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nonebot-plugin-OI-helper
_✨ 一个提供 OI/ACM 相关信息的 nonebot2 插件 ✨_
[](https://www.gnu.org/licenses/lgpl-3.0.html)
[](https://pypi.python.org/pypi/nonebot-plugin-oi-helper)


[](https://github.com/talentestors/nonebot-plugin-oi-helper/actions/workflows/release-publish.yml)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftalentestors%2Fnonebot-plugin-oi-helper?ref=badge_shield)
> [!WARNING]
>
> v1 版本已重构,基于 HTTP/2
>
> aiohttp 替换为 httpx
## 📖 介绍
一个基于 v4 接口,提供 OI/ACM 相关信息查询的 nonebot2 插件。
扩展内容:
- [x] 获取 **LeetCode 每日一题**
- [ ] ...
## 💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
```bash
nb plugin install nonebot-plugin-oi-helper
```
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
```bash
pip install nonebot-plugin-oi-helper
```
pdm
```bash
pdm add nonebot-plugin-oi-helper
```
poetry
```bash
poetry add nonebot-plugin-oi-helper
```
conda
```bash
conda install nonebot-plugin-oi-helper
```
uv
[](https://github.com/astral-sh/uv)
> Documents:
```bash
uv add nonebot-plugin-oi-helper
```
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
```bash
plugins = ["nonebot_plugin_oi_helper"]
```
## ⚙️ 配置
在 nonebot2 项目的 `.env` 文件中添加下表中的必填配置
> [!TIP]
> 需要使用 aiohttp 的驱动器
| 配置项 | 必填 | 默认值 | 说明 |
| :----------------: | :---: | :-------------------------------------------------------------------------------------------: | :-------------: |
| CLIST__USERNAME | 是 | 无 | 你的clist用户名 |
| CLIST__USER_KEY | 是 | 无 | 你的 key |
| CLIST_API__REQ_URL | 否 | | 自定义查询url |
例如在你的 `.env` 文件里:
```ini
# nonebot-plugin-oi-helper 配置
CLIST__USERNAME=talentestors
CLIST__USER_KEY=b4c1d76de149ef89cf0542b59a567f7c6b4af952
# clist API 地址
# CLIST_API__REQ_URL=
```
### 如何获取 clist 的 key?
点击展开
1. 进入 CLIST 官网:
2. 如果你是新用户,你需要新建一个账户。
3. 前往 页面也可以从这里进去:

4. 点 _here_ 获取你的 API KEY
> Accessing the API requires an API key, which is available to authenticated users _here_.

### 关于 Filter
点击展开
默认的 clist 的 url 加入了,`filtered=true` 参数。
这意味着你可以在你的账户里面直接配置规则,而不用设置复杂的 url 请求参数。
点击 _create_ 去创建一个规则
`Resources` 项,能筛选对应的平台。

## 🎉 使用
[See docs](./docs/README.md)
## License
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftalentestors%2Fnonebot-plugin-oi-helper?ref=badge_large)
