mirror of
https://github.com/brmlab/povoden.git
synced 2025-06-08 18:24:00 +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
|
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
|
all: index.html doprava.html pomoc.html
|
||||||
|
|
||||||
refresh:
|
refresh:
|
||||||
curl 'http://hydro.chmi.cz/hpps/popup_hpps_prfdyn.php?seq=307225' | sed -n '154,333 p' > data/table.html
|
wget '$(IMGURL1)' -O data/stav.png
|
||||||
wget 'http://hydro.chmi.cz/hpps/tmp/img/big/307225_H.png' -O data/stav.png
|
wget '$(IMGURL2)' -O data/prutok.png
|
||||||
wget 'http://hydro.chmi.cz/hpps/tmp/img/big/307225_Q.png' -O data/prutok.png
|
wget '$(DATAURL)' -O - | $(XMLLINT) --html --encode utf8 - | $(XMLLINT) --html --xpath '$(DATAPATH)' - > data/table.html
|
||||||
|
|
||||||
%.html: %.haml
|
%.html: %.haml
|
||||||
$(HAML) $< $@
|
$(HAML) $< $@
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
%li <a href='pomoc.html'>Nabídky pomoci</a>
|
%li <a href='pomoc.html'>Nabídky pomoci</a>
|
||||||
|
|
||||||
.content
|
.content
|
||||||
|
|
||||||
%table.twocolumn
|
%table.twocolumn
|
||||||
%tr
|
%tr
|
||||||
%td(style="padding: 16px;")
|
%td(style="padding: 16px;")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue