Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lpgray/12306-cli
command line tool for 12306.cn 🚄
https://github.com/lpgray/12306-cli
12306 cli
Last synced: 3 days 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-20T03:00:14.000Z (about 7 years ago)
- Last Synced: 2024-11-01T09:33:49.794Z (19 days ago)
- Topics: 12306, cli
- Language: JavaScript
- Homepage:
- Size: 1.04 MB
- Stars: 55
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 12306-cli
> 12306 修改了查询接口数据格式,本项目暂时不可用,请周知
[![NPM Version](https://img.shields.io/npm/v/12306-cli.svg?style=flat)](https://npmjs.org/package/12306-cli)
看到网上有个小伙伴用 python 实现了一款火车票查询工具,因此萌生了用 JavaScript 实现的冲动。此工具在 osx 下开发,windows 尚未测试。
![](http://ww1.sinaimg.cn/large/8df27f17gw1f7dfzklo8pj21kw0s2drz.jpg)
## 用到的工具
* 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
```