shithub: rc

ref: f54eeb8f8bcb1307f1c7161e3f87a1e3ca201676
dir: /w/

View raw version
#!/bin/rc
# https://www.weather.gov/documentation/services-web-api
# BROKEN: Still need to parse all this json.
rfork e
ll=39.768403,-86.158068	# indianapolis, in
if(~ $#1 1)
	ll=$1
grid=https://api.weather.gov/points/$ll
g=`{hget $grid | sed -n 59,61p | sed 's/("|,|:| |grid|Id|X|Y)//g'}
hget https://api.weather.gov/gridpoints/^$g(1)^/^$g(2)^,^$g(3)^/forecast