Weather

NOAA

Hamburg station is: http://tgftp.nws.noaa.gov/weather/current/EDHI.html Nuremberg: EDDN

station list: https://github.com/AAmhRYHyIj2YCLoU3nu9VSiut7qqWHmm/kasri/blob/9e04cba30b59a186469fc42fe13d7470719afbaf/config/states/germany.conf

Extract temperature:

pup ‘table tbody tr json{}’ | jq ‘.[] | .children’ -c -r | grep ‘“Temperature”’ | jq ‘.[1].children[0].text’ | cut -d ‘(’ -f 2 | cut -d ‘)’ -f 1 | awk ‘{ print $1 }’

a bit better? probably not as robust

pup ‘html body table:nth-child(4) tbody tr:nth-child(8) td:nth-child(2) font text{}’ | cut -d ‘(’ -f 2 | cut -d ‘)’ -f 1 | awk ‘{ print $1 }’

OpenWeatherMap

curl “http://api.openweathermap.org/data/2.5/weather?q=Hamburg,de&appid=${OPENWEATHER_API_KEY}&units=metric" | jq ‘.’