~mil/sxmo-utils

25cc04e5d12c18a9d865ce702ec3a188e1474911 — Miles Alan 1 year, 10 months ago ad39251
Cleanup sxmo_weather.sh shellscript and make sure shellcheck passes
1 files changed, 4 insertions(+), 4 deletions(-)

M scripts/appscripts/sxmo_weather.sh
M scripts/appscripts/sxmo_weather.sh => scripts/appscripts/sxmo_weather.sh +4 -4
@@ 1,5 1,5 @@
#!/usr/bin/env sh
[ -z "$SXMO_WEATHERZIPS" ] && SXMO_WEATHERZIPS="
[ -z "$SXMO_WEATHER_ZIPS" ] && SXMO_WEATHER_ZIPS="
	10025 - NYC
	60007 - Chicago
	94016 - San Francisco


@@ 17,8 17,8 @@ ZIP=$(
pkill svkbd-sxmo

LATLON="$(grep "^$ZIP" /usr/share/sxmo/zipcodes_for_weather.csv)"
LAT=$(echo "$LATLON" | cut -d, -f2 | tr -d ' ')
LON=$(echo "$LATLON" | cut -d, -f3 | tr -d ' ')
URL="https://forecast.weather.gov/MapClick.php?lat=${LAT}&lon=${LON}&unit=0&lg=english&FcstType=text&TextType=1"
LAT="$(echo "$LATLON" | cut -d, -f2 | tr -d ' ')"
LON="$(echo "$LATLON" | cut -d, -f3 | tr -d ' ')"
URL='https://forecast.weather.gov/MapClick.php?lat='$LAT'&lon='$LON'&unit=0&lg=english&FcstType=text&TextType=1'

st -f Monospace-20 -e w3m "$URL"