make.py (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from markdown2 import markdown_path from glob import glob import os # constants PAGES_PATH = 'pages/' BUILD_PATH = 'build/' for filename in os.listdir(PAGES_PATH): html = markdown_path(PAGES_PATH + filename) with open(BUILD_PATH + filename + '.html', 'w') as f: f.write(html) |