From b8f1e590e73f27896a307e8fd8d8b3665941d935 Mon Sep 17 00:00:00 2001 From: hasslesstech Date: Sun, 24 Mar 2024 15:11:53 +0200 Subject: [PATCH] =?UTF-8?q?utils/table-generator/convert.py:=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=D0=B2=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=87=D0=BD=D0=B5=20=D0=BE=D1=87=D0=B8=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=8F=20ID=20use-case-?= =?UTF-8?q?=D1=96=D0=B2=20=D0=B2=D1=96=D0=B4=20=D1=81=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=BD=D0=BD=D1=96=D1=85=20=D1=88=D0=BB=D1=8F=D1=85=D1=96?= =?UTF-8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/table-generator/convert.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/table-generator/convert.py b/utils/table-generator/convert.py index c74402f..1bec61d 100755 --- a/utils/table-generator/convert.py +++ b/utils/table-generator/convert.py @@ -14,7 +14,15 @@ def convert_generic_v1(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 = [["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 = [] for i in split_raw_lines: