[mod] modell:event:tags hinzugefügt [mod] targets:tags anzeigen
This commit is contained in:
parent
f4f2d99a9e
commit
eaa5e53f4c
|
@ -111,6 +111,7 @@ namespace _munin.sources.ical_feed
|
|||
"begin": begin,
|
||||
"end": end,
|
||||
"location": (vevent.location ?? null),
|
||||
"tags": vevent.categories,
|
||||
};
|
||||
return event;
|
||||
}
|
||||
|
|
|
@ -55,18 +55,31 @@ namespace _munin.targets.email
|
|||
parameters.sender,
|
||||
parameters.receivers,
|
||||
lib_plankton.string.coin(
|
||||
"[{{head}}] {{date}} : {{title}}",
|
||||
"[{{head}}] {{date}} : {{macro_tags}}{{title}}",
|
||||
{
|
||||
"head": labels.head,
|
||||
"date": lib_plankton.pit.date_format(event.begin.date),
|
||||
"macro_tags": (
|
||||
(event.tags === null)
|
||||
?
|
||||
""
|
||||
:
|
||||
(event.tags.map(tag => ("{" + tag + "}")).join(" ") + " ")
|
||||
),
|
||||
"title": event.title,
|
||||
}
|
||||
),
|
||||
lib_plankton.string.coin(
|
||||
"*{{head}}*\n\n\{{title_label}} | {{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}",
|
||||
"{{title_label}} | {{macro_tags}}{{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}",
|
||||
{
|
||||
"head": labels.head,
|
||||
"title_label": labels.title.toUpperCase(),
|
||||
"macro_tags": (
|
||||
(event.tags === null)
|
||||
?
|
||||
""
|
||||
:
|
||||
(event.tags.map(tag => ("{" + tag + "}")).join(" ") + " ")
|
||||
),
|
||||
"title_value": event.title,
|
||||
"time_label": labels.time.toUpperCase(),
|
||||
"time_value": lib_plankton.pit.timespan_format(event.begin, event.end),
|
||||
|
|
|
@ -42,9 +42,16 @@ namespace _munin.targets.telegram_bot
|
|||
parameters.bot_token,
|
||||
parameters.chat_id,
|
||||
lib_plankton.string.coin(
|
||||
"*{{head}}*\n\n\{{title_label}} | {{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}",
|
||||
"*{{head}}*\n\n\{{title_label}} | {{macro_tags}}{{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}",
|
||||
{
|
||||
"head": labels.head,
|
||||
"macro_tags": (
|
||||
(event.tags === null)
|
||||
?
|
||||
""
|
||||
:
|
||||
(event.tags.map(tag => ("{" + tag + "}")).join(" ") + " ")
|
||||
),
|
||||
"title_label": labels.title.toUpperCase(),
|
||||
"title_value": event.title,
|
||||
"time_label": labels.time.toUpperCase(),
|
||||
|
@ -65,7 +72,7 @@ namespace _munin.targets.telegram_bot
|
|||
}
|
||||
),
|
||||
{
|
||||
"parse_mode": "markdown",
|
||||
"parse_mode": "Markdown",
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ namespace _munin
|
|||
begin : lib_plankton.pit.type_datetime,
|
||||
end : (null | lib_plankton.pit.type_datetime),
|
||||
location : (null | string);
|
||||
tags : (null | Array<string>);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue