aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-10 18:27:49 +0200
committerThéo de la Hogue2024-04-10 18:27:49 +0200
commite5dd5d77fe5ba256d33356dadf20fbec153ff36a (patch)
tree73f3d16eeb54d4354ff9f255b1ed5a1c9c5804cc /src
parent80183213819a8b8a67630181fdc8e1effea0456e (diff)
downloadargaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.zip
argaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.tar.gz
argaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.tar.bz2
argaze-e5dd5d77fe5ba256d33356dadf20fbec153ff36a.tar.xz
Printing image_parameters and draw_parameters.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/DataFeatures.py27
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