Compare commits
No commits in common. "eaa5e53f4c4b0c5e85ffa2cd6f6f58c8cc7be5a7" and "4edab45412f1282fcb311bc792c12f72efe6f23a" have entirely different histories.
eaa5e53f4c
...
4edab45412
|
@ -1,23 +1,3 @@
|
||||||
/*
|
|
||||||
This file is part of »munin«.
|
|
||||||
|
|
||||||
Copyright 2025 'Fenris Wolf' <fenris@folksprak.org>
|
|
||||||
|
|
||||||
»munin« is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
»munin« is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with »munin«. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
namespace _munin.sources.ical_feed
|
namespace _munin.sources.ical_feed
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -111,7 +91,6 @@ namespace _munin.sources.ical_feed
|
||||||
"begin": begin,
|
"begin": begin,
|
||||||
"end": end,
|
"end": end,
|
||||||
"location": (vevent.location ?? null),
|
"location": (vevent.location ?? null),
|
||||||
"tags": vevent.categories,
|
|
||||||
};
|
};
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,31 +55,18 @@ namespace _munin.targets.email
|
||||||
parameters.sender,
|
parameters.sender,
|
||||||
parameters.receivers,
|
parameters.receivers,
|
||||||
lib_plankton.string.coin(
|
lib_plankton.string.coin(
|
||||||
"[{{head}}] {{date}} : {{macro_tags}}{{title}}",
|
"[{{head}}] {{date}} : {{title}}",
|
||||||
{
|
{
|
||||||
"head": labels.head,
|
"head": labels.head,
|
||||||
"date": lib_plankton.pit.date_format(event.begin.date),
|
"date": lib_plankton.pit.date_format(event.begin.date),
|
||||||
"macro_tags": (
|
|
||||||
(event.tags === null)
|
|
||||||
?
|
|
||||||
""
|
|
||||||
:
|
|
||||||
(event.tags.map(tag => ("{" + tag + "}")).join(" ") + " ")
|
|
||||||
),
|
|
||||||
"title": event.title,
|
"title": event.title,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
lib_plankton.string.coin(
|
lib_plankton.string.coin(
|
||||||
"{{title_label}} | {{macro_tags}}{{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}",
|
"*{{head}}*\n\n\{{title_label}} | {{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}",
|
||||||
{
|
{
|
||||||
|
"head": labels.head,
|
||||||
"title_label": labels.title.toUpperCase(),
|
"title_label": labels.title.toUpperCase(),
|
||||||
"macro_tags": (
|
|
||||||
(event.tags === null)
|
|
||||||
?
|
|
||||||
""
|
|
||||||
:
|
|
||||||
(event.tags.map(tag => ("{" + tag + "}")).join(" ") + " ")
|
|
||||||
),
|
|
||||||
"title_value": event.title,
|
"title_value": event.title,
|
||||||
"time_label": labels.time.toUpperCase(),
|
"time_label": labels.time.toUpperCase(),
|
||||||
"time_value": lib_plankton.pit.timespan_format(event.begin, event.end),
|
"time_value": lib_plankton.pit.timespan_format(event.begin, event.end),
|
||||||
|
|
|
@ -42,16 +42,9 @@ namespace _munin.targets.telegram_bot
|
||||||
parameters.bot_token,
|
parameters.bot_token,
|
||||||
parameters.chat_id,
|
parameters.chat_id,
|
||||||
lib_plankton.string.coin(
|
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}} | {{title_value}}\n{{time_label}} | {{time_value}}{{macro_location}}",
|
||||||
{
|
{
|
||||||
"head": labels.head,
|
"head": labels.head,
|
||||||
"macro_tags": (
|
|
||||||
(event.tags === null)
|
|
||||||
?
|
|
||||||
""
|
|
||||||
:
|
|
||||||
(event.tags.map(tag => ("{" + tag + "}")).join(" ") + " ")
|
|
||||||
),
|
|
||||||
"title_label": labels.title.toUpperCase(),
|
"title_label": labels.title.toUpperCase(),
|
||||||
"title_value": event.title,
|
"title_value": event.title,
|
||||||
"time_label": labels.time.toUpperCase(),
|
"time_label": labels.time.toUpperCase(),
|
||||||
|
@ -72,7 +65,7 @@ namespace _munin.targets.telegram_bot
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
"parse_mode": "Markdown",
|
"parse_mode": "markdown",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,3 @@
|
||||||
/*
|
|
||||||
This file is part of »munin«.
|
|
||||||
|
|
||||||
Copyright 2025 'Fenris Wolf' <fenris@folksprak.org>
|
|
||||||
|
|
||||||
»munin« is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
»munin« is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with »munin«. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
namespace _munin
|
namespace _munin
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -38,7 +18,6 @@ namespace _munin
|
||||||
begin : lib_plankton.pit.type_datetime,
|
begin : lib_plankton.pit.type_datetime,
|
||||||
end : (null | lib_plankton.pit.type_datetime),
|
end : (null | lib_plankton.pit.type_datetime),
|
||||||
location : (null | string);
|
location : (null | string);
|
||||||
tags : (null | Array<string>);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue