Compare commits
No commits in common. "main" and "main" have entirely different histories.
2
main.py
2
main.py
@ -364,7 +364,7 @@ class LabCleaningBot:
|
||||
|
||||
response_msg = ""
|
||||
|
||||
if emoji.startswith("👍") and not isRemove:
|
||||
if emoji == "👍" and not isRemove:
|
||||
accept_result = request.try_accept(now=reactionTimestamp)
|
||||
|
||||
match accept_result:
|
||||
|
19
putzen.sh
19
putzen.sh
@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
# Week number since 1970 modulo 8
|
||||
week=$(expr $(date +%s) / 604800 % 8)
|
||||
# Week number since 1970 modulo 4
|
||||
week=$(expr $(date +%s) / 604800 % 4)
|
||||
else
|
||||
week=$1
|
||||
fi
|
||||
|
||||
current_week=$(date +%V | sed s/^0//) # sed is to remove leading zeros to avoid interpreting as octal number in next line
|
||||
current_week=$(date +%V)
|
||||
next_week=$((current_week + 1))
|
||||
if [ "$next_week" -gt 52 ]; then
|
||||
next_week=1
|
||||
@ -21,21 +21,22 @@ case $week in
|
||||
python create_task.py "$task_title" 2 "in 7 days" \
|
||||
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-only-weekly"
|
||||
;;
|
||||
2)
|
||||
1)
|
||||
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
||||
python create_task.py "$task_title" 3 "in 7 days" \
|
||||
python create_task.py "$task_title" 4 "in 7 days" \
|
||||
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-fortnightly"
|
||||
;;
|
||||
4)
|
||||
2)
|
||||
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
||||
python create_task.py "$task_title" 3 "in 7 days" \
|
||||
python create_task.py "$task_title" 4 "in 7 days" \
|
||||
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-monthly"
|
||||
;;
|
||||
6)
|
||||
3)
|
||||
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
||||
python create_task.py "$task_title" 3 "in 7 days" \
|
||||
python create_task.py "$task_title" 4 "in 7 days" \
|
||||
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-fortnightly"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid choice"
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user