From aa32544dd3b998b9a5a1b73c51c28086b90770bc Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Nov 2022 15:52:47 +0100 Subject: reaktor2 krebsfood: get last line which is usually the json --- krebs/2configs/reaktor2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 3e88c0899..c79976bd2 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -241,8 +241,8 @@ let longitude=$(echo "$poi" | jq -r .longitude) fi - osm-restaurants --radius "$2" --latitude "$latitude" --longitude "$longitude" \ - | jq -r '"How about \(.tags.name) (https://www.openstreetmap.org/\(.type)/\(.id)), open \(.tags.opening_hours)?"' + restaurant=$(osm-restaurants --radius "$2" --latitude "$latitude" --longitude "$longitude") + printf '%s' "$restaurant" | tail -1 | jq -r '"How about \(.tags.name) (https://www.openstreetmap.org/\(.type)/\(.id)), open \(.tags.opening_hours)?"' ''; }; } -- cgit v1.2.3