summaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'build.py')
-rwxr-xr-xbuild.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/build.py b/build.py
new file mode 100755
index 00000000..97f55c04
--- /dev/null
+++ b/build.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+import os
+import shutil
+
+
+def build():
+ shutil.rmtree("build", ignore_errors=True)
+ os.makedirs("build/gmi")
+
+ for directory, _, files in os.walk("content"):
+ for file in files:
+ if file.endswith("gmi"):
+ new_dir = f"build/gmi/{directory[8:]}"
+ os.makedirs(new_dir, exist_ok=True)
+ shutil.copyfile(f"{directory}/{file}", f"{new_dir}/{file}")
+ else:
+ # FIXME
+ pass
+
+
+if __name__ == "__main__":
+ build()