From 11869ffbf373829d48df981f9890f948681b7e8e Mon Sep 17 00:00:00 2001 From: stkhan Date: Mon, 6 May 2024 13:21:52 -0500 Subject: update radar --- nws | 16 ++++++++-------- nws.conf | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/nws b/nws index 63c6830..53289e4 100755 --- a/nws +++ b/nws @@ -34,11 +34,12 @@ get_location() { } show_radar() { - mpv --loop-file=inf "https://radar.weather.gov/ridge/standard/${area1}_loop.gif" -} - -show_full_radar() { - mpv --loop-file=inf "https://radar.weather.gov/ridge/standard/CONUS_loop.gif" + case $radar_choice in + "1") mpv --loop-file=inf "https://radar.weather.gov/ridge/standard/${area1}_loop.gif";; + "2") mpv --loop-file=inf "https://radar.weather.gov/ridge/standard/${area3}_loop.gif";; + "3") mpv --loop-file=inf "https://radar.weather.gov/ridge/standard/CONUS_loop.gif";; + *) echo "You can only choose from 1 to 3." +esac } show_alerts() { @@ -129,8 +130,7 @@ get_forecast() { help() { echo "nws" - echo " --full-radar: shows radar of entire US" - echo " --radar: shows local radar" + echo " --radar (1,2,3): shows local radar" echo " --spc: shows storm predictions" echo " --retrieve-counties: shows county ids" echo " --ca: shows number of alerts" @@ -139,8 +139,8 @@ help() { echo " -f: shows local forecast" } cleanup +radar_choice=$2 case $1 in - "--full-radar") show_full_radar;; '--radar') show_radar;; '--spc') show_spc;; '--retrieve-counties') retrieve_counties;; diff --git a/nws.conf b/nws.conf index 950cbcb..2926440 100644 --- a/nws.conf +++ b/nws.conf @@ -10,5 +10,8 @@ area1="SOUTHPLAINS" # go to weather.gov, hover over your area on the center map, and put the code here area2="oun" +# go to weather.gov/AREA2, and hover over Radar. At the end of each "Local Radar" option will have a four letter code, such as KTLX, KFDR, etc +area3="KTLX" + # run tw --retrieve-counties, and type the code next to your county. Must have state set first. Used for alerts countyId="OKC047" -- cgit v1.2.3