Last active
March 24, 2019 09:44
-
-
Save mapio/f80a97910ff925821258 to your computer and use it in GitHub Desktop.
A tool to query ATM stops
This file contains hidden or 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
#!/bin/bash | |
if ! type jq >/dev/null 2>&1; then | |
echo >&2 "$(basename $0): please install https://stedolan.github.io/jq/ first." | |
exit 1 | |
fi | |
if [ -z "$1" ]; then | |
echo >&2 "$(basename $0): plase provide stop number (see http://giromilano.atm.it/)" | |
exit 1 | |
fi | |
curl -s "http://giromilano.atm.it/TPPortalBackEnd/geodata/pois/stops/$1" | \ | |
jq -r '(.Description),(.Lines[]|[(.Line.LineId),(.Line.LineDescription),(.WaitMessage)]|@tsv)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a tool to query estimated time on ATM stops, use as
You can find stop numbers on http://giromilano.atm.it/, or get a full list in GTFS format at http://amat-mi.it/it/downloads/data/gtfs/current/Export_OpenDataTPL_Current.zip