Introduction
Introduction Statistics Contact Development Disclaimer Help
Get station info from API. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 78c9fa8ee53438aa38fa79f6c98ca6783d165ded
parent 071cc75d3c0389fc77e3d8e3f7fe8fde871855e6
Author: eidolon <?>
Date: Mon, 4 Nov 2024 01:38:19 -0500
Get station info from API.
Signed-off-by: Annna Robert-Houdin <[email protected]>
Diffstat:
M metar | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/metar b/metar
@@ -30,7 +30,7 @@ if ! id=$(printf '%s\n' "$1" | grep '^[A-Za-z0-9]\{3,4\}$'); …
fi
fmt=decoded
-uri="https://aviationweather.gov/api/data/metar/"
+uri="https://aviationweather.gov/api/data/{stationinfo,metar}/"
txt="$HOME/bin/modules/metar/ascii-planes.txt"
csv="$HOME/bin/modules/airport-codes/data/airport-codes.csv"
@@ -48,8 +48,7 @@ if [ -z "$metar" ]; then
exit 1
fi
-raw=$(printf '%s\n' "$metar" | sed -n '2s/^[^:]*: //p')
+raw=$(printf '%s\n' "$metar" | sed -n '/Text:/ s/.*: //p')
art=$(printart | sed 's/^#//')
-info=$(dromeinfo "$id")
decode=$(printf '%s\n\n' "$info" "$metar" "$art" | /br/bin/bitreich-paste)
printf '%s\n' "$raw ; decode: $decode"
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.