summaryrefslogtreecommitdiff
path: root/generate.py
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicksphere.ch>2022-05-22 00:00:00 +0000
committerNicholas Johnson <nick@nicksphere.ch>2022-05-22 00:00:00 +0000
commit44ef9882132619ead1f888778804893d848b7686a4833e038b67b263165eb933 (patch)
tree99c58e3193f519788caa52dbf74deb8e149c092aac66013f14507deb254dd93e /generate.py
parent6e95983760cbdfe5049cd5b711383aa884c654968888d902e81b24207518d68b (diff)
downloadjournal-44ef9882132619ead1f888778804893d848b7686a4833e038b67b263165eb933.tar.gz
journal-44ef9882132619ead1f888778804893d848b7686a4833e038b67b263165eb933.zip
New entry: anybody-can-solve-a-rubiks-cube-blindfolded
Diffstat (limited to 'generate.py')
-rw-r--r--generate.py8
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)