|
|
@ -33,8 +33,8 @@ md_extensions = ['fenced_code', 'codehilite', 'nl2br', 'toc', 'smarty', 'tables' |
|
|
|
def print_file(in_file, out_file): |
|
|
|
print('%-62s -> %s' % (in_file, out_file)) |
|
|
|
|
|
|
|
os.makedirs(output_directory, exist_ok=True) |
|
|
|
|
|
|
|
def copy_static_files(): |
|
|
|
for (dirpath, _, filenames) in os.walk(static_directory): |
|
|
|
for filename in filenames: |
|
|
|
source = os.path.join(dirpath, filename) |
|
|
@ -47,6 +47,7 @@ for (dirpath, _, filenames) in os.walk(static_directory): |
|
|
|
shutil.copy2(source, dest) |
|
|
|
|
|
|
|
|
|
|
|
def process_markdown_files(): |
|
|
|
template = open('template.html').read() |
|
|
|
for (dirpath, _, filenames) in os.walk(input_directory): |
|
|
|
for filename in filenames: |
|
|
@ -106,6 +107,9 @@ def make_rss(): # TODO: implement. |
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
os.makedirs(output_directory, exist_ok=True) |
|
|
|
copy_static_files() |
|
|
|
process_markdown_files() |
|
|
|
make_sitemap() |
|
|
|
make_rss() |
|
|
|
|
|
|
|