From cb14ec669143ee9dc9e9dd5c191bdaa68dc0594f Mon Sep 17 00:00:00 2001 From: HamletDuFromage <61667930+HamletDuFromage@users.noreply.github.com> Date: Fri, 11 Apr 2025 01:21:46 +0200 Subject: [PATCH] cause everytime we touch, I feel the power --- database_builder.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/database_builder.py b/database_builder.py index 1ddb898f..47d4c139 100644 --- a/database_builder.py +++ b/database_builder.py @@ -113,20 +113,24 @@ class ArchiveWorker(): attribution_file.write(content) else: cheats = "" - for cheat, content in value.items(): + for _, content in value.items(): cheats += content if cheats: with open(tid_path.joinpath(f"{key}.txt"), "w") as bid_file: bid_file.write(cheats) - def create_archives(self, out_path, quantifier=""): + def touch_all(self, path): + for path in path.rglob("*"): + if path.is_file(): + path.touch() + + def create_archives(self, out_path): out_path = Path(out_path) titles_path = out_path.joinpath("titles") - if quantifier: - quantifier = f"({quantifier})" + self.touch_all(titles_path) shutil.make_archive(str(titles_path.resolve()), "zip", root_dir=out_path, base_dir="titles") - titles_path contents_path = titles_path.rename(titles_path.parent.joinpath("contents")) + self.touch_all(contents_path) shutil.make_archive(str(contents_path.resolve()), "zip", root_dir=out_path, base_dir="contents") def create_version_file(self, out_path="."):