summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-12-05 11:46:46 +0100
committerJonas Smedegaard <dr@jones.dk>2014-12-06 04:05:13 +0100
commitdca2822241f171189873e0fd1a1ca0c620ac0953 (patch)
tree4cca38b0693976c4f696c613290b38abc70e0e57 /Makefile
Initial draft.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..82aaad3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+stem = eut
+source_baseurl = http://euwiki.org/
+source_basename = Ensuring_utmost_transparency_--_Free_Software_and_Open_Standards_under_the_Rules_of_Procedure_of_the_European_Parliament
+
+all: $(stem).pdf
+
+download:
+ wget -o $(stem).raw '$(source_baseurl)index.php?title=$(source_basename)&action=edit'
+
+$(stem).mediawiki: $(stem).raw
+ perl -0777 -MHTML::Entities -p \
+ -e 's|.*<textarea[^>]*>||s; s|</textarea.*||s;' \
+ -e 'decode_entities($$_);' \
+ -e 's|.*?\n= |= |s;' \
+ -e 's|<!--.*-->||s;' \
+ -e 's|\n*(</?blockquote>)\n*|\n$$1\n|g;' \
+ < $< > $@
+
+$(stem).pdf: $(stem).mediawiki template.tex
+ pandoc -f mediawiki -o $@ --toc --template=template.tex --latex-engine=xelatex $<