This commit is contained in:
2025-10-04 19:44:41 +02:00
parent fe3f32c2af
commit 2b1167b3ce
3 changed files with 40 additions and 58 deletions

View File

@@ -153,11 +153,11 @@ def get_current_path(path) -> str:
sys.exit(1)
# TODO: - add dynamic name input
# - add docstring
def create_linear_directories(input_path, target_depth, current_depth):
"""Creates the linear directories for the x*y pattern"""
# TODO: - add dynamic name input
# - add docstring
logger.debug(
f"FUNC: create_linear_directories(entered) VALUES: path='{input_path}', target_depth='{target_depth}', current_depth='{current_depth}'"
)
@@ -173,24 +173,29 @@ def create_linear_directories(input_path, target_depth, current_depth):
os.mkdir(path)
create_linear_directories(path, target_depth, current_depth + 1)
create_linear_directories(
path,
target_depth,
current_depth + 1,
)
# TODO: - add dynamic name input
# - add docstring
def create_parallel_directories(input_path, target_depth, width):
"""Creates directories after the pattern x*y"""
# TODO: - add dynamic name input
# - add docstring
logger.debug(
f"FUNC: create_parallel_directories(entered) VALUES: path='{input_path}', target_depth='{target_depth}', width='{width}'"
)
# # Getting the lenth of the number string which gets addedto the dir name.
# length_width = get_int_length(width)
for i in range(width):
directory_name = "branch_" + get_standard_name_number(i, get_int_length(width))
path = os.path.join(input_path, directory_name)
os.mkdir(path)
create_linear_directories(path, target_depth, current_depth=0)
create_linear_directories(
path,
target_depth,
current_depth=0,
)