Loads GTFS into MySQL and serves next departures and arrivals at a certain stop from The DataTank.
- Virtualbox
- Vagrant >= 1.7.0
- vagrant-omnibus plugin
Download and install VirtualBox
Download and install vagrant
Install vagrant-omnibus plugin
$ vagrant plugin install vagrant-omnibus
Download and install ChefDK
Clone this repository
Go to the repository folder and launch the box
$ cd [repo]
$ berks vendor
$ vagrant up
Add The Datatank-ip and -hostname to your hosts-file:
192.168.70.70 tdt.hub.dev
Currently are De Lijn, MivbStib and TEC included. Datasources are located in the datasources-folder.
For this example we're going to add De Lijn-datasource. Same principle for TEC and MivbStib.
vagrant ssh
Go to De Lijn datasources-folder:
cd /vagrant/datasources/delijn
Execute init.sh:
./init.sh
Go to tdt.hub.dev/api/admin in your favourite browser. Default credentials are: user: admin password: admin
Now let's create an API for De Lijn Departures:
You will have to now construct the request towards the expected departures at a bus stop yourself. For example, for 2015-05-10T12:00, for Aalst Gentsestraat, you’ll have to construct: http://tdt.hub.dev/delijn/departures/Aalst%20Gentsestraat/2015/05/10/12/00.json