Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Rainmeter]
- Update=1000
- MiddleMouseUpAction=!Refresh #CURRENTCONFIG#
- DynamicWindowSize=1
- ; spaces prefix formulas in WriteKeyValue so that WKV doesn't try to parse the formula and log a syntax error
- ; http://rainmeter.net/forum/viewtopic.php?f=5&t=9806&p=57507
- ContextTitle="Align left"
- ContextAction=[!WriteKeyValue mainString StringAlign LeftTop][!WriteKeyValue mainString X 0][!WriteKeyValue subString X " (Floor(#*size*# * 0.2))"][!Refresh #CURRENTCONFIG#]
- ContextTitle2="Align center"
- ContextAction2=[!WriteKeyValue mainString StringAlign CenterTop][!WriteKeyValue mainString X " (Floor(#*size*# * 7.5))"][!WriteKeyValue subString X " (Floor(#*size*# * 7.5))"][!Refresh #CURRENTCONFIG#]
- ContextTitle3="Align right"
- ContextAction3=[!WriteKeyValue mainString StringAlign RightTop][!WriteKeyValue mainString X " (Floor(#*size*# * 15))"][!WriteKeyValue subString X " (Floor((#*size*# * 15) - (#*size*# * 0.2)))"][!Refresh #CURRENTCONFIG#]
- [Metadata]
- Name=Do I Need a Jacket and/or umbrella?
- Author= a redditor who doesn't know what he's doing | based off: DINAJ by Flying Hyrax, DINAJ w/ precip by LightUmbra
- Information=DINAJ but edited by a moron to tell you if you need an umbrella + updated temperature descriptions with a wider range (made for Toronto, Mapleland, so take that how you will) + a little profanity
- Version=3.5sidefork??
- License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
- [Variables]
- ; Weather.com location code
- ; Go to weather.com and search for your location.
- ; The location code is in the URL on the page for your location.
- ; e.g. for Chicago:
- ; https://weather.com/weather/today/l/USIL0225:1:US
- ; ^^^^^^^^
- ; enter it as indicated under [mWeatherData]
- ; you'll have to edit quite a few things in the .lua to make it work in F, it's much easier to just convert your thresholds in F to C and work with it that way, and edit/deal with the fact that the rollover text will be in C
- unit=m
- ; temperature thresholds in C
- jacket_temp=15
- coat_temp=5
- ; below 0C there will be no umbrella label, between that and jacket_temp it will read "need a jacket/coat and an umbrella", above it and it will read "need an umbrella"
- ; descriptors (nice, cold, etc) are in the .lua file, 'nice' is ~17C-25C, 'below freezing' is uh, -3? to -6? | I have had zero experience with lua before this so, this was just trial and error because the thing was originally coded in F and we're not savages here
- ; there's also an 'if' cluster to change 'and will rain' to 'but will rain' when the text reads 'nice', be sure to change the temp ranges
- ; precipitation chance limit, from this to 85% will read "might rain/snow", above 85% will change to "will rain/snow".
- pcp_limit=45
- ; non-color font changes are in each meter at the bottom
- text_color=255,255,255,204
- ;;====================================================
- ;; Measures
- ;;====================================================
- [mWeatherData]
- Measure=Plugin
- Plugin=WebParser
- ;paste the weather code vvvvvvvv
- URL="http://wxdata.weather.com/wxdata/weather/local/CAXX0504?cc=*&unit=m&dayf=1"
- RegExp="(?siU)^(.*)$"
- UpdateRate=900
- ErrorString="DINAJ2: WebParser fail"
- ForceReload=1
- FinishAction=[!EnableMeasureGroup Weather][!UpdateMeter *][!Redraw]
- [mTempUnit]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- URL=[mWeatherData]
- StringIndex2=1
- RegExp="<ut>(.+)<\/ut>"
- [mWindUnit]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- URL=[mWeatherData]
- StringIndex2=1
- RegExp="<us>(.+)<\/us>"
- [mTimestamp]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- Url=[mWeatherData]
- StringIndex2=1
- RegExp="<lsup>(.+)</lsup>"
- [mPlaceName]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- Url=[mWeatherData]
- StringIndex2=1
- RegExp="<dnam>(.+)</dnam>"
- [mTemperature]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- Url=[mWeatherData]
- StringIndex2=1
- RegExp=<tmp>(\d+)</tmp>
- [mFeelsLike]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- Url=[mWeatherData]
- StringIndex2=1
- RegExp=<flik>(\d+)</flik>
- [mCondition]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- Url=[mWeatherData]
- StringIndex2=1
- RegExp=<t>(.+)</t>
- [mWindSpeed]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- Url=[mWeatherData]
- StringIndex2=1
- RegExp=<s>(.+)</s>
- [mWindGust]
- Measure=Plugin
- Plugin=WebParser
- Group=Weather
- Disabled=1
- Url=[mWeatherData]
- StringIndex2=1
- RegExp=<gust>(.+)</gust>
- ;The next three measures are needed to pull out the chance of precipitation
- [MeasurePrecip]
- Measure=WebParser
- UpdateRate=900
- Url=[mWeatherData]
- RegExp=(?siU)<part p="d">.*<ppcp>(.*)</ppcp>.*</part>.*<part p="n">.*<ppcp>(.*)</ppcp>.*</part>
- [mPrecipD]
- Measure=Plugin
- Plugin=WebParser
- Url=[MeasurePrecip]
- StringIndex=1
- [mPrecipN]
- Measure=Plugin
- Plugin=WebParser
- Url=[MeasurePrecip]
- StringIndex=2
- [mStringScript]
- Measure=Script
- ScriptFile=dinaj.lua
- Group=Weather
- TempMeasureName=mFeelsLike
- WindMeasureName=mWindSpeed
- PcpDMeasureName=mPrecipD
- PcpNMeasureName=mPrecipN
- FirstString=mainString
- SecondString=subString
- Unit=#unit#
- JacketThreshold=#jacket_temp#
- CoatThreshold=#coat_temp#
- PcpThreshold=#pcp_limit#
- Disabled=1
- ;;====================================================
- ;; Meters
- ;;====================================================
- [bg]
- Meter=Image
- SolidColor=0,0,0,1
- X=0
- Y=0
- W=(#size# * 15)
- H=(#size# * 3)
- DynamicVariables=1
- ;MouseScrollUpAction=[!SetVariable size (#size#-1)][!UpdateMeter *][!Redraw][!WriteKeyValue Variables size #size#]
- ;MouseScrollDownAction=[!SetVariable size (#size#+1)][!UpdateMeter *][!Redraw][!WriteKeyValue Variables size #size#]
- [mainString]
- Meter=String
- MeasureName=mCondition
- MeasureName2=mTemperature
- MeasureName3=mTempUnit
- MeasureName4=mFeelsLike
- FontFace=Segoe UI
- FontColor=#text_color#
- SolidColor=00000001
- FontSize=17
- AntiAlias=1
- X=0
- Y=0
- ;Text="..."
- ToolTipText="%1, %2 %3 (Feels like %4 %3)"
- DynamicVariables=1
- StringAlign=LeftTop
- [subString]
- Meter=String
- MeasureName=mPlaceName
- MeasureName2=mTimestamp
- MeterStyle=mainString
- FontFace=Segoe UI Light
- FontSize=14
- X=0
- Y=27
- ;Text="loading..."
- ToolTipText="%1, %2"
- ;LeftMouseUpAction="https://weather.com/weather/today/l/#location#"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement