home
/
code
/
khatus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace `metar` with custom parser of NOAA XML API
[khatus.git]
/
x2
/
src
/
bash
/
exe
/
khatus_sensor_weather.sh
diff --git
a/x2/src/bash/exe/khatus_sensor_weather.sh
b/x2/src/bash/exe/khatus_sensor_weather.sh
index
371010f
..
a41f14a
100644
(file)
--- a/
x2/src/bash/exe/khatus_sensor_weather.sh
+++ b/
x2/src/bash/exe/khatus_sensor_weather.sh
@@
-5,4
+5,9
@@
set -e
dir_bin="$1"
weather_station_id="$2"
dir_bin="$1"
weather_station_id="$2"
-metar -d "$weather_station_id" 2>&1 | "$dir_bin"/khatus_parse_metar_d_output
+curl \
+ -X GET \
+ -H "accept: application/vnd.noaa.obs+xml" \
+ "https://api.weather.gov/stations/${weather_station_id}/observations/latest?require_qc=false" \
+| hxpipe \
+| "$dir_bin"/khatus_parse_noaa_api
This page took
0.022391 seconds
and
4
git commands to generate.