From a824b9762697d6214de2fb10ec54a61a9512fd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Thu, 12 Jun 2025 05:25:15 +0000 Subject: [PATCH] [mod] Termin-Beschreibung mit anzeigen --- source/sources/ical_feed.ts | 1 + source/targets/email.ts | 14 +++++++++++++- source/targets/telegram_bot.ts | 14 +++++++++++++- source/types.ts | 1 + 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/source/sources/ical_feed.ts b/source/sources/ical_feed.ts index c4f0ec4..0322104 100644 --- a/source/sources/ical_feed.ts +++ b/source/sources/ical_feed.ts @@ -125,6 +125,7 @@ namespace _munin.sources.ical_feed "title": vevent.summary, "begin": begin, "end": end, + "description": (vevent.description ?? null), "location": (vevent.location ?? null), "tags": vevent.categories, }; diff --git a/source/targets/email.ts b/source/targets/email.ts index 7c060d5..b9d33fa 100644 --- a/source/targets/email.ts +++ b/source/targets/email.ts @@ -73,7 +73,7 @@ namespace _munin.targets.email } ), lib_plankton.string.coin( - "{{title_label}} | {{macro_tags}}{{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}", + "{{title_label}} | {{macro_tags}}{{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}{{macro_description}}", { "title_label": labels.title.toUpperCase(), "macro_tags": ( @@ -105,6 +105,18 @@ namespace _munin.targets.email } ) ), + "macro_description": ( + (event.description === null) + ? + "" + : + lib_plankton.string.coin( + "\n\n{{description_value}}", + { + "description_value": event.description, + } + ) + ), } ) ); diff --git a/source/targets/telegram_bot.ts b/source/targets/telegram_bot.ts index 81f1ef1..df24da4 100644 --- a/source/targets/telegram_bot.ts +++ b/source/targets/telegram_bot.ts @@ -43,7 +43,7 @@ namespace _munin.targets.telegram_bot parameters.bot_token, parameters.chat_id, lib_plankton.string.coin( - "*{{head}}*\n\n\{{title_label}} | {{macro_tags}}{{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}}{{macro_description}}", { "head": labels.head, "macro_tags": ( @@ -76,6 +76,18 @@ namespace _munin.targets.telegram_bot } ) ), + "macro_description": ( + (event.description === null) + ? + "" + : + lib_plankton.string.coin( + "\n\n{{description_value}}", + { + "description_value": event.description, + } + ) + ), } ), { diff --git a/source/types.ts b/source/types.ts index 8bb5ec8..fae9db8 100644 --- a/source/types.ts +++ b/source/types.ts @@ -37,6 +37,7 @@ namespace _munin title : string; begin : lib_plankton.pit.type_datetime, end : (null | lib_plankton.pit.type_datetime), + description : (null | string); location : (null | string); tags : (null | Array); };