import os, shutil, pypandoc with open("header.html", "r") as top, open("footer.html", "r") as bottom: header = top.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")