Giter Club home page Giter Club logo

go-home's Introduction

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: [email protected]

go-home's People

Contributors

liyu4 avatar xmsqh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.