Last active
February 26, 2022 14:16
-
-
Save noandrea/1082b6649d526d301980b97365691b1c to your computer and use it in GitHub Desktop.
Makefile for Hackmd 2 PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AU_HACKMD_CODE = bfScafhcTdGzzhJ4B3evlQ | |
AU_OUTFILE = $(HOME)/$(AU_HACKMD_CODE).MD.$(shell date +%F).pdf | |
AU_FORMAT = article | |
hackmd2pdf: | |
@echo format doc | |
curl -s -L "https://hackmd.io/$(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