Permalink
Browse files

WeatherCodeFinder: Changed to use Yahoo YQL to find WOIED

  • Loading branch information...
smurfier committed Dec 7, 2013
1 parent c0497bd commit 862ca8be00f25696aef58f0494c2e08f82187c09
@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<places xmlns="http://where.yahooapis.com/v1/schema.rng" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:start="0" yahoo:count="5" yahoo:total="23"><place yahoo:uri="http://where.yahooapis.com/v1/place/44418" xml:lang="en-US"><woeid>44418</woeid><placeTypeName code="7">Town</placeTypeName><name>London</name><country type="Country" code="GB">United Kingdom</country><admin1 type="Country" code="GB-ENG">England</admin1><admin2 type="County" code="GB-LND">Greater London</admin2><admin3></admin3><locality1 type="Town">London</locality1><locality2></locality2><postal></postal><centroid><latitude>51.506321</latitude><longitude>-0.127140</longitude></centroid><boundingBox><southWest><latitude>51.261318</latitude><longitude>-0.563000</longitude></southWest><northEast><latitude>51.686031</latitude><longitude>0.280360</longitude></northEast></boundingBox><areaRank>7</areaRank><popRank>13</popRank></place><place yahoo:uri="http://where.yahooapis.com/v1/place/4063" xml:lang="en-US"><woeid>4063</woeid><placeTypeName code="7">Town</placeTypeName><name>London</name><country type="Country" code="CA">Canada</country><admin1 type="Province" code="CA-ON">Ontario</admin1><admin2 type="County" code="">Middlesex</admin2><admin3></admin3><locality1 type="Town">London</locality1><locality2></locality2><postal></postal><centroid><latitude>42.986889</latitude><longitude>-81.246208</longitude></centroid><boundingBox><southWest><latitude>42.824558</latitude><longitude>-81.390648</longitude></southWest><northEast><latitude>43.073051</latitude><longitude>-81.107582</longitude></northEast></boundingBox><areaRank>6</areaRank><popRank>11</popRank></place><place yahoo:uri="http://where.yahooapis.com/v1/place/2441293" xml:lang="en-US"><woeid>2441293</woeid><placeTypeName code="7">Town</placeTypeName><name>London</name><country type="Country" code="US">United States</country><admin1 type="State" code="US-KY">Kentucky</admin1><admin2 type="County" code="">Laurel</admin2><admin3></admin3><locality1 type="Town">London</locality1><locality2></locality2><postal></postal><centroid><latitude>37.127171</latitude><longitude>-84.083771</longitude></centroid><boundingBox><southWest><latitude>37.102821</latitude><longitude>-84.126663</longitude></southWest><northEast><latitude>37.152210</latitude><longitude>-84.038658</longitude></northEast></boundingBox><areaRank>3</areaRank><popRank>8</popRank></place><place yahoo:uri="http://where.yahooapis.com/v1/place/2441291" xml:lang="en-US"><woeid>2441291</woeid><placeTypeName code="7">Town</placeTypeName><name>London</name><country type="Country" code="US">United States</country><admin1 type="State" code="US-TX">Texas</admin1><admin2 type="County" code="">Kimble</admin2><admin3></admin3><locality1 type="Town">London</locality1><locality2></locality2><postal type="Zip Code">76854</postal><centroid><latitude>30.685770</latitude><longitude>-99.564850</longitude></centroid><boundingBox><southWest><latitude>30.677750</latitude><longitude>-99.574188</longitude></southWest><northEast><latitude>30.693800</latitude><longitude>-99.555527</longitude></northEast></boundingBox><areaRank>1</areaRank><popRank>8</popRank></place><place yahoo:uri="http://where.yahooapis.com/v1/place/2441279" xml:lang="en-US"><woeid>2441279</woeid><placeTypeName code="7">Town</placeTypeName><name>London</name><country type="Country" code="US">United States</country><admin1 type="State" code="US-CA">California</admin1><admin2 type="County" code="">Tulare</admin2><admin3></admin3><locality1 type="Town">London</locality1><locality2></locality2><postal type="Zip Code">93618</postal><centroid><latitude>36.475281</latitude><longitude>-119.438530</longitude></centroid><boundingBox><southWest><latitude>36.467670</latitude><longitude>-119.445732</longitude></southWest><northEast><latitude>36.482731</latitude><longitude>-119.431328</longitude></northEast></boundingBox><areaRank>1</areaRank><popRank>1</popRank></place></places>
@@ -13,13 +13,9 @@ Blur=1
[Variables]
@include=#@#User\Options.inc
EnigmaSettings=#@#User\Options.inc
FindEXE=#@#Addons\FindWOEID\FindWOEID.exe
FindXML=#@#Addons\FindWOEID\FindWOEID.xml
WriteVariable=WeatherCode
LastInput=London
FoundSearch=0
FoundCode=0
PlacePattern=(?(?=.*<place)(.*)</place>)
PanelWidth=530
@@ -53,26 +49,12 @@ StringStyle=BOLD
SolidColor=32,32,32
UpdateDivider=-1
FocusDismiss=1
Command1=[!SetVariable LastInput "$UserInput$"][!SetVariable FoundSearch 1][!UpdateMeasure MeasureWaitSearch "#CURRENTCONFIG#"] DefaultValue="#LastInput#"
[MeasureWaitSearch]
Measure=Calc
Formula=#FoundSearch#
DynamicVariables=1
IfEqualValue=1
IfEqualAction=[!WriteKeyValue Variables LastInput "#LastInput#" "#CURRENTPATH##CURRENTFILE#"]["#FindEXE#" "#LastInput#" "FoundCode" "#CURRENTCONFIG#"]
[MeasureWaitCode]
Measure=Calc
Formula=#FoundCode#
DynamicVariables=1
IfEqualValue=1
IfEqualAction=!Refresh
Command1=[!WriteKeyValue Variables LastInput "$UserInput$" "#CURRENTPATH##CURRENTFILE#"][!Refresh #CURRENTCONFIG#] DefaultValue="#LastInput#"
[MeasureMain]
Measure=Plugin
Plugin=WebParser
Url=file://#FindXML#
Url=http://query.yahooapis.com/v1/public/yql?q=select+*+from+geo.places+where+text+=+%27#LastInput#%27
RegExp=(?siU)#PlacePattern##PlacePattern##PlacePattern##PlacePattern##PlacePattern#
UpdateRate=86400

0 comments on commit 862ca8b

Please sign in to comment.