shithub: rc

ref: c1a707427fbbb5129e467516fc671e976ee3e398
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