Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Rainmeter]
  2.  Update=1000
  3.  MiddleMouseUpAction=!Refresh #CURRENTCONFIG#
  4.  DynamicWindowSize=1
  5.  ; spaces prefix formulas in WriteKeyValue so that WKV doesn't try to parse the formula and log a syntax error
  6.  ; http://rainmeter.net/forum/viewtopic.php?f=5&t=9806&p=57507
  7.  ContextTitle="Align left"
  8.  ContextAction=[!WriteKeyValue mainString StringAlign LeftTop][!WriteKeyValue mainString X 0][!WriteKeyValue subString X " (Floor(#*size*# * 0.2))"][!Refresh #CURRENTCONFIG#]
  9.  ContextTitle2="Align center"
  10.  ContextAction2=[!WriteKeyValue mainString StringAlign CenterTop][!WriteKeyValue mainString X " (Floor(#*size*# * 7.5))"][!WriteKeyValue subString X " (Floor(#*size*# * 7.5))"][!Refresh #CURRENTCONFIG#]
  11.  ContextTitle3="Align right"
  12.  ContextAction3=[!WriteKeyValue mainString StringAlign RightTop][!WriteKeyValue mainString X " (Floor(#*size*# * 15))"][!WriteKeyValue subString X " (Floor((#*size*# * 15) - (#*size*# * 0.2)))"][!Refresh #CURRENTCONFIG#]
  13.  
  14. [Metadata]
  15.  Name=Do I Need a Jacket and/or umbrella?
  16.  Author= a redditor who doesn't know what he's doing | based off: DINAJ by Flying Hyrax, DINAJ w/ precip by LightUmbra
  17.  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
  18.  Version=3.5sidefork??
  19.  License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
  20.  
  21. [Variables]
  22.  
  23.  ; Weather.com location code
  24.  ; Go to weather.com and search for your location.
  25.  ; The location code is in the URL on the page for your location.
  26.  ; e.g. for Chicago:
  27.  ; https://weather.com/weather/today/l/USIL0225:1:US
  28.  ;                                     ^^^^^^^^
  29.  ; enter it as indicated under [mWeatherData]
  30.  
  31.  ; 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
  32.  unit=m
  33.  
  34.  ; temperature thresholds in C
  35.  jacket_temp=15
  36.  coat_temp=5
  37.  ; 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"
  38.  ; 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
  39.  ; 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
  40.  
  41.  ; precipitation chance limit, from this to 85% will read "might rain/snow", above 85% will change to "will rain/snow".
  42.  pcp_limit=45
  43.  
  44.  ; non-color font changes are in each meter at the bottom
  45.  text_color=255,255,255,204
  46.  
  47.  
  48. ;;====================================================
  49. ;;  Measures
  50. ;;====================================================
  51. [mWeatherData]
  52.  Measure=Plugin
  53.  Plugin=WebParser
  54. ;paste the weather code                              vvvvvvvv
  55.  URL="http://wxdata.weather.com/wxdata/weather/local/CAXX0504?cc=*&unit=m&dayf=1"
  56.  RegExp="(?siU)^(.*)$"
  57.  UpdateRate=900
  58.  ErrorString="DINAJ2: WebParser fail"
  59.  ForceReload=1
  60.  FinishAction=[!EnableMeasureGroup Weather][!UpdateMeter *][!Redraw]
  61.  
  62. [mTempUnit]
  63.  Measure=Plugin
  64.  Plugin=WebParser
  65.  Group=Weather
  66.  Disabled=1
  67.  URL=[mWeatherData]
  68.  StringIndex2=1
  69.  RegExp="<ut>(.+)<\/ut>"
  70.  
  71. [mWindUnit]
  72.  Measure=Plugin
  73.  Plugin=WebParser
  74.  Group=Weather
  75.  Disabled=1
  76.  URL=[mWeatherData]
  77.  StringIndex2=1
  78.  RegExp="<us>(.+)<\/us>"
  79.  
  80. [mTimestamp]
  81.  Measure=Plugin
  82.  Plugin=WebParser
  83.  Group=Weather
  84.  Disabled=1
  85.  Url=[mWeatherData]
  86.  StringIndex2=1
  87.  RegExp="<lsup>(.+)</lsup>"
  88.  
  89. [mPlaceName]
  90.  Measure=Plugin
  91.  Plugin=WebParser
  92.  Group=Weather
  93.  Disabled=1
  94.  Url=[mWeatherData]
  95.  StringIndex2=1
  96.  RegExp="<dnam>(.+)</dnam>"
  97.  
  98. [mTemperature]
  99.  Measure=Plugin
  100.  Plugin=WebParser
  101.  Group=Weather
  102.  Disabled=1
  103.  Url=[mWeatherData]
  104.  StringIndex2=1
  105.  RegExp=<tmp>(\d+)</tmp>
  106.  
  107. [mFeelsLike]
  108.  Measure=Plugin
  109.  Plugin=WebParser
  110.  Group=Weather
  111.  Disabled=1
  112.  Url=[mWeatherData]
  113.  StringIndex2=1
  114.  RegExp=<flik>(\d+)</flik>
  115.  
  116. [mCondition]
  117.  Measure=Plugin
  118.  Plugin=WebParser
  119.  Group=Weather
  120.  Disabled=1
  121.  Url=[mWeatherData]
  122.  StringIndex2=1
  123.  RegExp=<t>(.+)</t>
  124.  
  125. [mWindSpeed]
  126.  Measure=Plugin
  127.  Plugin=WebParser
  128.  Group=Weather
  129.  Disabled=1
  130.  Url=[mWeatherData]
  131.  StringIndex2=1
  132.  RegExp=<s>(.+)</s>
  133.  
  134. [mWindGust]
  135.  Measure=Plugin
  136.  Plugin=WebParser
  137.  Group=Weather
  138.  Disabled=1
  139.  Url=[mWeatherData]
  140.  StringIndex2=1
  141.  RegExp=<gust>(.+)</gust>
  142.  
  143.  ;The next three measures are needed to pull out the chance of precipitation
  144. [MeasurePrecip]
  145.  Measure=WebParser
  146.  UpdateRate=900
  147.  Url=[mWeatherData]
  148.  RegExp=(?siU)<part p="d">.*<ppcp>(.*)</ppcp>.*</part>.*<part p="n">.*<ppcp>(.*)</ppcp>.*</part>
  149.  
  150. [mPrecipD]
  151.  Measure=Plugin
  152.  Plugin=WebParser
  153.  Url=[MeasurePrecip]
  154.  StringIndex=1
  155.  
  156. [mPrecipN]
  157.  Measure=Plugin
  158.  Plugin=WebParser
  159.  Url=[MeasurePrecip]
  160.  StringIndex=2
  161.  
  162. [mStringScript]
  163.  Measure=Script
  164.  ScriptFile=dinaj.lua
  165.  Group=Weather
  166.  TempMeasureName=mFeelsLike
  167.  WindMeasureName=mWindSpeed
  168.  PcpDMeasureName=mPrecipD
  169.  PcpNMeasureName=mPrecipN
  170.  FirstString=mainString
  171.  SecondString=subString
  172.  Unit=#unit#
  173.  JacketThreshold=#jacket_temp#
  174.  CoatThreshold=#coat_temp#
  175.  PcpThreshold=#pcp_limit#
  176.  Disabled=1
  177.  
  178. ;;====================================================
  179. ;;  Meters
  180. ;;====================================================
  181.  
  182. [bg]
  183.  Meter=Image
  184.  SolidColor=0,0,0,1
  185.  X=0
  186.  Y=0
  187.  W=(#size# * 15)
  188.  H=(#size# * 3)
  189.  DynamicVariables=1
  190.  ;MouseScrollUpAction=[!SetVariable size (#size#-1)][!UpdateMeter *][!Redraw][!WriteKeyValue Variables size #size#]
  191.  ;MouseScrollDownAction=[!SetVariable size (#size#+1)][!UpdateMeter *][!Redraw][!WriteKeyValue Variables size #size#]
  192.  
  193. [mainString]
  194.  Meter=String
  195.  MeasureName=mCondition
  196.  MeasureName2=mTemperature
  197.  MeasureName3=mTempUnit
  198.  MeasureName4=mFeelsLike
  199.  FontFace=Segoe UI
  200.  FontColor=#text_color#
  201.  SolidColor=00000001
  202.  FontSize=17
  203.  AntiAlias=1
  204.  X=0
  205.  Y=0
  206. ;Text="..."
  207.  ToolTipText="%1, %2 %3 (Feels like %4 %3)"
  208.  DynamicVariables=1
  209.  StringAlign=LeftTop
  210.  
  211. [subString]
  212.  Meter=String
  213.  MeasureName=mPlaceName
  214.  MeasureName2=mTimestamp
  215.  MeterStyle=mainString
  216.  FontFace=Segoe UI Light
  217.  FontSize=14
  218.  X=0
  219.  Y=27
  220.  ;Text="loading..."
  221.  ToolTipText="%1, %2"
  222.  ;LeftMouseUpAction="https://weather.com/weather/today/l/#location#"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement