https://github.com/lpgray/12306-cli
command line tool for 12306.cn 🚄
https://github.com/lpgray/12306-cli
12306 cli
Last synced: about 1 year ago
JSON representation
command line tool for 12306.cn 🚄
- Host: GitHub
- URL: https://github.com/lpgray/12306-cli
- Owner: lpgray
- Created: 2016-08-31T16:48:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-20T03:00:14.000Z (almost 9 years ago)
- Last Synced: 2025-05-07T14:08:22.383Z (about 1 year ago)
- Topics: 12306, cli
- Language: JavaScript
- Homepage:
- Size: 1.04 MB
- Stars: 55
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 12306-cli
> 12306 修改了查询接口数据格式,本项目暂时不可用,请周知
[](https://npmjs.org/package/12306-cli)
看到网上有个小伙伴用 python 实现了一款火车票查询工具,因此萌生了用 JavaScript 实现的冲动。此工具在 osx 下开发,windows 尚未测试。

## 用到的工具
* chalk - 命令行字体加色
* request - http client
* commander - 命令行程序框架
* columnify - 命令行表格格式化工具
## 安装
```bash
> npm i -g 12306-cli
```
## 使用说明
### 帮助
```bash
> 12306 query -h
```
### 查询车票
```bash
> 12306 query hangzhou xuzhou 2016-09-20
> 12306 query 杭州 徐州 2016-09-20
```
只看高铁
```bash
> 12306 query hangzhou xuzhou 2016-09-20 --gaotie
```