fix traewelling

This commit is contained in:
Tove 2025-10-30 10:25:53 +01:00
parent a521cb6bce
commit 7fa65e673f
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -30,7 +30,11 @@ pkgs.writeShellScriptBin "traewelling" ''
echo "Arrival: in $(
date -d "@$(( $(date -d "$(j .train.destination.arrival)" +%s) - $(date +%s) - 60 * 60))" +%H:%M
) at $(j .train.destination.rilIdentifier) $(j '.train.destination.arrivalPlatformReal // .train.destination.arrivalPlatformPlanned')"
echo "bahn.expert: https://bahn.expert/details/$(j .train.lineName | sed -E 's/(.*?) .*/\1/g')%20$(j .train.journeyNumber)/$(j .train.origin.departure)?evaNumberAlongRoute=$(j .train.origin.evaIdentifier)"
trainkind="$(j .train.lineName | sed -E 's/(.*?) .*/\1/g')"
if [ $(j .train.operator.id) = 2449 ] ; then
trainkind=ME
fi
echo "bahn.expert: https://bahn.expert/details/$trainkind%20$(j .train.journeyNumber)/$(j .train.origin.departure)?evaNumberAlongRoute=$(j .train.origin.evaIdentifier)"
echo
else
color 9