summaryrefslogtreecommitdiff
path: root/nws
diff options
context:
space:
mode:
Diffstat (limited to 'nws')
-rwxr-xr-xnws10
1 files changed, 8 insertions, 2 deletions
diff --git a/nws b/nws
index 53289e4..c4c5d17 100755
--- a/nws
+++ b/nws
@@ -2,7 +2,8 @@
# nws - a National Weather Service terminal client
# git.slickd.xyz/nws
-source ~/.config/nws.conf
+source ~/.config/nws/nws.conf
+version=v0.0.3
colors() {
NOCOLOR='\033[0m'
@@ -101,6 +102,8 @@ get_graphicast() {
prog=$(echo "$prog + 12.5" | bc)
bar="${bar}#"
done
+ echo "Getting Mesonet radar..."
+ wget -q -P /tmp/nws https://data.mesonet.org/data/nids/maps/realtime/${state_full}.MosaicBREF.png
$IV /tmp/nws/*
}
@@ -129,7 +132,8 @@ get_forecast() {
}
help() {
- echo "nws"
+ echo "nws $version"
+ echo
echo " --radar (1,2,3): shows local radar"
echo " --spc: shows storm predictions"
echo " --retrieve-counties: shows county ids"
@@ -137,6 +141,7 @@ help() {
echo " --gc: shows graphic forecast, uses image viewer set in config"
echo " -a: shows alerts"
echo " -f: shows local forecast"
+ echo
}
cleanup
radar_choice=$2
@@ -149,5 +154,6 @@ case $1 in
'-a') show_alerts | sed 's/null//g ; s/"//g' |less -R;;
'-f') get_forecast | sed 's/"//g ; s/null/0/g' | less -R;;
'-h') help;;
+ '--help') help;;
"") help;;
esac