diff options
Diffstat (limited to 'generate.py')
-rw-r--r-- | generate.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generate.py b/generate.py index d5c7fb6..dec0c6a 100644 --- a/generate.py +++ b/generate.py @@ -27,9 +27,9 @@ if __name__ == '__main__': gemini_output_dir = os.path.join(root_dir, "capsule") html_output_dir = os.path.join(root_dir, "website") - # detect static files + # detect static Gemini files os.chdir(os.path.join(root_dir, "static")) - static_files = [os.path.join(root, name) for root, dirs, files in os.walk(".") for name in files] + static_gemini_files = [os.path.join(root, name) for root, dirs, files in os.walk(".") for name in files if name.endswith(".gmi")] # delete output directories shutil.rmtree(output_dir, ignore_errors=True) @@ -50,12 +50,12 @@ if __name__ == '__main__': os.remove("sitemap.xml") shutil.move(os.path.join("gemini_atom", "atom.xml"), "atom.xml") os.rmdir("gemini_atom") - for file in static_files: + for file in static_gemini_files: shutil.copy(os.path.join(output_dir, file), file) # generate HTML output directory shutil.copytree(output_dir, html_output_dir, ignore=shutil.ignore_patterns("*.gmi", "gemini_atom")) os.chdir(html_output_dir) - for file in static_files: + for file in static_gemini_files: shutil.copy(os.path.join(output_dir, file), file) |