|
|
@ -20,6 +20,7 @@ env = Environment( |
|
|
|
|
|
|
|
|
|
|
|
# walk the source directory and make all the corresponding files into finalized |
|
|
|
# walk the source directory and make all the corresponding files into finalized |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# article template is used for all .article.html files |
|
|
|
article_template = env.get_template("articles/article.template.html") |
|
|
|
article_template = env.get_template("articles/article.template.html") |
|
|
|
|
|
|
|
|
|
|
|
for path_to_source in source.glob("**/*"): |
|
|
|
for path_to_source in source.glob("**/*"): |
|
|
@ -35,6 +36,8 @@ for path_to_source in source.glob("**/*"): |
|
|
|
pass |
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
elif ".article.html" in str(path_to_source): |
|
|
|
elif ".article.html" in str(path_to_source): |
|
|
|
|
|
|
|
# all .article.html files are transformed into a folder of the same name and then rendered with the template at index.html |
|
|
|
|
|
|
|
|
|
|
|
folder_name = path_to_output.parent / path_to_output.name.replace(".article.html","") |
|
|
|
folder_name = path_to_output.parent / path_to_output.name.replace(".article.html","") |
|
|
|
os.makedirs(folder_name, exist_ok=True) # make the folder /var/www/shoofle.net/articles/circle_script |
|
|
|
os.makedirs(folder_name, exist_ok=True) # make the folder /var/www/shoofle.net/articles/circle_script |
|
|
|
|
|
|
|
|
|
|
|