kaivalagi and
myself have updated the process for getting the
Conky Weather Forecast Python Script.
Go to the link for the weather script and follow the updated instructions for the script. There aren't any updates to the script itself, yet, but since kaivalagi has moved to Archlinux I'm going to package it for Ubuntu in the
conkyhardcore PPA.
It's packaged for Hardy, Intrepid, Jaunty and Karmic. I didn't do Lucid yet since it's not officially released. If anyone would like it for Lucid Lynx, let me know.
Here's what my conkyForecast output looks like:
conkyforecast.png
conkyForecast.template
Code:
${color7}Weather ${color4}- ${color}[--datatype=OB] ${color4}- ${color}[--datatype=CT]
${image [--datatype=BI] -p 20,110 -s 45x45}${image [--datatype=WI] -p 105,110 -s 45x45}${image [--datatype=MI] -p 200,110 -s 45x45}
${color4}Wind: ${color}[--datatype=WS --imperial] - [--datatype=WD]${color4}${goto 125}${color4}Moon Phase: ${color}[--datatype=MP]
${color4}Temp: ${color}[--datatype=HT --hideunits --centeredwidth=4]${goto 125}${color4}Rain: ${color}[--datatype=PC --startday=0 --centeredwidth=4]
${color4}Feels like: ${color}[--datatype=LT --hideunits --centeredwidth=4]${goto 125}${color4}Humidity: ${color}[--datatype=HM --centeredwidth=4]
${color4}High: ${color}[--datatype=HT --hideunits --startday=0 --centeredwidth=4]${goto 125}${color4}Dew Point: ${color}[--datatype=DP --hideunits --centeredwidth=4]
${color4}Low: ${color}[--datatype=LT --startday=0 --hideunits --centeredwidth=4]${goto 125}${color4}UV: ${color}[--datatype=UI] - [--datatype=UT]
${color4}Sunrise: ${color}[--datatype=SR]${goto 125}${color4}Sunset: ${color}[--datatype=SS]
${color4}Pressure: ${color}[--datatype=BR] - [--datatype=BD]
pollen
${goto 25}[--datatype=DW --startday=1 --shortweekday]${goto 95}[--datatype=DW --startday=2 --shortweekday]${goto 165}[--datatype=DW --startday=3 --shortweekday]${goto 235}[--datatype=DW --startday=4 --shortweekday]
${image [--datatype=WI --startday=1] -p 18,290 -s 28x28}${image [--datatype=WI --startday=2] -p 88,290 -s 28x28}${image [--datatype=WI --startday=3] -p 158,290 -s 28x28}${image [--datatype=WI --startday=4] -p 228,290 -s 28x28}
${goto 17}[--datatype=HT --startday=1 --hideunits]${color4}/${color}[--datatype=LT --startday=1 --hideunits]${goto 87}[--datatype=HT --startday=2 --hideunits]${color4}/${color}[--datatype=LT --startday=2 --hideunits]${goto 157}[--datatype=HT --startday=3 --hideunits]${color4}/${color}[--datatype=LT --startday=3 --hideunits]${goto 227}[--datatype=HT --startday=4 --hideunits]${color4}/${color}[--datatype=LT --startday=4 --hideunits]
${font Bitstream Vera Sans Mono:size=8}${color4}Last Update: ${color}[--datatype=LU]${font}
The pollen section is showed using:
Code:
${execpi 900 conkyForecast -i --location=48174 --template=$HOME/conkyForecast.template|sed "s|pollen|$(echo -en "\${color4}Pollen: \${color}"$(curl -d "affiliateid=$ID&zip=$ZIP" http://www.pollen.com/forecast.asp | cut -d'|' --fields=5,11|sed 's/|/${color4} - ${color}/'|tr -d '\r\n' |sed 's/\(.*Microsoft.*\|.*Server Error.*\)/${color}Unavailable/'))|"}
You have to sign up for an affiliate id on pollen.com. then you put your id in place of $ID and your zip in place of $ZIP
Weather alerts from weather.gov:
weather-alert.png
Code:
${execpi 900 conky-rss.sh "http://www.weather.gov/alerts/wwarssget.php?zone=MIZ076"|sed -e 's/\(NOAA - National Weather Service\)//' -e 's/\(There are no active watches, warnings or advisories.*\|special weather statement.*\)//i' -e '/^$/d'|fold -sw55|sed -e 's/\(.*Warning .*\)/${color2}\1${color}/' -e 's/\(.*Watch .*\)/${color3}\1${color}/'}
the
MIZ076 should, obviously, be replaced with your zone.
The text forecast from Yahoo.com:
forecast.png
Code:
${execpi 900 w3m -dump 'http://weather.yahoo.com/united-states/michigan/belleville-2361992/'|grep -A10 'How to Read This'|tr -s '\n*' ' #'|sed -e 's/How to Read This # //' -e 's/ # /\n/g'|head -4|fold -sw 55|sed 's/^[^:]*:/${color4}&${color}/'}
That code doesn't look right when run from the terminal but looks fine when run from conky or through cron.
So if you use the
Conky Weather Forecast Python Script, don't forget to update the ppa in /etc/apt/sources.list.d following the instructions.
Bookmarks