diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/DataFeatures.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py index a608540..af18c3b 100644 --- a/src/argaze/DataFeatures.py +++ b/src/argaze/DataFeatures.py @@ -1035,6 +1035,33 @@ class PipelineStepObject(): if output[-1] != '\n': output += '\n' + def print_dict(d: dict, key_color, tabs) -> str: + + output = '' + tabs = f'{tabs}\t' + + for k, v in d.items(): + + if type(v) is dict: + + output += f'{tabs} - {key_color}{Style.BRIGHT}{k}{Style.RESET_ALL}:\n{print_dict(v, key_color, tabs)}' + + else: + + output += f'{tabs} - {key_color}{Style.BRIGHT}{k}{Style.RESET_ALL}: {v}\n' + + return output + + if len(self._image_parameters): + + output += f'{tabs}\t{Style.BRIGHT}image_parameters{Style.RESET_ALL}:\n' + output += print_dict(self._image_parameters, Fore.YELLOW, tabs) + + if len(self._draw_parameters): + + output += f'{tabs}\t{Style.BRIGHT}draw_parameters{Style.RESET_ALL}:\n' + output += print_dict(self._draw_parameters, Fore.YELLOW, tabs) + return output @property |