diff --git a/markdown.py b/build.py similarity index 56% rename from markdown.py rename to build.py index 8e94108..0c15314 100644 --- a/markdown.py +++ b/build.py @@ -1,11 +1,15 @@ -with open("header.html", "r") as top, open("footer.html", "r") as bottom, open( - "resume.html", "r" -) as middle: +import os, shutil, pypandoc + +with open("header.html", "r") as top, open("footer.html", "r") as bottom: header = top.read() - content = middle.read() footer = bottom.read() +content = pypandoc.convert_file("resume.md", "html") with open("index.html", "w+") as index: index.write(header) index.write(content) index.write(footer) + +os.mkdir("site") +shutil.move("index.html", "site") +shutil.copy("style.css", "site")