From b3555241f00230e1055133ef85adca105c5a3ded Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 24 Feb 2014 17:05:50 +0100 Subject: Fix tidy html rendering to validate and not rely on server charset hinting. --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc6cfff..7e9d11a 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,14 @@ $(rdfxmlfiles): %.rdf : %.ttl $(eval base = $(call getbase, $<)) rapper $(base:%=-I "%") -i turtle -o rdfxml-abbrev "$<" > "$@" +# Fetch and tidy programme rendering +# * add doctype and title to validate +# * add charset to not rely on server hinting +# * refer to plaintext serialization (not self) of dataset $(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,/index.txt,' "$@" + perl -pi -0 \ + -e 's,^(.*?]*>)(.*?)(?=),\n\n$$2$$1$$2,ms;' \ + -e 's,$(base)\K,/index.txt,;' \ + "$@" -- cgit v1.2.3