Skip to content

Commit

Permalink
v 1.0.1 - weather fix
Browse files Browse the repository at this point in the history
  • Loading branch information
creewick committed May 9, 2023
1 parent 614267c commit d574645
Show file tree
Hide file tree
Showing 35 changed files with 20 additions and 61 deletions.
Binary file removed @Resources/Images/Weather/01n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/02n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/03n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/04d.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/04n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/09n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/10n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/11n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/13n.png
Binary file not shown.
Binary file removed @Resources/Images/Weather/50n.png
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file modified @Resources/Languages/de/Settings/Language.inc
Binary file not shown.
Binary file modified @Resources/Languages/de/Widgets/Weather.inc
Binary file not shown.
6 changes: 3 additions & 3 deletions @Resources/Languages/en/Settings/Language.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
tLanguage=Language
tTemperature=Temperature

tMetric=Celsius
tImperial=Fahrenheit
tStandard=Kelvin
tCelsius=Celsius
tFahrenheit=Fahrenheit
tKelvin=Kelvin
Binary file modified @Resources/Languages/en/Widgets/Weather.inc
Binary file not shown.
Binary file modified @Resources/Languages/ru/Settings/Language.inc
Binary file not shown.
Binary file modified @Resources/Languages/ru/Widgets/Weather.inc
Binary file not shown.
Binary file modified @Resources/Languages/ua/Settings/Language.inc
Binary file not shown.
Binary file modified @Resources/Languages/ua/Widgets/Weather.inc
Binary file not shown.
Binary file modified @Resources/Scripts/Contexts/Units.inc
Binary file not shown.
Binary file modified @Resources/Scripts/Settings/About.inc
Binary file not shown.
Binary file modified @Resources/Scripts/Settings/WhatsNew.inc
Binary file not shown.
Binary file modified @Resources/Scripts/Widgets/Weather.inc
Binary file not shown.
Binary file modified @Resources/Variables/Global.inc
Binary file not shown.
Binary file modified @Resources/Variables/Layout.inc
Binary file not shown.
Binary file modified @Resources/Variables/Weather.inc
Binary file not shown.
75 changes: 17 additions & 58 deletions Widgets/Weather/Settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -57,77 +57,36 @@ W=(#WidgetWidth# * 0.35)
H=(#WidgetHeight# * 0.06)
StringAlign=Center
DynamicVariables=1
Command1=[!SetVariable CityInput "$UserInput$"][!CommandMeasure UpdateCity "Update"]
FocusDismiss=0
Command1=[!SetVariable City "$UserInput$"][!SetOption Option1Value Text "Updating..."][!UpdateMeter Option1Value][!Redraw][!CommandMeasure UpdateCity "Update"][!CommandMeasure UpdateCityDebug "Update"]

[Option2Title]
Meter=String
Text=#tWeatherAPIKey#
FontFace=#FontFace#
FontSize=(#WidgetWidth# * 0.035)
FontColor=#ForegroundColor#
FontWeight=500
AntiAlias=1
X=(#WidgetPadding# + #WidgetWidth# * 0.05)
Y=(#WidgetPadding# + #WidgetHeight# * 0.43)
W=(#WidgetWidth# * 0.5)
ClipString=2
[UpdateCity]
Measure=WebParser
DynamicVariables=1
URL=https://geocoding-api.open-meteo.com/v1/search?name=#City#&count=1&language=#Language#
RegExp=(?U)"name":"(.*)",.*"latitude":(.*),.*"longitude":(.*),.*
OnConnectErrorAction=[!SetOption Option1Value Text "Connection error"][!UpdateMeter Option1Value][!Redraw]
OnRegExpErrorAction=[!SetOption Option1Value Text "City not found"][!UpdateMeter Option1Value][!Redraw]
FinishAction=[!WriteKeyValue Variables Latitude [Latitude] "#@#Variables\Weather.inc"][!WriteKeyValue Variables Longitude [Longitude] "#@#Variables\Weather.inc"][!WriteKeyValue Variables City [City] "#@#Variables\Weather.inc"][!SetOption Option1Value Text [City]][!UpdateMeter Option1Value][!Redraw]

[Option2Value]
Meter=String
Text=#APIKey#
FontFace=Consolas
FontSize=(#WidgetWidth# * 0.03)
FontColor=#ForegroundColor#
DynamicVariables=1
FontWeight=300
AntiAlias=1
StringAlign=Center
X=(#WidgetPadding# + #WidgetWidth# * 0.75)
Y=(#WidgetPadding# + #WidgetHeight# * 0.43)
H=(#WidgetHeight# * 0.05)
W=(#WidgetWidth# * 0.33)
SolidColor=#GrayColor#
ClipString=1
Padding=2,2,2,2
LeftMouseUpAction=[!CommandMeasure "Option2Input" "ExecuteBatch ALL"]

[Option2Input]
Measure=Plugin
Plugin=InputText
DefaultValue=#APIKey#
FontFace=Consolas
FontSize=(#WidgetWidth# * 0.03)
FontColor=#ForegroundColor#
SolidColor=#BackgroundColor#
X=(#WidgetPadding# + #WidgetWidth# * 0.58)
Y=(#WidgetPadding# + #WidgetHeight# * 0.43)
W=(#WidgetWidth# * 0.35)
H=(#WidgetHeight# * 0.1)
StringAlign=Center
[UpdateCityDebug]
Measure=WebParser
DynamicVariables=1
Command1=[!WriteKeyValue Variables APIKey "$UserInput$" "#@#Variables\Weather.inc"][!Refresh]
URL=https://geocoding-api.open-meteo.com/v1/search?name=#City#&count=1&language=#Language#
RegExp=.*
FinishAction=[!Log "[GEOCODING DATA]: [&UpdateCityDebug]"]

[UpdateCity]
[City]
Measure=WebParser
DynamicVariables=1
URL=http://api.openweathermap.org/geo/1.0/direct?q=#CityInput#&limit=1&appid=#APIKey#
RegExp=(?siU).*"#Language#":"(.*)".*"lat":(.*),.*"lon":(.*),.*
URL=[UpdateCity]
StringIndex=1

[Latitude]
Measure=WebParser
URL=[UpdateCity]
StringIndex=2
OnChangeAction=[!WriteKeyValue Variables Latitude [Latitude] "#@#Variables\Weather.inc"]

[Longitude]
Measure=WebParser
URL=[UpdateCity]
StringIndex=3
OnChangeAction=[!WriteKeyValue Variables Longitude [Longitude] "#@#Variables\Weather.inc"]

[City]
Measure=WebParser
URL=[UpdateCity]
StringIndex=1
OnChangeAction=[!WriteKeyValue Variables City [City] "#@#Variables\Weather.inc"][!Refresh]
Binary file modified Widgets/Weather/WhatsNew.ini
Binary file not shown.

0 comments on commit d574645

Please sign in to comment.