blob: 8d9cda1aa210b9ae96bd71d2261dc00eb405f123 (
plain)
- 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
- # work around in mediawiki bug parsing blockquote tags on same line
- re_blockquote = s|\n*(</?blockquote>)\n*|\n$$1\n|g
- 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 '$(re_blockquote);' \
- < $< > $@
- $(stem).pdf: $(stem).mediawiki template.tex
- pandoc -f mediawiki --template=template.tex --latex-engine=xelatex \
- --toc \
- -V papersize=a4paper -V fontsize=11pt \
- -V documentclass=memoir -V chapterstyle=demo3 \
- -V classoption=oneside -V classoption=titlepage -V classoption=twocolumn \
- -V lang=english -V langoption=variant=british \
- -V title="Ensuring utmost transparency" \
- -V subtitle="Free Software and Open Standards under the Rules of Procedure of the European Parliament" \
- -V author="Carlo Piana" -V author="Ulf Öberg" \
- -V date="" \
- -o $@ $<
|