Created
July 14, 2017 22:36
-
-
Save datapolitan/09a546e27472405f488a0277515f4b33 to your computer and use it in GitHub Desktop.
How to setup the Protobuf Files to parse the NYCT GTFS-RT Feeds (because they don't make it easy)
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
# Download the proto files | |
wget http://datamine.mta.info/sites/all/files/pdfs/nyct-subway.proto.txt | |
wget https://developers.google.com/transit/gtfs-realtime/gtfs-realtime.proto | |
# rename the NYCT proto file to drop the .txt extension | |
mv nyct-subway.proto.txt nyct-subway.proto | |
# install the protobuf-compiler | |
sudo yum install protobuf-compiler | |
# run the protobuf-compiler | |
# https://developers.google.com/protocol-buffers/docs/pythontutorial | |
protoc --python_out=. ./gtfs-realtime.proto | |
protoc --python_out=. ./nyct-subway.proto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment