diff options
| author | alex <alex@pdp7.net> | 2021-03-15 12:07:27 +0000 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2021-03-15 12:07:27 +0000 |
| commit | 9a091cb2ff2b83f45aefdcf754dce14c9bc284e2 (patch) | |
| tree | df2297622df75aa22c2e198476145d20ac3dbdc4 /build.py | |
| parent | 01ab47968c0b620f8012c0d2dc969f5788c0d581 (diff) | |
Add robots.txt to prevent scraping of full Geminispace
Diffstat (limited to 'build.py')
| -rwxr-xr-x | build.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -108,6 +108,10 @@ def build(): posts = load_posts() create_index(sorted(posts, key=lambda p: p.posted, reverse=True)) create_individual_posts(posts) + for directory, _, files in os.walk("static/gmi"): + new_dir = directory.replace("static/gmi", "build/gmi") + for file in files: + shutil.copy(f"{directory}/{file}", f"{new_dir}/{file}") if __name__ == "__main__": build() |
