mirror of
https://github.com/brmlab/povoden.git
synced 2025-06-08 10:14:20 +02:00
refreshing DPP
This commit is contained in:
parent
58bc29aa1f
commit
d1a061656c
1 changed files with 11 additions and 0 deletions
11
Makefile
11
Makefile
|
@ -13,6 +13,11 @@ DATAPATH=//table[@class="stdstationtbl"]/./tr[3]//table/tr[position()>1]
|
|||
#IMGURL2=http://vvv.chmi.cz/hydro/graph/big/307225_Q.png
|
||||
#DATAPATH=//table[2]//tr[3]/td//table//tr[position()>1]
|
||||
|
||||
DOPRAVAURL=http://www.dpp.cz/povodne-aktualni-doprava/
|
||||
DOPRAVATMP=/tmp/doprava.html
|
||||
DOPRAVAXPATH1=string(//div[@id="content-container"]/div[@id="pole"]/div/div[2]//a[text()="zde"]/@href)
|
||||
DOPRAVAXPATH2=//div[@id="content-container"]/div[@id="pole"]/div/div[2]//*[@class="img-c img-envelope"]/../preceding-sibling::*
|
||||
|
||||
all: index.html doprava.html pomoc.html
|
||||
|
||||
refresh:
|
||||
|
@ -20,6 +25,12 @@ refresh:
|
|||
wget '$(IMGURL2)' -O data/prutok.png
|
||||
wget '$(DATAURL)' -O - | $(XMLLINT) --html --encode utf8 - | $(XMLLINT) --html --xpath '$(DATAPATH)' - > data/table.html
|
||||
|
||||
refreshdpp:
|
||||
wget http://www.dpp.cz/povodne-aktualni-doprava/ -O - | xmllint --html --encode utf8 - > $(DOPRAVATMP)
|
||||
wget `xmllint --html --xpath '$(DOPRAVAXPATH1)' $(DOPRAVATMP)` -O - | convert - data/doprava.png
|
||||
xmllint --html --xpath '$(DOPRAVAXPATH2)' $(DOPRAVATMP) > data/doprava.html
|
||||
rm $(DOPRAVATMP)
|
||||
|
||||
%.html: %.haml
|
||||
$(HAML) $< $@
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue