Refactor folder creation logic and add AVP and BPE folders when creating a new project

This commit is contained in:
gribse 2024-10-31 00:53:13 +01:00
parent 909fed29d4
commit e19076efeb

View file

@ -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 os
import datetime import datetime
@ -76,6 +82,14 @@ def createNewProject():
dst_file.write(src_file.read()) dst_file.write(src_file.read())
pause_debug(f"File copied to new folder: {destination_file}") 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(): def createNewAVP():
# Creating AVP folders # Creating AVP folders
folders = [f for f in os.listdir(avp_directory) if os.path.isdir(os.path.join(avp_directory, f)) and f.startswith("AVP")] folders = [f for f in os.listdir(avp_directory) if os.path.isdir(os.path.join(avp_directory, f)) and f.startswith("AVP")]