summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-02-24 15:57:50 +0100
committerJonas Smedegaard <dr@jones.dk>2014-02-24 15:57:50 +0100
commit11c1f537a11f6dca5b447cc7703a2628097c1473 (patch)
treee3513bc2c3075c58b6591da4c507410cc340db78
parentd8192edd54ffd34298ad1ebe5b93ce0657ef0241 (diff)
Add html rendering of programme dataset.
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4eaab0e..3b01f05 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,13 @@ infiles := $(wildcard data/*.ttl data/*/*.ttl)
turtlefiles := $(infiles:data/%.ttl=build/%/index.ttl)
textfiles = $(turtlefiles:%.ttl=%.txt)
rdfxmlfiles = $(turtlefiles:%.ttl=%.rdf)
+# TODO: resolve event:Event with prog:Programme being foaf:primaryTopic of <>
+htmlprogrammefiles = build/2014/europe/index.html
+htmlfiles = $(htmlprogrammefiles)
getbase = $(shell perl -ne '/^\@base\s+<(http.+)>/ and print $$1 and exit;' "$1")
-all: $(textfiles) $(rdfxmlfiles)
+all: $(textfiles) $(rdfxmlfiles) $(htmlfiles)
clean:
rm -rf build
@@ -23,3 +26,8 @@ $(textfiles): %.txt : %.ttl
$(rdfxmlfiles): %.rdf : %.ttl
$(eval base = $(call getbase, $<))
rapper $(base:%=-I "%") -i turtle -o rdfxml-abbrev "$<" > "$@"
+
+$(htmlprogrammefiles): %.html : %.ttl
+ $(eval base = $(call getbase, $<))
+ wget -O"$@" "http://programme.ecs.soton.ac.uk/tool.php?src=$(base)"
+ perl -pi -e 's,$(base)\K,.txt,' "$@"