forked from mbirth/tasker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRainWarning.prf.xml
169 lines (169 loc) · 4.84 KB
/
RainWarning.prf.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<TaskerData sr="" dvi="1" tv="4.0u1m">
<Profile sr="prof62" ve="2">
<cdate>1365112517568</cdate>
<clp>true</clp>
<edate>1365113603659</edate>
<id>62</id>
<mid0>60</mid0>
<nme>Rain Warning</nme>
<Time sr="con0">
<fh>3</fh>
<fm>0</fm>
<th>12</th>
<tm>30</tm>
</Time>
<Event sr="con1" ve="2">
<code>306</code>
</Event>
</Profile>
<Task sr="task60">
<cdate>1365078569558</cdate>
<edate>1370607047164</edate>
<id>60</id>
<nme>RainWarning</nme>
<pri>10</pri>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%WUnderKey</Str>
<Str sr="arg1" ve="3">###changeme###</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act1" ve="3">
<code>118</code>
<Str sr="arg0" ve="3">api.wunderground.com</Str>
<Str sr="arg1" ve="3">/api/%WUnderKey/forecast/lang:DL/q/%LOCN.json</Str>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Int sr="arg4" val="10"/>
<Str sr="arg5" ve="3">text/*</Str>
<Str sr="arg6" ve="3"/>
</Action>
<Action sr="act10" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%Rain_predict2</Str>
<Str sr="arg1" ve="3">km/h</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Kilometer pro Stunde</Str>
</Action>
<Action sr="act11" ve="3">
<code>559</code>
<Str sr="arg0" ve="3">Heute gibt es %Rain_mm Millimeter Regen. Tagsüber: %Rain_predict. Nachts: %Rain_predict2</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="0"/>
</Action>
<Action sr="act12" ve="3">
<code>38</code>
</Action>
<Action sr="act2" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%JSON</Str>
<Str sr="arg1" ve="3">%HTTPD</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act3" ve="3">
<code>129</code>
<Str sr="arg0" ve="3">var json_str=global('HTTPD');
var data=JSON.parse(json_str);
var today=data['forecast']['simpleforecast']['forecastday'][0];
var today_txt= data['forecast']['txt_forecast']['forecastday'][0];
var tonight_txt= data['forecast']['txt_forecast']['forecastday'][1];
setGlobal('Rain_mm', today['qpf_allday']['mm']);
setGlobal('Rain_date', today['date']['pretty']);
setGlobal('Rain_predict', today_txt['fcttext_metric']);
setGlobal('Rain_predict2', tonight_txt['fcttext_metric']);</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="10"/>
</Action>
<Action sr="act4" ve="3">
<code>37</code>
<lhs>%Rain_mm</lhs>
<op>4</op>
<rhs>0</rhs>
</Action>
<Action sr="act5" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%Rain_mm</Str>
<Str sr="arg1" ve="3">\.</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">,</Str>
</Action>
<Action sr="act6" ve="3">
<code>523</code>
<Str sr="arg0" ve="3">Heute %Rain_mm mm Regen</Str>
<Str sr="arg1" ve="3">%Rain_predict (%Rain_date)</Str>
<Img sr="arg2" ve="2">
<nme>hd_aaa_ext_rain</nme>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<ListElementItem sr="item0">
<label>TWC</label>
<Action sr="action" ve="3">
<code>20</code>
<App sr="arg0">
<appClass>com.weather.Weather.activity.WeatherController</appClass>
<appPkg>com.weather.Weather</appPkg>
<label>The Weather Channel</label>
</App>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="0"/>
</Action>
<Img sr="icon" ve="2">
<cls>com.weather.Weather.activity.WeatherController</cls>
<pkg>com.weather.Weather</pkg>
</Img>
</ListElementItem>
</Action>
<Action sr="act7" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%Rain_predict</Str>
<Str sr="arg1" ve="3">([0-9.]+)C</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">$1 Grad</Str>
</Action>
<Action sr="act8" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%Rain_predict</Str>
<Str sr="arg1" ve="3">km/h</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Kilometer pro Stunde</Str>
</Action>
<Action sr="act9" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%Rain_predict2</Str>
<Str sr="arg1" ve="3">([0-9.]+)C</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">$1 Grad</Str>
</Action>
<Img sr="icn" ve="2">
<nme>hd_aaa_ext_rain</nme>
</Img>
</Task>
</TaskerData>