🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

watch12306

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch12306

检测12306网站,并在有余票时候通知

latest
npmnpm
Version
0.0.8
Version published
Weekly downloads
5
-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

watch12306(有票通知你)

  • 可同时监视多个目标,一个json文件对应一个目标
  • 配置文件为中文,简单易懂
  • 配置文件被更改的时候自动刷新
  • 仅仅是 监视 + 通知 的功能,不能订票
  • 自动监视12306,当有的时候在桌面进行通知

使用

0. 下载

$ git clone git@github.com:Froguard/wt.git

1. 安装

$ npm install
$ npm link

2. 创建配置文件

./targets/target1.json (可以创建多个*.json文件,名字随意,字段固定如下)

{
  "出发时间": "2016-12-19",
  "出发站": "大连",
  "到达站": "本溪",
  "成人票": true,
  "显示票价": true,
  "仅显示高铁": false,
  "监控频率(分钟)": 1,
  "包含票种": [
    "//商务座",
    "//特等座",
    "一等座",
    "//二等座",
    "//高铁软卧",
    "//软卧",
    "//硬卧",
    "//软座",
    "//硬座",
    "//无座",
    "//其他"
  ]
}

不需要的票种,请删掉,或者注释掉即可,比如上例中,只会在 一等座 有票的时候进行通知

3. 开启

$ watch12306

or

$ watch12306 %another_directory_path_u_ve_created%
  • 开启后放一边即可,当有票的时候,可以在桌面上通知
  • 当json文件被修改的时候,watcher会自动刷新,并立即执行一次查询,不用重启本程序

4. 效果

控制台

cmd

桌面

cmd

注意事项

  • node版本>4.0.0
  • 气泡弹窗,如果想要好看一点,建议windows用户请安装Growl程序,当然,不安装也是可以的

Keywords

12306

FAQs

Package last updated on 26 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts