Created
December 31, 2019 15:23
-
-
Save liclac/44760b4275e47296819fb8cbb51cefcd to your computer and use it in GitHub Desktop.
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
set -l data_status (curl -s https://iceportal.de/api1/rs/status) | |
set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip) | |
# next stop | |
echo (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ] | |
| first).station.name') | |
# train number | |
echo (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"') | |
# speed | |
echo speed (echo $data_status | jq -r '"\(.speed) km/h"') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment