From 9069f71ee6168a651fd42f90b7aea309fefa260b Mon Sep 17 00:00:00 2001
From: Christian Hesse
Date: Wed, 10 May 2023 13:48:46 +0200
Subject: [PATCH 0001/1633] daily-psk: use $ParseDate
---
daily-psk.capsman.rsc | 19 ++++++++-----------
daily-psk.local.rsc | 19 ++++++++-----------
daily-psk.template.rsc | 19 ++++++++-----------
3 files changed, 24 insertions(+), 33 deletions(-)
diff --git a/daily-psk.capsman.rsc b/daily-psk.capsman.rsc
index 2bfb5761..a24d761f 100644
--- a/daily-psk.capsman.rsc
+++ b/daily-psk.capsman.rsc
@@ -33,21 +33,18 @@ $WaitFullyConnected;
:global DailyPskSecrets;
- :local Months { "jan"=1; "feb"=2; "mar"=3; "apr"=4; "may"=5; "jun"=6;
- "jul"=7; "aug"=8; "sep"=9; "oct"=10; "nov"=11; "dec"=12 };
+ :global ParseDate;
- :local Month ($Months->[ :pick $Date 0 3 ]);
- :local Day [ :tonum [ :pick $Date 4 6 ] ];
- :local Year [ :tonum [ :pick $Date 7 11 ] ];
+ :set Date [ $ParseDate $Date ];
- :local A ((14 - $Month) / 12);
- :local B ($Year - $A);
- :local C ($Month + 12 * $A - 2);
- :local WeekDay (7000 + $Day + $B + ($B / 4) - ($B / 100) + ($B / 400) + ((31 * $C) / 12));
+ :local A ((14 - ($Date->"month")) / 12);
+ :local B (($Date->"year") - $A);
+ :local C (($Date->"month") + 12 * $A - 2);
+ :local WeekDay (7000 + ($Date->"day") + $B + ($B / 4) - ($B / 100) + ($B / 400) + ((31 * $C) / 12));
:set WeekDay ($WeekDay - (($WeekDay / 7) * 7));
- :return (($DailyPskSecrets->0->($Day - 1)) . \
- ($DailyPskSecrets->1->($Month - 1)) . \
+ :return (($DailyPskSecrets->0->(($Date->"day") - 1)) . \
+ ($DailyPskSecrets->1->(($Date->"month") - 1)) . \
($DailyPskSecrets->2->$WeekDay));
}
diff --git a/daily-psk.local.rsc b/daily-psk.local.rsc
index 5f4382f6..5e6e30f4 100644
--- a/daily-psk.local.rsc
+++ b/daily-psk.local.rsc
@@ -33,21 +33,18 @@ $WaitFullyConnected;
:global DailyPskSecrets;
- :local Months { "jan"=1; "feb"=2; "mar"=3; "apr"=4; "may"=5; "jun"=6;
- "jul"=7; "aug"=8; "sep"=9; "oct"=10; "nov"=11; "dec"=12 };
+ :global ParseDate;
- :local Month ($Months->[ :pick $Date 0 3 ]);
- :local Day [ :tonum [ :pick $Date 4 6 ] ];
- :local Year [ :tonum [ :pick $Date 7 11 ] ];
+ :set Date [ $ParseDate $Date ];
- :local A ((14 - $Month) / 12);
- :local B ($Year - $A);
- :local C ($Month + 12 * $A - 2);
- :local WeekDay (7000 + $Day + $B + ($B / 4) - ($B / 100) + ($B / 400) + ((31 * $C) / 12));
+ :local A ((14 - ($Date->"month")) / 12);
+ :local B (($Date->"year") - $A);
+ :local C (($Date->"month") + 12 * $A - 2);
+ :local WeekDay (7000 + ($Date->"day") + $B + ($B / 4) - ($B / 100) + ($B / 400) + ((31 * $C) / 12));
:set WeekDay ($WeekDay - (($WeekDay / 7) * 7));
- :return (($DailyPskSecrets->0->($Day - 1)) . \
- ($DailyPskSecrets->1->($Month - 1)) . \
+ :return (($DailyPskSecrets->0->(($Date->"day") - 1)) . \
+ ($DailyPskSecrets->1->(($Date->"month") - 1)) . \
($DailyPskSecrets->2->$WeekDay));
}
diff --git a/daily-psk.template.rsc b/daily-psk.template.rsc
index 7dd5c7e0..966a407f 100644
--- a/daily-psk.template.rsc
+++ b/daily-psk.template.rsc
@@ -34,21 +34,18 @@ $WaitFullyConnected;
:global DailyPskSecrets;
- :local Months { "jan"=1; "feb"=2; "mar"=3; "apr"=4; "may"=5; "jun"=6;
- "jul"=7; "aug"=8; "sep"=9; "oct"=10; "nov"=11; "dec"=12 };
+ :global ParseDate;
- :local Month ($Months->[ :pick $Date 0 3 ]);
- :local Day [ :tonum [ :pick $Date 4 6 ] ];
- :local Year [ :tonum [ :pick $Date 7 11 ] ];
+ :set Date [ $ParseDate $Date ];
- :local A ((14 - $Month) / 12);
- :local B ($Year - $A);
- :local C ($Month + 12 * $A - 2);
- :local WeekDay (7000 + $Day + $B + ($B / 4) - ($B / 100) + ($B / 400) + ((31 * $C) / 12));
+ :local A ((14 - ($Date->"month")) / 12);
+ :local B (($Date->"year") - $A);
+ :local C (($Date->"month") + 12 * $A - 2);
+ :local WeekDay (7000 + ($Date->"day") + $B + ($B / 4) - ($B / 100) + ($B / 400) + ((31 * $C) / 12));
:set WeekDay ($WeekDay - (($WeekDay / 7) * 7));
- :return (($DailyPskSecrets->0->($Day - 1)) . \
- ($DailyPskSecrets->1->($Month - 1)) . \
+ :return (($DailyPskSecrets->0->(($Date->"day") - 1)) . \
+ ($DailyPskSecrets->1->(($Date->"month") - 1)) . \
($DailyPskSecrets->2->$WeekDay));
}
From 4254b01a32a965a1850c6dc5c669dca34a64a297 Mon Sep 17 00:00:00 2001
From: Christian Hesse
Date: Mon, 15 May 2023 21:43:18 +0200
Subject: [PATCH 0002/1633] mod/notification-telegram: fix copy-and-paste error
---
mod/notification-telegram.rsc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc
index e59dbb27..0ab1aa04 100644
--- a/mod/notification-telegram.rsc
+++ b/mod/notification-telegram.rsc
@@ -37,7 +37,7 @@
("https://api.telegram.org/bot" . ($Message->"tokenid") . "/sendMessage") \
http-data=("chat_id=" . ($Message->"chatid") . \
"&disable_notification=" . ($Message->"silent") . \
- "&reply_to_message_id=" . ($Notification->"replyto") . \
+ "&reply_to_message_id=" . ($Message->"replyto") . \
"&disable_web_page_preview=true&parse_mode=" . ($Message->"parsemode") . \
"&text=" . ($Message->"text")) as-value;
:set ($TelegramQueue->$Id);
From 8284035ad8e945f70859c3a9a270058546d11cb6 Mon Sep 17 00:00:00 2001
From: Christian Hesse
Date: Mon, 22 May 2023 09:51:23 +0200
Subject: [PATCH 0003/1633] doc/mod/notification-email: describe how to declare
functions...
... to use them in own scripts.
---
doc/mod/notification-email.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/mod/notification-email.md b/doc/mod/notification-email.md
index 61798e64..21867774 100644
--- a/doc/mod/notification-email.md
+++ b/doc/mod/notification-email.md
@@ -44,8 +44,8 @@ Usage and invocation
There's nothing special to do. Every script or function sending a notification
will now send it to your e-mail account.
-But of course you can send notifications directly or use a function in your
-own scripts. Give it a try:
+But of course you can use the function to send notifications directly. Give
+it a try:
$SendEMail "Subject..." "Body..."
@@ -54,6 +54,12 @@ methods:
$SendNotification "Subject..." "Body..."
+To use the functions in your own scripts you have to declare them first.
+Place this before you call them:
+
+ :global SendEMail;
+ :global SendNotification;
+
See also
--------
From c0aeee3d3eb4abc006a3cfd4f57da7ab9f290e03 Mon Sep 17 00:00:00 2001
From: Christian Hesse
Date: Mon, 22 May 2023 09:52:18 +0200
Subject: [PATCH 0004/1633] doc/mod/notification-matrix: describe how to
declare functions...
... to use them in own scripts.
---
doc/mod/notification-matrix.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/mod/notification-matrix.md b/doc/mod/notification-matrix.md
index 6bb04b6e..639fa980 100644
--- a/doc/mod/notification-matrix.md
+++ b/doc/mod/notification-matrix.md
@@ -90,8 +90,8 @@ Usage and invocation
There's nothing special to do. Every script or function sending a notification
will now send it to your Matrix account.
-But of course you can send notifications directly or use a function in your
-own scripts. Give it a try:
+But of course you can use the function to send notifications directly. Give
+it a try:
$SendMatrix "Subject..." "Body..."
@@ -100,6 +100,12 @@ methods:
$SendNotification "Subject..." "Body..."
+To use the functions in your own scripts you have to declare them first.
+Place this before you call them:
+
+ :global SendMatrix;
+ :global SendNotification;
+
See also
--------
From e9b7c7f7ed540e88006c626c205d9c60c50c1677 Mon Sep 17 00:00:00 2001
From: Christian Hesse
Date: Mon, 22 May 2023 09:52:34 +0200
Subject: [PATCH 0005/1633] doc/mod/notification-telegram: describe how to
declare functions...
... to use them in own scripts.
---
doc/mod/notification-telegram.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md
index 5e6c1a05..7141fe90 100644
--- a/doc/mod/notification-telegram.md
+++ b/doc/mod/notification-telegram.md
@@ -53,8 +53,8 @@ Usage and invocation
There's nothing special to do. Every script or function sending a notification
will now send it to your Telegram account.
-But of course you can send notifications directly or use a function in your
-own scripts. Give it a try:
+But of course you can use the function to send notifications directly. Give
+it a try:
$SendTelegram "Subject..." "Body..."
@@ -63,6 +63,12 @@ methods:
$SendNotification "Subject..." "Body..."
+To use the functions in your own scripts you have to declare them first.
+Place this before you call them:
+
+ :global SendTelegram;
+ :global SendNotification;
+
See also
--------
From c2e7567c13bba80190ad5c2dd7c6ad7b025619e3 Mon Sep 17 00:00:00 2001
From: Christian Hesse
Date: Tue, 23 May 2023 11:25:43 +0200
Subject: [PATCH 0006/1633] logo: rename SVG ids
---
logo.svg | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/logo.svg b/logo.svg
index 4812897f..a30e04ea 100644
--- a/logo.svg
+++ b/logo.svg
@@ -1,14 +1,14 @@
-
-