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 -$(stem).raw '$(source_baseurl)index.php?title=$(source_basename)&action=edit'
  7. $(stem).mediawiki: $(stem).raw
  8.     perl -0777 -MHTML::Entities -p \
  9.     -'s|.*<textarea[^>]*>||s; s|</textarea.*||s;' \
  10.     -'decode_entities($$_);' \
  11.     -'s|.*?\n= |= |s;' \
  12.     -'s|<!--.*-->||s;' \
  13.     -'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.     -$$<