new version, tarball. Fixed issue with spaces in names for cities/states/countries, added

man and help instructions to remove spaces and examples.
This commit is contained in:
inxi-svn 2013-05-18 05:37:29 +00:00
parent 5be282cea6
commit 01fba3c64d
3 changed files with 18 additions and 4 deletions

6
inxi
View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### Version: 1.9.03 #### Version: 1.9.04
#### Date: May 17 2013 #### Date: May 17 2013
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
@ -2556,7 +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." print_screen_output " Must be used with -w. City/country names must not contain spaces: newyork,ny"
fi fi
if [[ $1 == 'full' ]];then if [[ $1 == 'full' ]];then
print_screen_output " " print_screen_output " "
@ -7981,7 +7981,7 @@ get_weather_data()
# actual weather data, assuming no errors # actual weather data, assuming no errors
if [[ -n $ALTERNATE_WEATHER_LOCATION ]];then if [[ -n $ALTERNATE_WEATHER_LOCATION ]];then
# note, this api does not support spaces in names # note, this api does not support spaces in names
location=$( sed 's/[[:space:]]*//g' <<< $ALTERNATE_WEATHER_LOCATION ) location=$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=$? )

3
inxi.1
View file

@ -386,7 +386,8 @@ 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.
Examples: \-! location=95623 OR \-! location=Boston,MA OR \-! location=45.5234,\-122.6762 Note: city/country/state names must not contain spaces!
Examples: \-! location=95623 OR \-! location=Boston,MA OR \-! location=45.5234,\-122.6762 OR \-! location=newyork,ny
.SH DEBUGGING OPTIONS .SH DEBUGGING OPTIONS
.TP .TP

View file

@ -1,3 +1,16 @@
=====================================================================================
Version: 1.9.04
Patch Version: 00
Script Date: May 17 2013
-----------------------------------
Changes:
-----------------------------------
new version, tarball. Fixed issue with spaces in names for cities/states/countries, added
man and help instructions to remove spaces and examples.
-----------------------------------
-- Harald Hope - Fri, 17 May 2013 22:35:59 -0700
===================================================================================== =====================================================================================
Version: 1.9.03 Version: 1.9.03
Patch Version: 00 Patch Version: 00