Skip to main content

NoneBot2 course schedule plugin with queries, imports, reminders, and holiday checks

Project description

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

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_class_schedule-1.0.6.tar.gz (29.6 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_class_schedule-1.0.6-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_class_schedule-1.0.6.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_class_schedule-1.0.6.tar.gz
Algorithm Hash digest
SHA256 92e89e3643c8b3d8600ae48682f73bf1f23f5e7b35525434767b81c28409e020
MD5 80a086812ae3abe09279abe0c4b692b9
BLAKE2b-256 7971c6b7072cb71dd8acb0493585dd14fc1f9c6be64e4c6215defe41884c188d

See more details on using hashes here.

File details

Details for the file nonebot_plugin_class_schedule-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_class_schedule-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 59b7c328473bf57229d90dca4f30eb121779b7cf6b7562a763f9f8004e302021
MD5 6b21b14055ec8dbbdd6cf905cbb9e080
BLAKE2b-256 5dc711d7beeb1c4acf37a1171e699fe03db3a0111b8c7851f5467c1066facd0e

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