Skip to main content

nonebot-plugin-class-schedule

适用于 NoneBot2 + OneBot V11 的课程表插件,支持课程查询、课表导入、作息表导入、课前提醒、节假日识别和文字/图片输出。

功能

  • 实时查询:/现在什么课、/等会什么课
  • 每日查询:/今天什么课、/明天什么课、/周一 到 /周日
  • 汇总查询:/本周课表、/第几周、/我的课表
  • 数据导入:/导入课表、/导入作息表、/确认导入、/确认导入作息
  • 提醒功能:/课前提醒、/假期订阅
  • 其他:/查课 <课目>、/放假没、/课表风格

安装

推荐使用 NB-CLI 安装:

nb plugin install nonebot-plugin-class-schedule

也可以使用 pip 安装基础版:

pip install nonebot-plugin-class-schedule

如果需要图片输出:

pip install "nonebot-plugin-class-schedule[image]"

如果需要课前提醒和假期订阅:

pip install "nonebot-plugin-class-schedule[reminder]"

全部功能:

pip install "nonebot-plugin-class-schedule[all]"

加载插件

如果使用 NB-CLI 安装,通常会自动写入项目配置。

手动安装时,推荐在 pyproject.toml 中配置:

[tool.nonebot]
plugins = ["nonebot_plugin_class_schedule"]

也可以在自定义入口中手动加载:

nonebot.load_plugin("nonebot_plugin_class_schedule")

数据存储

插件使用 nonebot-plugin-localstore 保存用户数据,不会把课程表写入插件安装目录。

数据文件包括:

  • schedules/{qq_user_id}.json:用户课程表
  • preferences.json:输出风格、提醒设置、作息表等用户偏好

配置项

无需额外配置。

常用命令

命令 功能
/课程表帮助 查看帮助
/现在什么课 查询当前课程状态
/等会什么课 查询下一节课和倒计时
/今天什么课 或 /课表 查询今日课表
/明天什么课 查询明日课表
/周一 到 /周日 查询指定星期课表
/本周课表 查询本周概览
/第几周 查询当前教学周
/我的课表 查看完整课表
/查课 <课目> 搜索今天的某门课
/导入课表 进入课表导入流程
/导入作息表 进入作息表导入流程
/课表风格 文字 切换为文字输出
/课表风格 图片 切换为图片输出,需要 image 额外依赖
/课前提醒 开/关 开关课前提醒,需要 reminder 额外依赖
/假期订阅 开/关 开关假期提醒,需要 reminder 额外依赖
/放假没 查询今天是否节假日或补班

导入课表

发送 /导入课表 后,按提示发送课程内容:

周一:
早读 英语(李老师)
第1节 数学 @A201
第2节 物理(王老师)
第3节 化学
晚自习 语文

周二:
第1节 英语
第2节 数学

支持:

  • 星期:周一、星期一、周一:
  • 节次:早读、第1节、第一节、1节、晚自习
  • 老师:(老师名) 或 (老师名)
  • 地点:@地点 或 #地点

解析完成后发送 /确认导入 保存,或 /取消导入 放弃。

导入作息表

发送 /导入作息表 后,按提示发送作息时间:

早读 07:00-07:30
第1节 08:00-08:45
第2节 08:55-09:40
午休 12:00-14:00
第5节 14:00-14:45
晚自习 18:20-21:00

解析完成后发送 /确认导入作息 保存,或 /取消导入作息 放弃。

提醒

课前提醒:

/课前提醒 开
/课前提醒 关
/课前提醒 提前5分钟

假期订阅:

/假期订阅 开
/假期订阅 关

提醒功能依赖 nonebot-plugin-apscheduler。如果没有安装,查询和导入功能仍可正常使用。

License

MIT

Metadata

Release files for nonebot-plugin-class-schedule 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-class-schedule 1.0.6
File Size Uploaded Provenance Actions
nonebot_plugin_class_schedule-1.0.6.tar.gz 29.6 kB Without provenance Details for nonebot_plugin_class_schedule-1.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-class-schedule 1.0.6
File Interpreter ABI Platform Actions
nonebot_plugin_class_schedule-1.0.6-py3-none-any.whl Python 3 none any Details for nonebot_plugin_class_schedule-1.0.6-py3-none-any.whl

Total release size: 63.5 kB

Release files / nonebot_plugin_class_schedule-1.0.6.tar.gz

Download URL nonebot_plugin_class_schedule-1.0.6.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
92e89e3643c8b3d8600ae48682f73bf1f23f5e7b35525434767b81c28409e020
BLAKE2b-256 checksum
How to use checksums
7971c6b7072cb71dd8acb0493585dd14fc1f9c6be64e4c6215defe41884c188d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / nonebot_plugin_class_schedule-1.0.6-py3-none-any.whl

Download URL nonebot_plugin_class_schedule-1.0.6-py3-none-any.whl
Size 33.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59b7c328473bf57229d90dca4f30eb121779b7cf6b7562a763f9f8004e302021
BLAKE2b-256 checksum
How to use checksums
5dc711d7beeb1c4acf37a1171e699fe03db3a0111b8c7851f5467c1066facd0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for nonebot-plugin-class-schedule 1.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page