Skip to main content

这是一个火车迷也许觉得很好用的铁路机器人工具箱

Project description

nonebot-plugin-railwaytools🚅🚞🛤️

这是一个火车迷也许觉得很好用的铁路工具箱,具有多种功能。

Required 🔨

  • Python >= 3.8

  • 需提前安装以下依赖库:

pip install requests
pip install datetime

Getting Started 🚀

将本repo中的nonebot-plugin-railwaytools文件夹clone到机器人的src\plugins目录中,即可使用。

git clone https://github.com/leaf2006/nonebot-plugin-railwaytools.git

Features ✨

  • 通过车次查询担当的动车组车组号:/车号 或 /ch(例如:/车号 D3211)
example:
🤵:/车号 D3211
🤖:
D3211次列车近8次担当的车组号为:
2025-11-28 12:59:CRH2A2158
2025-11-27 12:59:CRH2A2190
2025-11-26 12:59:CRH2A2158
2025-11-25 12:59:CRH2A2030
2025-11-24 12:59:CRH2B2115
2025-11-23 12:59:CRH2B2116
2025-11-22 12:59:CRH2B2115
2025-11-21 12:59:CRH2A2006
  • 通过动车组车组号查询担当车次:/车次 或 /cc (例如:/车次 CRH2A-2001)
example:
🤵:/车次 CRH2A-2001
🤖:
CRH2A-2001近8次担当的车次为:
2025-11-28 20:14:D2212
2025-11-27 22:46:D3062
2025-11-27 15:05:D3060
2025-11-26 20:22:C3793
2025-11-26 13:57:D5666
2025-11-26 10:09:D5665
2025-11-25 17:29:C3896
2025-11-25 12:36:C3897
  • 通过车号查询下关站收录的机车户口照:/下关站 或 /xgz (例如:/下关站 DF7C-5030)
example:
🤵:/下关站 DF7C-5058
🤖:正在加载图片,时间可能略久...
🤖:[DF7C-5058的机车户口照]
  • 通过列车车次查询该车次的始发终到、担当客运段、车型信息以及配属,同时支持动车组与普速列车:/查询 或 /cx (例如:/查询 Z99)
example:
🤵:/查询 Z99
🤖:
车次:Z99(上海——广州白云) 
担当客运段:上海客运段
车型信息:25T
配属:上海机辆段
 
----------停站信息----------
1.上海:17:19到,17:19发,停车0分
2.杭州南:19:26到,19:29发,停车3分
3.金华:20:40到,20:46发,停车6分
4.广州白云:09:45到,09:45发,停车0分
------------------------------
  • 帮助:/帮助 或 /help
example:
🤵:/help
🤖:
这是一个火车迷也许觉得很好用的铁路工具箱,具有多种功能 
 
----------使用方法----------
① 通过车次查询担当的动车组车组号:/车号 或 /ch (例如:/车号 D3211) 
 
② 通过动车组车组号查询担当车次:/车次 或 /cc (例如:/车次 CRH2A-2001) 
 
③ 通过车号查询下关站机车户口照:/下关站 或 /xgz (例如:/下关站 DF7C-5030) 
 
④ 通过列车车次查询该车次的始发终到、担当客运段、车型信息以及配属,同时支持动车组与普速列车:/查询 或 /cx (例如:/查询 Z99)
 
⑤ 帮助:/帮助 或 /help 
 
更多功能正在开发中,尽情期待! 
------------------------------ 
 
Powered by Nonebot2 and Onebot v11
Copyright © Leaf developer 2023-2025

Alert ⚠️

由于下关站的性能较差,在查询机车户口照时,返回的图片可能会加载较慢。

TODO 🔜

  • 计划加入12306车站大屏功能 (作为日后开发重点)
  • 正在计划加入12306查询列车始发终到、中途停站的功能 (已实现)
  • 优化列车时刻表的显示,比如说始发站不要显示到站时间,很怪异。目前可以看作是一个已知的bug
  • 如用户的输入内容非法,错误值仅停留在后台而无法通过机器人输出给用户
  • 由于下关站的性能问题导致的加载图片较慢,可以通过切换为小图模式解决。但是小图比较模糊,只能说在加载速度快和图片质量高这两者之间只能二选一。本人意向添加切换大/小图的设置选项,但是目前还未开发
  • 更多功能正在思考/开发中

数据来源

Copyright © Leaf developer 2023-2025,遵循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_railwaytools-1.1.1.tar.gz (8.2 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_railwaytools-1.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_railwaytools-1.1.1.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_railwaytools-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c6df5b88789f7361c36720db1bed617ec07cca25dfc9078b4451f8ba2e363059
MD5 fb6761d3b1354d29e9988ae66e79d101
BLAKE2b-256 a098f0c48561bad7836e2bc6e54ff86536b9e6b36535670f289040b9bf6287de

See more details on using hashes here.

File details

Details for the file nonebot_plugin_railwaytools-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_railwaytools-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c34c30c527b523002f10862435b460b5a11b5457029b648fdf856d7ca5b78263
MD5 81ab41c43c607a7cb6267df85b597cb6
BLAKE2b-256 29c44750b1e7a0b261d5105bed78581dd8aa381235b8f484e8ef53fd071fe33a

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