ref: 4ee0ccfd8f68e7d86a339f9c57a606b02d14ab3e
parent: ae001f9e515235e3f937a5753a691222dbbaaa79
author: sl <sl@x1yg3>
date: Sat Jul 5 23:22:32 EDT 2025
add INDEX
--- a/INDEX
+++ b/INDEX
@@ -31,7 +31,8 @@
top - approximates the top command on unix (author unknown)
tpl - Create tangara playlists in matching directories under ../Playlists/.
trackpoint - Set preferred X11 mouse acceleration for ThinkPad trackpoint.
-weather - print weather report in text or png of ascii art (by Fulton Browne)
+w - print weather report from api.weather.gov
+weather - print weather report from wttr.in (by Fulton Browne)
wircrc - rio irc client (by cinap_lenrek)
vtb - run vt -b with proper size fonts
zombie - launch uxn/zombie.rom
--- /dev/null
+++ b/w
@@ -1,0 +1,10 @@
+#!/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
--
⑨