mirror of
https://github.com/brmlab/povoden.git
synced 2025-06-08 10:14:20 +02:00
Merge branch 'xmllint'
This commit is contained in:
commit
2eec25ba85
2 changed files with 16 additions and 4 deletions
19
Makefile
19
Makefile
|
@ -1,11 +1,24 @@
|
|||
HAML=haml
|
||||
XMLLINT=xmllint
|
||||
|
||||
# option #!
|
||||
DATAURL=http://hydro.chmi.cz/hpps/popup_hpps_prfdyn.php?seq=307225A
|
||||
IMGURL1=http://hydro.chmi.cz/hpps/tmp/img/big/307225_H.png
|
||||
IMGURL2=http://hydro.chmi.cz/hpps/tmp/img/big/307225_Q.png
|
||||
DATAPATH=//table[@class="stdstationtbl"]/./tr[3]//table/tr[position()>1]
|
||||
|
||||
# oprion #2
|
||||
#DATAURL=http://vvv.chmi.cz/hydro/detail_stanice/307225.html
|
||||
#IMGURL1=http://vvv.chmi.cz/hydro/graph/big/307225_H.png
|
||||
#IMGURL2=http://vvv.chmi.cz/hydro/graph/big/307225_Q.png
|
||||
#DATAPATH=//table[2]//tr[3]/td//table//tr[position()>1]
|
||||
|
||||
all: index.html doprava.html pomoc.html
|
||||
|
||||
refresh:
|
||||
curl 'http://hydro.chmi.cz/hpps/popup_hpps_prfdyn.php?seq=307225' | sed -n '154,333 p' > data/table.html
|
||||
wget 'http://hydro.chmi.cz/hpps/tmp/img/big/307225_H.png' -O data/stav.png
|
||||
wget 'http://hydro.chmi.cz/hpps/tmp/img/big/307225_Q.png' -O data/prutok.png
|
||||
wget '$(IMGURL1)' -O data/stav.png
|
||||
wget '$(IMGURL2)' -O data/prutok.png
|
||||
wget '$(DATAURL)' -O - | $(XMLLINT) --html --encode utf8 - | $(XMLLINT) --html --xpath '$(DATAPATH)' - > data/table.html
|
||||
|
||||
%.html: %.haml
|
||||
$(HAML) $< $@
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
%li <a href='pomoc.html'>Nabídky pomoci</a>
|
||||
|
||||
.content
|
||||
|
||||
%table.twocolumn
|
||||
%tr
|
||||
%td(style="padding: 16px;")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue