Skip to content

Instantly share code, notes, and snippets.

Last active May 2, 2020
What would you like to do?
Makefile for Hackmd 2 PDF
AU_HACKMD_CODE = bfScafhcTdGzzhJ4B3evlQ
AU_OUTFILE = $(HOME)/$(AU_HACKMD_CODE).MD.$(shell date +%F).pdf
AU_FORMAT = article
@echo format doc
curl -s -L "$(AU_HACKMD_CODE)/download" \
-o /tmp/$(AU_HACKMD_CODE).md
pandoc /tmp/$(AU_HACKMD_CODE).md -o $(AU_OUTFILE) \
--table-of-contents \
--pdf-engine=xelatex \
--highlight-style=monochrome \
--number-sections \
-V 'fontsize: 12pt' \
-V 'papersize: A4' \
-V 'urlcolor: blue' \
-V 'date: \today{}' \
-V 'documentclass:$(AU_FORMAT)' \
-V 'geometry:margin=3.8cm'
xdg-open $(AU_OUTFILE)
@echo done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment