Skip to main content

NoneBot2 plugin for query the train time table

Project description

NoneBotPluginLogo

NoneBotPluginText

NoneBot-Plugin-CNRail

✨ 12306 列车时刻表查询插件 ✨

python pdm-managed wakatime
Pydantic Version 1 Or 2 license pypi pypi download

💿 安装

以下提到的方法 任选其一 即可

[推荐] 使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-cnrail
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-cnrail
pdm
pdm add nonebot-plugin-cnrail
poetry
poetry add nonebot-plugin-cnrail
conda
conda install nonebot-plugin-cnrail

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

[tool.nonebot]
plugins = [
    # ...
    "nonebot_plugin_cnrail"
]

⚙️ 配置

配置项 必填 默认值 说明
CNRAIL_ACG_IMAGE_URL https://www.loliapi.com/acg/pe/ 用于指令返回图片背景的图片 URL

🎉 使用

使用指令 train -h 查看帮助

效果图

效果图

📞 联系

QQ:3076823485
Telegram:@lgc2333
吹水群:1105946125
邮箱:lgc2333@126.com

💡 鸣谢

海兰德小助手 & Train-QQBot 插件

灵感来源

MoeFactory 提供的查询 API

数据来源

💰 赞助

赞助我

感谢大家的赞助!你们的赞助将是我继续创作的动力!

📝 更新日志

0.2.3

  • 更换上游 API 域名

0.2.2

0.2.1

0.2.0

  • 适配 Pydantic V1 & V2
  • 样式微调

0.1.7

  • 添加车组号显示(无法显示未来日期的车组号信息)
  • bug fix

0.1.6

  • 添加担当路局显示 & 改次列车查询

0.1.5

  • 修复 -h 参数无效的问题

0.1.4

  • 现在缺少参数会提示了

0.1.3

0.1.2

  • 支持选择日期查询(日期范围为前二日 ~ 后十四日)

0.1.1

  • 修复查询到多个车次不会提示的问题

0.1.0

  • 🎉 Create this project

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_cnrail-0.2.3.tar.gz (14.1 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_cnrail-0.2.3-py3-none-any.whl (14.5 kB view hashes)

Uploaded Python 3

Supported by

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