2022-11-29 23:53:14 +01:00
|
|
|
class implementation_notification_channel_console(interface_notification_channel):
|
|
|
|
|
|
2022-11-30 10:26:27 +01:00
|
|
|
'''
|
|
|
|
|
[implementation]
|
|
|
|
|
'''
|
|
|
|
|
def normalize_conf_node(self, node):
|
|
|
|
|
return dict_merge(
|
|
|
|
|
{
|
|
|
|
|
},
|
|
|
|
|
node
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2022-11-29 23:53:14 +01:00
|
|
|
'''
|
|
|
|
|
[implementation]
|
|
|
|
|
'''
|
|
|
|
|
def notify(self, parameters, name, data, state, output):
|
|
|
|
|
_sys.stdout.write(
|
|
|
|
|
string_coin(
|
|
|
|
|
"[{{title}}] <{{condition}}> {{output}}\n",
|
|
|
|
|
{
|
|
|
|
|
"title": data["title"],
|
|
|
|
|
"condition": condition_encode(state["condition"]),
|
|
|
|
|
"output": ("(no infos)" if (output is None) else output),
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
)
|