Skip to content

Instantly share code, notes, and snippets.

@mapio
Last active March 24, 2019 09:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mapio/f80a97910ff925821258 to your computer and use it in GitHub Desktop.
Save mapio/f80a97910ff925821258 to your computer and use it in GitHub Desktop.
A tool to query ATM stops
#!/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)'
@mapio
Copy link
Author

mapio commented Jan 25, 2016

This is a tool to query estimated time on ATM stops, use as

$ ./query_atm_stop 12062
Via Comelico
16  San Siro Stadio M5 - Monte Velino   4 min

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment