summaryrefslogtreecommitdiff
path: root/Makefile
blob: 43aed8055b14313d2971155e3db5633593845769 (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 title="Ensuring utmost transparency" \
  19. -V author="Carlo Piana" -V author="Ulf Öberg" \
  20. -V date="" \
  21. -o $@ $<