🪓 feat: sub task refinement

This commit is contained in:
Florian Hönicke
2023-05-09 16:17:34 +02:00
parent 1f86461e1c
commit afbafe164d
17 changed files with 685 additions and 468 deletions

View File

@@ -1,5 +1,6 @@
import os
import platform
import string
if platform.system() == "Windows":
os.system("color")
@@ -27,3 +28,15 @@ def print_colored(headline, text, color_code, end='\n'):
if headline:
print(f"{bold_start}{color_start}{headline}{reset}")
print(f"{color_start}{text}{reset}", end=end)
def get_template_parameters(formatted_string):
formatter = string.Formatter()
parsed = formatter.parse(formatted_string)
parameters = []
for literal_text, field_name, format_spec, conversion in parsed:
if field_name is not None:
parameters.append(field_name)
return parameters