2022-11-29 23:53:14 +01:00
|
|
|
class implementation_notification_channel_console(interface_notification_channel):
|
|
|
|
|
|
2022-11-30 23:03:24 +01:00
|
|
|
'''
|
|
|
|
|
[implementation]
|
|
|
|
|
'''
|
|
|
|
|
def parameters_schema(self):
|
|
|
|
|
return {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": False,
|
|
|
|
|
"properties": {
|
|
|
|
|
},
|
|
|
|
|
"required": [
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-11-30 10:26:27 +01:00
|
|
|
'''
|
|
|
|
|
[implementation]
|
|
|
|
|
'''
|
2023-04-28 17:30:51 +02:00
|
|
|
def normalize_order_node(self, node):
|
2022-11-30 10:26:27 +01:00
|
|
|
return dict_merge(
|
|
|
|
|
{
|
|
|
|
|
},
|
|
|
|
|
node
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2022-11-29 23:53:14 +01:00
|
|
|
'''
|
|
|
|
|
[implementation]
|
|
|
|
|
'''
|
2022-11-30 23:14:38 +01:00
|
|
|
def notify(self, parameters, name, data, state, info):
|
2022-11-29 23:53:14 +01:00
|
|
|
_sys.stdout.write(
|
|
|
|
|
string_coin(
|
2022-11-30 23:14:38 +01:00
|
|
|
"[{{title}}] <{{condition}}> {{info}}\n",
|
2022-11-29 23:53:14 +01:00
|
|
|
{
|
|
|
|
|
"title": data["title"],
|
2022-12-03 16:36:44 +01:00
|
|
|
"condition": condition_show(state["condition"]),
|
|
|
|
|
"info": _json.dumps(info, indent = "\t", ensure_ascii = False),
|
2022-11-29 23:53:14 +01:00
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
)
|