Skip to main content

A NoneBot2 plugin for querying OI/ACM related information, including LeetCode daily question and Luogu daily report.

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-OI-helper

✨ 一个提供 OI/ACM 相关信息的 nonebot2 插件 ✨

license pypi python downloads Publish Release

📖 介绍

一个基于 https://clist.by v4 接口,提供 OI/ACM 相关信息查询的 nonebot2 插件。

扩展内容:

  • 获取 LeetCode 每日一题
  • 获取 洛谷日报
  • ...

💿 安装

使用 nb-cli 安装

在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装

nb plugin install nonebot-plugin-oi-help # 未上架商店
使用包管理器安装

在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令

pip
pip install nonebot-plugin-oi-help
pdm
pdm add nonebot-plugin-oi-help
poetry
poetry add nonebot-plugin-oi-help
conda
conda install nonebot-plugin-oi-help
uv

uv

Documents: https://docs.astral.sh/uv/

uv add nonebot-plugin-oi-help

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot-plugin-oi-help"]

⚙️ 配置

在 nonebot2 项目的 .env 文件中添加下表中的必填配置

[!TIP] 需要使用 aiohttp 的驱动器

配置项 必填 默认值 说明
CLIST__USERNAME 你的clist用户名
CLIST__USER_KEY 你的 key
CLIST_API__REQ_URL https://clist.by:443/api/v4/contest/?upcoming=true&filtered=true&order_by=start&format=json 自定义查询url

例如在你的 .env 文件里:

# nonebot-plugin-oi-helper 配置
CLIST__USERNAME=talentestors
CLIST__USER_KEY=cc4a4d946b628bfbd606b75417daf496bac7e200
# clist API 地址
# CLIST_API__REQ_URL=

如何获取 clist 的 key?

点击展开
  1. 进入 CLIST 官网:https://clist.by/

  2. 如果你是新用户,你需要新建一个账户。

  3. 前往 https://clist.by/api/v4/doc/ 页面也可以从这里进去: api

  4. here 获取你的 API KEY

    Accessing the API requires an API key, which is available to authenticated users here.

    here

关于 Filter

点击展开

默认的 clist 的 url 加入了,filtered=true 参数。

这意味着你可以在你的账户里面直接配置规则,而不用设置复杂的 url 请求参数。

https://clist.by/settings/filters/

点击 create 去创建一个规则

Resources 项,能筛选对应的平台。

filter

🎉 使用

See docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_oi_helper-0.5.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_oi_helper-0.5.1-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_oi_helper-0.5.1.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_oi_helper-0.5.1.tar.gz
Algorithm Hash digest
SHA256 429bcd3195d2e9620cc54ed5301cd8b14517467c3e71d4b1beae944630eaaa22
MD5 b82506e033fbce26f937258ced7408ce
BLAKE2b-256 34ffcf872c027d70784d26bf3344c34ca5fa7c9999b7e56ba96233b00828c526

See more details on using hashes here.

File details

Details for the file nonebot_plugin_oi_helper-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_oi_helper-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b06b35aab096755526a3002ca0cf1f59278e8d8f1b4c8316d6c03057d9b858a2
MD5 7d14b23f5d4168815bd0b722a1d38e85
BLAKE2b-256 e1feed2287cdb84d851eb5f13e5f7be29c8eedb0306901235fab95ab30eb1caf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page