Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhonghuaren
conkyweather
weather.sh.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File weather.sh.patch of Package conkyweather
--- ./weather.sh.orig 2011-06-01 15:22:32.000000000 -0700 +++ ./weather.sh 2011-08-31 06:15:12.000000000 -0700 @@ -33,7 +33,7 @@ UNITS=m # where this script and the XSLT lives -RUNDIR=`dirname $0` +RUNDIR=/usr/share/conkyweather # there's probably other stuff besides CURL that will work for this, but i haven't # tried any others. @@ -47,9 +47,9 @@ # CURL url. Use cc=* for current forecast or dayf=10 to get a multi-day forecast #CURLURL="http://xoap.weather.com/weather/local/$LOCID?cc=*&unit=$UNITS&dayf=4" -CURLURL="http://www.google.com/ig/api?weather=${LOCID}" +CURLURL="http://www.google.com/ig/api?weather=${LOCID}&oe=utf-8" -weather_xml="${RUNDIR}/weatherInfo.xml" +weather_xml="$HOME/weatherInfo.xml" # don't get the file if created within an hour update=3600 @@ -91,6 +91,7 @@ } +get_file # The XSLT to use when translating the response from weather.com @@ -107,6 +108,16 @@ elif [ "$CONDITIONS" = "ct" ]; then XSLT=$RUNDIR/currentTemp.xslt +elif [ "$CONDITIONS" = "ch" ]; +then + XSLT=$RUNDIR/currentHumidity.xslt + eval "$XSLTCMD $XSLT $weather_xml" | sed 's|^.*: *||' + exit +elif [ "$CONDITIONS" = "cw" ]; +then + XSLT=$RUNDIR/currentWind.xslt + eval "$XSLTCMD $XSLT $weather_xml" | sed 's|^.*: *||' + exit elif [ "$CONDITIONS" = "cc" ]; then XSLT=$RUNDIR/currentCondition.xslt @@ -121,7 +132,6 @@ #(if you want to convert stuff to lower-case or upper case or something) #FILTER="|gawk '{print(tolower(\$0));}'" -get_file #####
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor