mirror of
https://github.com/brmlab/povoden.git
synced 2025-06-07 17:54:10 +02:00
autoupdate legend
This commit is contained in:
parent
cf7a2c0207
commit
6aba6fef70
6 changed files with 5 additions and 95 deletions
4
Makefile
4
Makefile
|
@ -12,6 +12,7 @@ VODAIMG1=http://hydro.chmi.cz/hpps/tmp/img/big/$(STATION)_H.png
|
|||
VODAIMG2=http://hydro.chmi.cz/hpps/tmp/img/big/$(STATION)_Q.png
|
||||
VODATMP=/tmp/voda.html
|
||||
VODAXPATH=//table[@class="stdstationtbl"]/./tr[3]//table/tr[position()>1]
|
||||
VODALEGENDXPATH=//table[@class="stdstationtbl"]/./tr[2]/td/table/./tr[1]/td/table/./tr
|
||||
VODANAMESXPATH=//table[@class="stdstationtbl"]/./tr[1]//table/./tr[2]/td/text()
|
||||
|
||||
# option #2
|
||||
|
@ -32,8 +33,9 @@ wget '$(VODAIMG1)' -O data/stav_$(STATION).png_; \
|
|||
wget '$(VODAIMG2)' -O data/prutok_$(STATION).png_; \
|
||||
wget '$(VODAURL)' -O - | $(XMLLINT) --encode utf8 - > $(VODATMP); \
|
||||
$(XMLLINT) --xpath '$(VODAXPATH)' $(VODATMP) > data/table_$(STATION).html_; \
|
||||
$(XMLLINT) --xpath '$(VODALEGENDXPATH)' $(VODATMP) > data/legend_$(STATION).html_; \
|
||||
$(XMLLINT) --xpath '$(VODANAMESXPATH)' $(VODATMP) > data/name_$(STATION).html_; \
|
||||
$(foreach FILE,stav_$(STATION).png prutok_$(STATION).png table_$(STATION).html name_$(STATION).html,mv -v data/$(FILE)_ data/$(FILE);) \
|
||||
$(foreach FILE,stav_$(STATION).png prutok_$(STATION).png table_$(STATION).html name_$(STATION).html legend_$(STATION).html,mv -v data/$(FILE)_ data/$(FILE);) \
|
||||
rm $(VODATMP);
|
||||
|
||||
all: index.html doprava.html pomoc.html kontakty.html
|
||||
|
|
1
data/.gitignore
vendored
1
data/.gitignore
vendored
|
@ -4,3 +4,4 @@ prutok*.png
|
|||
stav*.png
|
||||
table*.html
|
||||
name*.html
|
||||
legend*.html
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<tr>
|
||||
<th colspan="4">Limity pro stupně povodňové aktivity</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1. stupeň</th>
|
||||
<td><strong>Q</strong> = 450 [m<sup>3</sup>s<sup>-1</sup>]</td>
|
||||
<td><img src="img/spa1.png" align="middle" alt="/"></td>
|
||||
<td>1.SPA (bdělost)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2. stupeň</th>
|
||||
<td><strong>Q</strong> = 1000 [m<sup>3</sup>s<sup>-1</sup>]</td>
|
||||
<td><img src="img/spa2.png" align="middle" alt="/"></td>
|
||||
<td>2.SPA (pohotovost)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3. stupeň</th>
|
||||
<td><strong>Q</strong> = 1500 [m<sup>3</sup>s<sup>-1</sup>]</td>
|
||||
<td><img src="img/spa3.png" align="middle" alt="/"></td>
|
||||
<td>3.SPA (ohrožení)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3. stupeň</th>
|
||||
<td><strong>Q</strong> = 3440 [m<sup>3</sup>s<sup>-1</sup>]</td>
|
||||
<td><img src="img/spa4.png" align="middle" alt="/"></td>
|
||||
<td>3.SPA (extrémní povodeň)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>sucho</th>
|
||||
<td><strong>Q</strong> = 27.9 [m<sup>3</sup>s<sup>-1</sup>]</td>
|
||||
<td><img src="img/sucho.png" align="middle" alt="/"></td>
|
||||
<td></td>
|
||||
</tr>
|
|
@ -1,27 +0,0 @@
|
|||
<tr>
|
||||
<th colspan="4">Limity pro stupně povodňové aktivity</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1. stupeň</th>
|
||||
<td><strong>H</strong> = 400 [cm]</td>
|
||||
<td><img src="img/spa1.png" align="middle" alt="/"></td>
|
||||
<td>1.SPA (bdělost)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2. stupeň</th>
|
||||
<td><strong>H</strong> = 500 [cm]</td>
|
||||
<td><img src="img/spa2.png" align="middle" alt="/"></td>
|
||||
<td>2.SPA (pohotovost)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3. stupeň</th>
|
||||
<td><strong>H</strong> = 550 [cm]</td>
|
||||
<td><img src="img/spa3.png" align="middle" alt="/"></td>
|
||||
<td>3.SPA (ohrožení)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3. stupeň</th>
|
||||
<td><strong>H</strong> = 855 [cm]</td>
|
||||
<td><img src="img/spa4.png" align="middle" alt="/"></td>
|
||||
<td>3.SPA (extrémní povodeň)</td>
|
||||
</tr>
|
|
@ -1,33 +0,0 @@
|
|||
<tr>
|
||||
<th colspan="4">Limity pro stupně povodňové aktivity</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1. stupeň</th>
|
||||
<td><strong>H</strong> = 450 [cm]</td>
|
||||
<td><img src="img/spa1.png" align="middle" alt="/"></td>
|
||||
<td>1.SPA (bdělost)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2. stupeň</th>
|
||||
<td><strong>H</strong> = 530 [cm]</td>
|
||||
<td><img src="img/spa2.png" align="middle" alt="/"></td>
|
||||
<td>2.SPA (pohotovost)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3. stupeň</th>
|
||||
<td><strong>H</strong> = 600 [cm]</td>
|
||||
<td><img src="img/spa3.png" align="middle" alt="/"></td>
|
||||
<td>3.SPA (ohrožení)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3. stupeň</th>
|
||||
<td><strong>H</strong> = 1082 [cm]</td>
|
||||
<td><img src="img/spa4.png" align="middle" alt="/"></td>
|
||||
<td>3.SPA (extrémní povodeň)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>sucho</th>
|
||||
<td><strong>H</strong> = 116 [cm]</td>
|
||||
<td><img src="img/sucho.png" align="middle" alt="/"></td>
|
||||
<td></td>
|
||||
</tr>
|
|
@ -36,7 +36,7 @@
|
|||
%img(src="data/prutok_#{station}.png")
|
||||
%td(style="padding: 16px;")
|
||||
%table#legend24h(style="margin: 16px;")
|
||||
=File.read("data/legend.html")
|
||||
=File.read("data/legend_#{station}.html")
|
||||
%table#table24h
|
||||
%tr
|
||||
%th datum a čas
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue