X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Fbin%2Ffetch-covid-19-cases-usa-ny;h=95a039f1f12a9909288c28c721a5f4d05cc026b7;hb=55115ac1255c2c915eca460b0a95d8c5b385947a;hp=603ce7fc842ca7ec37ee486bb38890529fffc13a;hpb=2c77b18f80ab8be7340e87d65e22dd4ac83ee2c0;p=khome.git diff --git a/home/bin/fetch-covid-19-cases-usa-ny b/home/bin/fetch-covid-19-cases-usa-ny index 603ce7f..95a039f 100755 --- a/home/bin/fetch-covid-19-cases-usa-ny +++ b/home/bin/fetch-covid-19-cases-usa-ny @@ -5,9 +5,46 @@ # - awk # - hxpipe (packaged in html-xml-utils on Debian and Ubuntu) +VALID_LOCATIONS=' + Albany + Broome + Delaware + Dutchess + Erie + Greene + Herkimer + Monroe + Montgomery + Nassau + Orange + Putnam + Rockland + Saratoga + Schenectady + Suffolk + Tioga + Tompkins + Ulster + Westchester + New York State (Outside of NYC) + New York City: + Total Positive Cases (Statewide) + ' +DEFAULT_LOCATION='New York City:' + +usage() { + printf "Usage: %s [LOCATION]\n" "$0" + printf '\n' + printf 'LOCATION =' + printf '%s\n' "$VALID_LOCATIONS" + printf "Default LOCATION:\n %s\n" "$DEFAULT_LOCATION" + exit 1 +} + case "$1" in - '') location='New York City:';; - *) location="$1";; + '-h') usage;; + '' ) location="$DEFAULT_LOCATION";; + * ) location="$1";; esac curl 'https://health.ny.gov/diseases/communicable/coronavirus/' \