summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4ae10097968a5e0e6187b8dc5ffcbad5141c4c49 (plain)
  1. stem = eut
  2. source_baseurl = http://euwiki.org/
  3. source_basename = Ensuring_utmost_transparency_--_Free_Software_and_Open_Standards_under_the_Rules_of_Procedure_of_the_European_Parliament
  4. all: $(stem).pdf
  5. download:
  6. wget -o $(stem).raw '$(source_baseurl)index.php?title=$(source_basename)&action=edit'
  7. $(stem).mediawiki: $(stem).raw
  8. perl -0777 -MHTML::Entities -p \
  9. -e 's|.*<textarea[^>]*>||s; s|</textarea.*||s;' \
  10. -e 'decode_entities($$_);' \
  11. -e 's|.*?\n= |= |s;' \
  12. -e 's|<!--.*-->||s;' \
  13. -e 's|\n*(</?blockquote>)\n*|\n$$1\n|g;' \
  14. < $< > $@
  15. $(stem).pdf: $(stem).mediawiki template.tex
  16. pandoc -f mediawiki --template=template.tex --latex-engine=xelatex \
  17. --toc \
  18. -V papersize=a4paper -V fontsize=11pt \
  19. -V documentclass=memoir -V chapterstyle=demo3 \
  20. -V classoption=oneside -V classoption=titlepage -V classoption=twocolumn \
  21. -V lang=english -V langoption=variant=british \
  22. -V title="Ensuring utmost transparency" \
  23. -V subtitle="Free Software and Open Standards under the Rules of Procedure of the European Parliament" \
  24. -V author="Carlo Piana" -V author="Ulf Öberg" \
  25. -V date="" \
  26. -o $@ $<