Chai
Python tool to help book tickets on the Indian Railways
Install / Use
/learn @amrav/ChaiREADME
Chai
A command line tool to help book tickets on the Indian Railways.
Installation
Use virtualenv to install packages locally rather than globally.
$ pip install -r requirements.txt
$ git submodule init && git submodule update
Usage
chai.py [-h] [-v] -t TRAIN_NO -s SRC -d DST -D DAY -m MONTH
[-c {1A,2A,3A,SL,CC}] [-q {GN,CK}]
{avail,optimize} ...
positional arguments:
{avail,optimize} sub-command help
avail find availability between two stations
optimize calculate the best possible route to take between two
stations
optional arguments:
-h, --help show this help message and exit
-v, --verbose turn on verbose mode
-t TRAIN_NO, --train_no TRAIN_NO
train number
-s SRC, --src SRC source station code
-d DST, --dst DST destination station code
-D DAY, --day DAY day of travel (dd)
-m MONTH, --month MONTH
month of travel (mm)
-c {1A,2A,3A,SL,CC}, --class {1A,2A,3A,SL,CC}
class of travel
-q {GN,CK}, --quota {GN,CK}
class code
Example
$ python chai.py -t 12802 -s NDLS -d KGP -D 30 -m 4 avail
RAC3/RAC 3
$ python chai.py -t 12802 -s NDLS -d KGP -D 30 -m 4 optimize
Fetching stations on route... done.
Using up to 100 concurrent connections.
Fetching availability... 100%
Optimum plan is:
NDLS --> CNB ( 1 stations ) : AVAILABLE 33
CNB --> KGP ( 19 stations ) : AVAILABLE 3
License
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
