Created
November 12, 2020 13:58
-
-
Save SimonSapin/33189a71392ce06349200d92f83d5852 to your computer and use it in GitHub Desktop.
This file contains 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
#!/home/simon/.virtualenvs/weasyprint/bin/python | |
import weasyprint | |
import markdown | |
import os | |
here = os.path.dirname(__file__) | |
with open(os.path.join(here, "resume.md"), encoding="utf-8") as f: | |
html = markdown.markdown(f.read(), extensions=["def_list"]) | |
doc = weasyprint.HTML(string=html) | |
doc.write_pdf(os.path.join(here, "Simon Sapin.pdf")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment