翱翔门户成绩监控插件,能获取成绩、排名、绩点,当出现新成绩时推送给使用者
Project description
堂堂复活,但电费、定时暂未修复
"摘下耳机时眼眶依旧会微红 戴上耳机依旧是你描绘的梦"
📖 介绍
nonebot-plugin-npu,翱翔门户成绩监控插件,能获取成绩、排名、绩点,当出现新成绩时推送给使用者
- 获取成绩、绩点、排名
- 出现新成绩、新考试时推送
- 排名变动时推送
- 宿舍电费监控
- 排考检测
- 课表提取
🔔 安装
法一:nb plugin安装方法[推荐]
安装插件
nb plugin install nonebot-plugin-npu
安装wkhtmltopdf
打开https://wkhtmltopdf.org/downloads.html安装
法二:pip安装
-
1.激活python环境
.\.venv\Scripts\activate (Windows) source \.venv\Scripts\activate (Ubuntu) -
2.安装
pip install nonebot-plugin-npu -
3.安装wkhtmltopdf
打开https://wkhtmltopdf.org/downloads.html安装
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot-plugin-npu"]
📣配置
在.env.prod/.env中写入以下字段,也可不填,默认值如下
npu_check_time=60
npu_electric_check_time=30
npu_if_check_grades=true
npu_if_check_rank=false
npu_if_check_exams=true
npu_if_check_when_connect=false
npu_begin_check_hour=8
npu_end_check_hour=22
| 参数 | 值 | 说明 |
|---|---|---|
| npu_check_time | int | 每多少分钟检测一次成绩 |
| npu_electric_check_time | int | 每多少分钟检测一次电费 |
| npu_if_check_grades | bool | 是否检测成绩 |
| npu_if_check_rank | bool | 是否检测排名 |
| npu_if_check_exams | bool | 是否检测新考试 |
| npu_if_check_when_connect | bool | 当connect的是否执行一次检测 |
| npu_begin_check_hour | int | 起始检测时间,在x点之前不会检测 |
| npu_end_check_hour | int | 最末检测时间,在x点之后不会检测 |
[!TIP]
记得配置SUPERUSERS,当发生错误时会推送消息给超级用户
推荐设置Command Start为
COMMAND_START=["/", ""],这样有/和没/都可以响应指令
🎉 使用
指令表
指令列表
| 指令 | 范围 | 说明 | 示例 |
|---|---|---|---|
| /翱翔 | 私聊/艾特 | 登陆翱翔门户 | |
| /翱翔成绩 | 私聊/艾特 | 获取本学期的成绩 | |
| /翱翔排名 | 私聊/艾特 | 获取排名信息 | |
| /翱翔考试 | 私聊/艾特 | 获取未结束的考试信息 | |
| /翱翔课表 | 私聊/艾特 | 获取课表(需要搭配wake up软件使用) | |
| /翱翔本周课表 | 私聊/艾特 | 获取本周课表图片文件 | |
| /翱翔综测排名 | 私聊/艾特 | 获取综测参评中的综测排名 | |
| /翱翔退出登陆(登录) | 私聊/艾特 | 退出登陆 | |
| /翱翔全部成绩 | 私聊/艾特 | 获取全部成绩 | |
| /翱翔全部考试 | 私聊/艾特 | 获取全部考试信息 | |
| /翱翔加权百分制成绩 | 私聊/艾特 | 计算加权百分制成绩 | |
| /翱翔电费绑定 | 私聊/艾特 | 绑定宿舍,当电费小于25时会推送消息,每天中午12点检测一次 | |
| /翱翔电费查询 | 私聊/艾特 | 查询当前电费 | |
| /翱翔电费解绑 | 私聊/艾特 | 解除宿舍绑定 |
🤩致谢
翱翔门户登陆以及数据获取参考了:https://github.com/cheanus/Automation/blob/main/GradesMonitorLinux.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_npu-2.0.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_npu-2.0.0.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e5cf4fdecbef0d4e014b4fdf875d1338e6f9cd11c3dd1c4d12f4c6a7881190
|
|
| MD5 |
3720b21297062fb589a32861c018388e
|
|
| BLAKE2b-256 |
c880a1787000052023bd640dc2b6192c151198d2daa0e563761a62fb73e8a936
|
File details
Details for the file nonebot_plugin_npu-2.0.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_npu-2.0.0-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc532a5c71aed7c14b2e1b77e586d5ce5429f6c783e95f8937fc2cc1b83da7d3
|
|
| MD5 |
5a225b6d0928763a5dce8d4debde5ada
|
|
| BLAKE2b-256 |
f02d2f369886eec6eddd4f3ad23456dae5ca34d816d37362c1cc27d1bd97e740
|