mirror of
https://github.com/brmlab/povoden.git
synced 2025-06-09 10:45:16 +02:00
nicer Makefile
This commit is contained in:
parent
5056ea52ed
commit
d9e08dfb81
1 changed files with 13 additions and 5 deletions
18
Makefile
18
Makefile
|
@ -1,16 +1,24 @@
|
||||||
HAML=haml
|
HAML=haml
|
||||||
XMLLINT=xmllint
|
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]
|
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
|
all: index.html doprava.html
|
||||||
|
|
||||||
refresh:
|
refresh:
|
||||||
wget 'http://hydro.chmi.cz/hpps/tmp/img/big/307225_H.png' -O data/stav.png
|
wget '$(IMGURL1)' -O data/stav.png
|
||||||
wget 'http://hydro.chmi.cz/hpps/tmp/img/big/307225_Q.png' -O data/prutok.png
|
wget '$(IMGURL2)' -O data/prutok.png
|
||||||
$(XMLLINT) --html --encode utf8 http://hydro.chmi.cz/hpps/popup_hpps_prfdyn.php?seq=307225 --output data/307225.html
|
wget '$(DATAURL)' -O - | $(XMLLINT) --html --encode utf8 - | $(XMLLINT) --html --xpath '$(DATAPATH)' - > data/table.html
|
||||||
$(XMLLINT) --html --xpath '$(DATAPATH)' data/307225.html > data/table.html
|
|
||||||
|
|
||||||
|
|
||||||
%.html: %.haml
|
%.html: %.haml
|
||||||
$(HAML) $< $@
|
$(HAML) $< $@
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue