Skip to content

cb-cities/tflgtfs

 
 

Repository files navigation

cb-cities fork

This executes the Commute Stream rust CLI hourly and posts the outputted GTFS data to an S3 bucket.

Create an IAM role and update the credentials, config and Dockerfile files with AWS access details and a gmail account for notifications.

A docker image is available for use. To build:

docker build -t "tfl_gtfs"

docker run -ti "tfl_ftfs' /bin/bash

Gerry Casey

Transport For London GTFS Exporter

This simple Rust CLI allows you to fetch data from the Tfl Unified API and transform it to GTFS.

Build Status Clippy Linting Result

Install

Clone the repository and compile:

cargo build --release

WARNING: If you compile under OSX 10.11 you might need to specify the OpenSSL include path. For example, having OpenSSL installed via Homebrew, the command is:

OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include cargo build --release

You will find the binary in ./target/release/.

Usage

Check the help ./target/release/tflgtfs help for details.

In short, you can fetch Tfl lines with the fetch-lines command and transform the cached values with the transform gtfs command.

You can do it in one shot via:

./target/release/tflgtfs fetch-lines --format gtfs

You will find the resulting GTFS files inside ./gtfs.

Development

When developing on nightly build it using the following command to actually benefit from linting and Serde macro:

cargo build --features nightly --no-default-features

License

See License.

About

Transport For London GTFS Exporter and S3 bucket pusher

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 89.4%
  • Python 6.7%
  • Dockerfile 3.0%
  • Shell 0.9%