picasso21 wrote:I have another weather skin I could not work for pais brasil sp ,thanks
Code: Select all
http://toastbrotpascal.deviantart.com/art/SDT-161064442
This skin is very old and it uses Yahoo Weather and as such, although mak_kawa said in an earlier post that it is still working, I couldn't figure out how can it be made to properly work. So, probably the code of the skin should be completely rewritten, to make it to work.
About the Enigma Weather, it also used Yahoo Weather. A while ago I (partially) rewrote it, to make it to use the Weather.com.
So, I think the only thing which should be done is to replace the code of the YahooWeather.inc file (within the @Resources\Measures folder), with the following one:
Code: Select all
[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#Unit#&dayf=4
RegExp=(?siU)<weather ver="(.*)">.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*</bar>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*</wind>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>
StringIndex=1
;-----------------------
; LOCATION
[MeasureWeatherLocation]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=7
[MeasureWeatherCity]
Measure=String
String=[MeasureWeatherLocation]
RegExpSubstitute=1
Substitute="^(.*), (.*), (.*)$":"\1"
DynamicVariables=1
[MeasureWeatherRegion]
Measure=String
String=[MeasureWeatherLocation]
RegExpSubstitute=1
Substitute="^(.*), (.*), (.*)$":"\2"
DynamicVariables=1
[MeasureWeatherCountry]
Measure=String
String=[MeasureWeatherLocation]
RegExpSubstitute=1
Substitute="^(.*), (.*), (.*)$":"\3"
DynamicVariables=1
;-----------------------
; UNITS
[MeasureWeatherUnitTemp]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=2
[MeasureWeatherUnitDistance]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=3
[MeasureWeatherUnitPressure]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=5
[MeasureWeatherUnitSpeed]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=4
;-----------------------
; WIND
[MeasureWeatherWindChill]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=14
[MeasureWeatherWindDirection]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=21
[MeasureWeatherWindDirectionCardinal]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=22
;Measure=Calc
;Formula=FLOOR(((MeasureWeatherWindDirection/11.25)+1.5) < 33 ? ((MeasureWeatherWindDirection/11.25)+1.5) : ((MeasureWeatherWindDirection/11.25)+1.5)-32)
;Substitute="10":"EbS","11":"ESE","12":"SEbE","13":"SE","14":"SEbS","15":"SSE","16":"SbE","17":"S","18":"SbW","19":"SSW","20":"SWbS","21":"SW","22":"SWbW","23":"WSW","24":"WbSW","25":"W","26":"WbN","27":"WNW","28":"NWbW","29":"NW","30":"NWbN","31":"NNW","32":"NbW","1":"N","2":"NbE","3":"NNE","4":"NEbN","5":"NE","6":"NEbE","7":"ENE","8":"EbN","9":"E"
[MeasureWeatherWindSpeed]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=19
;-----------------------
; ATMOSPHERE
[MeasureWeatherAtmoHumidity]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=23
[MeasureWeatherAtmoVisibility]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=24
[MeasureWeatherAtmoPressure]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=17
;--------------------------------
; SUN
[MeasureWeatherSunrise]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=10
[MeasureWeatherSunset]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=11
;--------------------------------
; REGION
[MeasureWeatherTimeZone]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=12
[MeasureWeatherLatitude]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=8
[MeasureWeatherLongitude]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=9
;--------------------------------
; CURRENT
[MeasureWeatherDesc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=15
[MeasureWeatherIcon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=16
[MeasureWeatherTemp]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=13
;-------------------------
; DAY 2
[MeasureWeatherDay2Date]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=33
;Substitute="Sun":"Sunday","Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday"
[MeasureWeatherDay2Low]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=36
[MeasureWeatherDay2High]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=35
[MeasureWeatherDay2Average]
Measure=Calc
Formula=ROUND((MeasureWeatherDay2Low+MeasureWeatherDay2High)/2)
[MeasureWeatherDay2Desc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=38
[MeasureWeatherDay2Icon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=37
;-------------------------
; DAY 3
[MeasureWeatherDay3Date]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=39
;Substitute="Sun":"Sunday","Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday"
[MeasureWeatherDay3Low]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=42
[MeasureWeatherDay3High]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=41
[MeasureWeatherDay3Average]
Measure=Calc
Formula=ROUND((MeasureWeatherDay3Low+MeasureWeatherDay3High)/2)
[MeasureWeatherDay3Desc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=44
[MeasureWeatherDay3Icon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=43
;-----------------------
; LOGO
; Yahoo! Weather requires that any application which uses their API include the Y!W logo and a link to their website. This section will automatically insert those elements into any skin which uses this measure module. Please do not remove these elements if you are redistributing this file with your own skin.
[YahooWeatherLogo]
Meter=IMAGE
MeterStyle=Style#Variant#Icon
Group=EnigmaMouseover
ImageName=#@#Images\MoxaWeather\Logo.png
H=25
W=25
Hidden=1
LeftMouseUpAction=["http://weather.yahoo.com/"][!Redraw]
ToolTipText=Powered by Yahoo! Weather.
Check the LocationCode and Unit variables. The first is your location code, which can be found here:
https://weather.codes/
The Unit can be either m (metric - temperatures in Celsius degrees), or i (imperial - temperatures in Fahrenheit degrees). These variables are located into the @Resources\User\Options.inc file, you should replace them there.