Merge branch 'master' of github.com:brmlab/povoden

Conflicts:
	Makefile
This commit is contained in:
Peter Boráros 2013-06-04 02:02:44 +02:00
commit 6d899064de
9 changed files with 254 additions and 147 deletions

View file

@ -1,5 +1,5 @@
HAML=haml
XMLLINT=xmllint
XMLLINT=xmllint --html --nowarning
# option #1
DATAURL=http://hydro.chmi.cz/hpps/popup_hpps_prfdyn.php?seq=307225
@ -18,17 +18,17 @@ 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
all: index.html doprava.html pomoc.html kontakty.html
refresh:
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
wget '$(DATAURL)' -O - | $(XMLLINT) --encode utf8 - | $(XMLLINT) --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
wget http://www.dpp.cz/povodne-aktualni-doprava/ -O - | $(XMLLINT) --encode utf8 - > $(DOPRAVATMP)
wget $$($(XMLLINT) --html --xpath '$(DOPRAVAXPATH1)' $(DOPRAVATMP)) -O - | convert - data/doprava.png
$(XMLLINT) --xpath '$(DOPRAVAXPATH2)' $(DOPRAVATMP) > data/doprava.html
rm $(DOPRAVATMP)
%.html: %.haml