utils/table-generator/convert.py: додав автоматичне очищення поля ID use-case-ів від сторонніх шляхів

This commit is contained in:
ІО-23 Шмуляр Олег 2024-03-24 15:11:53 +02:00
parent 06b52b1efc
commit b8f1e590e7
1 changed files with 9 additions and 1 deletions

View File

@ -14,7 +14,15 @@ def convert_generic_v1(data):
def convert_usecase_v1(filename, data): def convert_usecase_v1(filename, data):
split_raw_lines_from_file = [i.split(" | ") for i in data.split("\n") if i] split_raw_lines_from_file = [i.split(" | ") for i in data.split("\n") if i]
split_raw_lines = [["ID", filename.upper()]] + split_raw_lines_from_file
if '/' in filename:
use_case_name = filename.rsplit("/", 1)[1].upper()
elif '\\' in filename:
use_case_name = filename.rsplit("\\", 1)[1].upper()
else:
use_case_name = filename.upper()
split_raw_lines = [["ID", use_case_name]] + split_raw_lines_from_file
merged_lines = [] merged_lines = []
for i in split_raw_lines: for i in split_raw_lines: