mirror of
https://github.com/smxi/inxi.git
synced 2025-09-02 02:29:11 +00:00
fixed the glitch with two plus word city/country names, should work now
This commit is contained in:
parent
7b312d6a42
commit
a8c397a3cb
2 changed files with 3 additions and 4 deletions
6
inxi
6
inxi
|
@ -2556,8 +2556,7 @@ show_options()
|
||||||
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
||||||
print_screen_output "-! location=<location> - <location> Supported types: zip (postal) code; city,state; latitude,longtitude"
|
print_screen_output "-! location=<location> - <location> Supported types: zip (postal) code; city,state; latitude,longtitude"
|
||||||
print_screen_output " Only use if you want the weather somewhere other than the machine running $SCRIPT_NAME."
|
print_screen_output " Only use if you want the weather somewhere other than the machine running $SCRIPT_NAME."
|
||||||
print_screen_output " Must be used with -w. Note: cities/countries with two words in name don't work right,"
|
print_screen_output " Must be used with -w."
|
||||||
print_screen_output " use zipcode or latitude,longitude instead."
|
|
||||||
fi
|
fi
|
||||||
if [[ $1 == 'full' ]];then
|
if [[ $1 == 'full' ]];then
|
||||||
print_screen_output " "
|
print_screen_output " "
|
||||||
|
@ -7981,7 +7980,8 @@ get_weather_data()
|
||||||
# first we get the location data, once that is parsed and handled, we move to getting the
|
# first we get the location data, once that is parsed and handled, we move to getting the
|
||||||
# actual weather data, assuming no errors
|
# actual weather data, assuming no errors
|
||||||
if [[ -n $ALTERNATE_WEATHER_LOCATION ]];then
|
if [[ -n $ALTERNATE_WEATHER_LOCATION ]];then
|
||||||
location=$ALTERNATE_WEATHER_LOCATION
|
# note, this api does not support spaces in names
|
||||||
|
location=$( sed 's/[[:space:]]*//g' $ALTERNATE_WEATHER_LOCATION )
|
||||||
else
|
else
|
||||||
if [[ $b_test_loc != 'true' ]];then
|
if [[ $b_test_loc != 'true' ]];then
|
||||||
location_data=$( wget -q -t 1 -T $WGET_TIMEOUT -O- $location_site || wget_error=$? )
|
location_data=$( wget -q -t 1 -T $WGET_TIMEOUT -O- $location_site || wget_error=$? )
|
||||||
|
|
1
inxi.1
1
inxi.1
|
@ -386,7 +386,6 @@ Turns on hostname in System line. Overrides inxi config file value (if set): B_S
|
||||||
.TP
|
.TP
|
||||||
.B \-! location=<location_string>
|
.B \-! location=<location_string>
|
||||||
With \-w, get weather for an alternate location. Accepts postal/zip code, city,state pair, or latitude,longitude.
|
With \-w, get weather for an alternate location. Accepts postal/zip code, city,state pair, or latitude,longitude.
|
||||||
Note: cities/countries with two words in name don't work right, use zipcode or latitude,longitude instead.
|
|
||||||
Examples: \-! location=95623 OR \-! location=Boston,MA OR \-! location=45.5234,\-122.6762
|
Examples: \-! location=95623 OR \-! location=Boston,MA OR \-! location=45.5234,\-122.6762
|
||||||
|
|
||||||
.SH DEBUGGING OPTIONS
|
.SH DEBUGGING OPTIONS
|
||||||
|
|
Loading…
Add table
Reference in a new issue