Skip to content

Instantly share code, notes, and snippets.

@jacebrowning
Last active December 20, 2015 12:08
Show Gist options
  • Save jacebrowning/6128140 to your computer and use it in GitHub Desktop.
Save jacebrowning/6128140 to your computer and use it in GitHub Desktop.
Generates a PDF from a Google Drive Document using html2text and LaTeX
ID = 123456789abcdef
NAME = MyDocument
.PHONY: pdf tex download all clean
pdf: $(NAME).pdf
$(NAME).pdf: $(NAME).tex *.bib
pdflatex $(NAME)
bibtex $(NAME)
pdflatex $(NAME)
pdflatex $(NAME)
rm $(NAME).log $(NAME).blg $(NAME).bbl $(NAME).aux
tex $(NAME).tex:
html2text --google-doc https://docs.google.com/document/d/$(ID)/pub?embedded=true > $(NAME).tex
all: tex pdf
clean:
rm $(NAME).tex $(NAME).pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment