Re: OK...let's try wazzup again
Brian Wolven <[email protected]>
| Newsgroups | gmane.comp.windows.shells.litestep |
|---|---|
| Message-ID | <[email protected]> |
Hale, Paul wrote:
> OK, I am trying to figure out a way to parse the data from a local file
> (or temp is fine). There is a part of the local file that looks like
> this:
> <tmp>36</tmp>
> <flik>26</flik>
> <t>Cloudy</t>
> <icon>26</icon>
>
> The part I am interested in is the icon. In the normal wazup outputline
> it looks like this:
> <icon>{%}</icon>
>
> And the text would look like this:
> {%1} (Assuming that was the first parsed value)
>
> So how can make that into a $var$ so that I can use it in this example?
>
> ExampleLabel_Image "${%1}$.png"
>
> I hope that example makes sense.
I kept this example from somebody's theme, or perhaps a post somewhere, I don't
even remember the source now. Maybe they'll see it and take credit for it:
;::::::::::::::::::::(o Configuration
; http://xoap.weather.com/search/search?where=
Birmingham USAL0054
loc $Birmingham$
;::::::::::::::::::::(o XML tags
ut "<ut>{%}</ut>"
dnam "<dnam>{%}</dnam>"
tm "<tm>{%}</tm>"
tmp "<tmp>{%}</tmp>"
cond "<t>{%}</t>"
icon "<icon>{%}</icon>"
;::::::::::::::::::::(o
condimg na
*Wazup xoap
xoapURL http://xoap.weather.com/weather/local/$loc$?cc=0
xoapInputString "$ut${*}$dnam${*}$tm${*}$tmp${*}$icon$"
xoapOutputString "{%2} - {%4}°{%1} at {%3}"
xoapEnabled true
xoapOnChecked !Execute [!WazupSetUpdateInterval xoap 1800][!WazupParseCommand
xoap !SetEvar condimg "{%5}"] [!LabelRefresh WxCond]
xoapOnFailure !Execute [!WazupSetUpdateInterval xoap 10]
xoapOnUpdated [!SetEvar condimg "{%5}"] [!LabelRefresh WxCond]
xoapLocalFile "$MiscDir$weather.xml"
xoapDisplayOn WXInfo
xoapSilent true
WeatherURL "http://www.weather.com/weather/local/$loc$"
PrintURL "http://www.weather.com/weather/print/$loc$"
*Label WXCond
WXCondX -70
WXCondY 15
WXCondHeight 64
WXCondWidth 64
WXCondImage "$LSImageFolder$/64x64/$condimg$.png"
WXCondOnLeftClick $WeatherURL$
WXCondOnMiddleClick $PrintURL$
WXCondOnRightClick !WazupCheck xoap
WXCondUpdateInterval 3600000
;------------------------------
WXCondPaintingMode ".image"
WXCondAlphaMap
;------------------------------
*Label WXInfo
WXInfoX -5
WXInfoY 80
WXInfoHeight 1
WXInfoWidth 1
WXInfoAutoHeightMode "top"
WXInfoAutoWidthMode "right"
WXInfoFont $iconFont$
WXInfoFontColor $fontColor$
WXInfoFontHeight 12
WXInfoFontVertAlign ".top"
WXInfoText "weather currently not available"
WXInfoOnTextChange !LabelRefresh WxCond
WXInfoUpdateInterval 3600000
---------------------------------------------------------------------
Can't Unsubscribe? Check http://desktopian.org/listunsub.html
LS List Homepage: http://wuzzle.org/list/litestep.php
Get the LS FAQ: http://lsfaq.shellfront.org