diff --git a/Makefile b/Makefile index ab71dca..c8845b1 100644 --- a/Makefile +++ b/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) $< $@ diff --git a/index.haml b/index.haml index f4ae2f2..47b5f10 100644 --- a/index.haml +++ b/index.haml @@ -14,7 +14,6 @@ %li Nabídky pomoci .content - %table.twocolumn %tr %td(style="padding: 16px;")