-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arnau Siches
committed
Apr 9, 2016
1 parent
71d07d2
commit fc01e1e
Showing
2 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,48 @@ | ||
# Transit For London GTFS Exporter | ||
# Transport For London GTFS Exporter | ||
|
||
This simple rust program pulls data from the TFL Unified API | ||
and converts it to a directory with GTFS files in it. | ||
This simple Rust CLI allows you to fetch data from the | ||
[Tfl Unified API][tfl-api] and transform it to [GTFS][gtfs]. | ||
|
||
Clone and "cargo run --release" to generate a gtfs directory with all the | ||
required .txt csv files. | ||
|
||
## Install | ||
|
||
Clone [the repository][tfl-cli] and compile: | ||
|
||
```sh | ||
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: | ||
|
||
```sh | ||
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: | ||
|
||
```sh | ||
./target/release/tflgtfs fetch-lines --format gtfs | ||
``` | ||
|
||
You will find the resulting GTFS files inside `./gtfs`. | ||
|
||
|
||
## License | ||
|
||
See [License](./LICENSE). | ||
|
||
|
||
[tfl-cli]: https://github.com/CommuteStream/tflgtfs/ | ||
[tfl-api]: https://api.tfl.gov.uk/ | ||
[gtfs]: https://developers.google.com/transit/gtfs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters