From 6222ba5dac352c7a0ed96b93f0243c28ec8c7a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Tue, 3 Mar 2026 18:23:01 +0100 Subject: [PATCH] Support BGnot in giving_names --- giving_names.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/giving_names.py b/giving_names.py index 3cdbf68..9b5969e 100644 --- a/giving_names.py +++ b/giving_names.py @@ -5,11 +5,12 @@ import re from collections import defaultdict def main(): - if len(sys.argv) < 2: - print("Usage: python giving_names.py ") + if len(sys.argv) < 3: + print("Usage: python giving_names.py ") sys.exit(1) work_dir = os.path.abspath(sys.argv[1]) + bnot_dir = os.path.abspath(sys.argv[2]) target_subdir = os.path.join(work_dir, "A Rendre") os.makedirs(target_subdir, exist_ok=True) @@ -42,7 +43,7 @@ def main(): safe_name = re.sub(r'[<>:"/\\|?*]', '', name).strip() for copie_id in ids: - path_b = os.path.join(work_dir, f"Bnot/Copie{copie_id}") + path_b = os.path.join(work_dir, f"{bnot_dir}/Copie{copie_id}") path_a = os.path.join(work_dir, f"Anot/Copie{copie_id}") # Determine source: must contain both files @@ -58,7 +59,7 @@ def main(): source_folder = path_a if not source_folder: - print(f"Skipping ID {copie_id}: Files missing in both Anot and Bnot.") + print(f"Skipping ID {copie_id}: Files missing in both Anot and {bnot_dir}.") continue # Create destination directory