Cleanup sxmo_weather.sh shellscript and make sure shellcheck passes
This commit is contained in:
parent
ad39251c5d
commit
25cc04e5d1
1 changed files with 4 additions and 4 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue