go-home

Querys train schedule use the origin command line tools

  • 所有者: JGSU-open-source-community/go-home
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Sourcegraph

#Querys train schedule use the origin command line tools

###output(train schedule)

###output(left tricket)

###output(update)

###output(transfer query)

###dependence

  1. ASCLL TABLE Writer it is for generate ascii table on termial
    and use below command to install

###Create table

CREATE TABLE `station_lat_lgt` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `station` varchar(10) DEFAULT NULL,
  `latitude` varchar(30) DEFAULT NULL,
  `longitude` varchar(30) DEFAULT NULL,
  `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

CREATE TABLE `train_list` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `code` varchar(10) DEFAULT NULL,
  `train_no` varchar(30) DEFAULT NULL,
  `there` varchar(30) DEFAULT NULL,
  `home` varchar(30) DEFAULT NULL,
  `depart_date` date NOT NULL,
  `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=265205 DEFAULT CHARSET=utf8;

###Databse
database name is 12306 go-home will auto create that.

###Config file

###this file is for config connect of mysql

type = "mysql"      // maybe you like use other database just change this type
host = "127.0.0.1"  // replace your host
port = 3306         // replace your port
user = root         // replace your user name
pass = digitalx168  //replace your password
databaseName = "12306" 
isCreate = false

###How to get started?
you should download project to path of yourself and then go build or go install, after that just run it!

go get github.com/JingDa-open-source-community/go-home
or you can use Makefile
cd yourpath/github.com/JingDa-open-source-community/go-home
make

go-home train d332 2017-02-25

go-home left 上海 永修 2017-03-03

// update mysql data
go-home update

###log

  1. Add depart date parameter when query train schedule.
    If you use a command like go-home train k502 2017-01-22, default value is tody,
    so above command equal go-home k502 2017-01-22
    In fact you should use a command like go-home train k502 2017-01-27 to query someday's plan that you want to know.
  2. Support query left tricket go througth api of 12306
  3. Support user update local data by "update" option
  4. Support go get
  5. Support both ansi in window console and cygwinn&&mysys terminal
  6. Support transfer query

###Contact

Wechat: convertxy

QQ: 2698380951

Email: aliasliyu4@gmail.com

主要指標

概覽
名稱與所有者JGSU-open-source-community/go-home
主編程語言Go
編程語言Go (語言數: 2)
平台
許可證
所有者活动
創建於2017-01-17 07:55:56
推送於2019-03-13 12:12:25
最后一次提交2019-03-13 20:12:24
發布數0
用户参与
星數157
關注者數10
派生數21
提交數101
已啟用問題?
問題數3
打開的問題數0
拉請求數3
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?