From 767ce79b229cf972be29d1f276513ce3c585ca93 Mon Sep 17 00:00:00 2001 From: Florian Pineau Date: Tue, 2 Sep 2025 10:55:10 +0200 Subject: [PATCH] FEAT: ajoute des balises `if True:` pour personnaliser le code --- populate_args_with_all_project_folders.py | 43 +++++++++++++---------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/populate_args_with_all_project_folders.py b/populate_args_with_all_project_folders.py index 69680d4..c81cd1f 100644 --- a/populate_args_with_all_project_folders.py +++ b/populate_args_with_all_project_folders.py @@ -5,40 +5,45 @@ import json folders_list = [] ### CLIPS -root_path = os.path.join("G:\\_PRO\\CLIPS") -folders_list += [ f.path for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] -folders_list += [ f.path for f in os.scandir( - os.path.join(root_path, "_ARCHIVES (EXPORTS SEULS)") - ) if f.is_dir()] +if True: + root_path = os.path.join("G:\\_PRO\\CLIPS") + folders_list += [ f.path for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] + folders_list += [ f.path for f in os.scandir( + os.path.join(root_path, "_ARCHIVES (EXPORTS SEULS)") + ) if f.is_dir()] ### COMMERCIAL -root_path = os.path.join("G:\\_PRO\\COMMERCIAL") -prods = [ f.name for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] +if True: + root_path = os.path.join("G:\\_PRO\\COMMERCIAL") + prods = [ f.name for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] -for prod_name in prods: - folders_list += [f.path for f in os.scandir(os.path.join(root_path, prod_name)) if f.is_dir()] + for prod_name in prods: + folders_list += [f.path for f in os.scandir(os.path.join(root_path, prod_name)) if f.is_dir()] ### DOCU -root_path = os.path.join("G:\\_PRO\\DOCU") -prods = [ f.name for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] +if True: + root_path = os.path.join("G:\\_PRO\\DOCU") + prods = [ f.name for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] -for prod_name in prods: - folders_list += [f.path for f in os.scandir(os.path.join(root_path, prod_name)) if f.is_dir()] + for prod_name in prods: + folders_list += [f.path for f in os.scandir(os.path.join(root_path, prod_name)) if f.is_dir()] ### FICTIONS -root_path = os.path.join("G:\\_PRO\\FICTIONS") -prods = [ f.name for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] +if True: + root_path = os.path.join("G:\\_PRO\\FICTIONS") + prods = [ f.name for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] -for prod_name in prods: - folders_list += [f.path for f in os.scandir(os.path.join(root_path, prod_name)) if f.is_dir()] + for prod_name in prods: + folders_list += [f.path for f in os.scandir(os.path.join(root_path, prod_name)) if f.is_dir()] ### WEB -root_path = os.path.join("G:\\_PRO\\WEB") -folders_list += [ f.path for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] +if True: + root_path = os.path.join("G:\\_PRO\\WEB") + folders_list += [ f.path for f in os.scandir(root_path) if f.is_dir() and not f.name.startswith('_')] # Write args.json