diff --git a/plugins/weather/openweather_ b/plugins/weather/openweather_ old mode 100644 new mode 100755 index bbd3c7a4..0a045607 --- a/plugins/weather/openweather_ +++ b/plugins/weather/openweather_ @@ -19,20 +19,19 @@ # env.apikey XYZ query_string=$(printf '%s' "${0#*_}" | tr '_' '=') -TMPFILE=$(mktemp) -trap 'rm -f $TMPFILE' EXIT +plugin_name=$( basename $0 ) +OWAPI=$( curl -s "http://api.openweathermap.org/data/2.5/weather?mode=xml&${query_string}") # API returns temp in K, we have to convert it in C +# &units=metric would change that ;-) KELVIN_BIAS=273 -curl -s "http://api.openweathermap.org/data/2.5/weather?mode=xml&${query_string}&APPID=${apikey}" > $TMPFILE - -CITY=$(fgrep "