Add static sound. Add predefined announcements and helper scripts.

This commit is contained in:
Dejvino
2021-01-09 14:19:15 +01:00
parent 059d555463
commit ccc5c82dba
11 changed files with 72 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
function time_minus_minutes() {
time="$1"
change="$2"
difference=$(($change * 60))
result=$(( $(date -d "$time" "+%s") - $difference ))
echo `date -d "@$result" "+%H:%M"`
}
TYPE=$1
shift
TARGET=$1
shift
SLACK=5
TIME=`time_minus_minutes "$TARGET" "$SLACK"`
NAME="$@"
MSG="Meeting in $SLACK minutes. ... Meeting '$NAME' in $SLACK minutes."
#echo "Scheduling $TYPE for meeting '$NAME' at $TARGET in $SLACK minutes in advance, at $TIME."
~/schedule_${TYPE} "$TIME" "$MSG"