Weather
NOAA
Hamburg station is: http://tgftp.nws.noaa.gov/weather/current/EDHI.html Nuremberg: EDDN
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 ‘.’