From e19076efebcd6ab887969e3a2102088cf8503c17 Mon Sep 17 00:00:00 2001 From: gribse Date: Thu, 31 Oct 2024 00:53:13 +0100 Subject: [PATCH] Refactor folder creation logic and add AVP and BPE folders when creating a new project --- GestionVersion2.1.py => GestionVersion2.2.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) rename GestionVersion2.1.py => GestionVersion2.2.py (94%) diff --git a/GestionVersion2.1.py b/GestionVersion2.2.py similarity index 94% rename from GestionVersion2.1.py rename to GestionVersion2.2.py index 6235b05..daf302a 100644 --- a/GestionVersion2.1.py +++ b/GestionVersion2.2.py @@ -1,3 +1,9 @@ +# Todo: +# - Make an AVP folder in the current directory whe creating a new project +# - Make a BPE folder in the current directory whe creating a new project + + + import os import datetime @@ -75,6 +81,14 @@ def createNewProject(): with open(destination_file, 'wb') as dst_file: dst_file.write(src_file.read()) pause_debug(f"File copied to new folder: {destination_file}") + + # Create the AVP & BPE folders + avp_folder_path = os.path.join(new_folder_path, "AVP") + bpe_folder_path = os.path.join(new_folder_path, "BPE") + print(f"Creating AVP and BPE folders in {new_folder_name}") + os.makedirs(avp_folder_path, exist_ok=True) + os.makedirs(bpe_folder_path, exist_ok=True) + pause_debug(f"AVP and BPE folders created in {new_folder_name}") def createNewAVP(): # Creating AVP folders