diff options
author | Théo de la Hogue | 2024-04-10 18:27:49 +0200 |
---|---|---|
committer | Théo de la Hogue | 2024-04-10 18:27:49 +0200 |
commit | e5dd5d77fe5ba256d33356dadf20fbec153ff36a (patch) | |
tree | 73f3d16eeb54d4354ff9f255b1ed5a1c9c5804cc | |
parent | 80183213819a8b8a67630181fdc8e1effea0456e (diff) | |
download | argaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.zip argaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.tar.gz argaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.tar.bz2 argaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.tar.xz |
Printing image_parameters and draw_parameters.
-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 |