From e05da30fd430e458b80fd695c5df7780fd3c87b6 Mon Sep 17 00:00:00 2001 From: ctandi Date: Mon, 13 Jan 2025 18:17:07 +0100 Subject: [PATCH] putzen.sh aktualisiert --- putzen.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/putzen.sh b/putzen.sh index 55abd35..3cd41c1 100644 --- a/putzen.sh +++ b/putzen.sh @@ -7,26 +7,33 @@ else week=$1 fi +current_week=$(date +%V) +next_week=$((current_week + 1)) +if [ "$next_week" -gt 52 ]; then + next_week=1 +fi + +task_title="LeineLab putzen: KW$next_week" case $week in 0) /usr/bin/docker exec lab-signal-bot-lab-bot-1 \ - python create_task.py "LeineLab putzen" 2 "in 7 days" \ + python create_task.py "$task_title" 2 "in 7 days" \ --pad-template-url "https://pad.leinelab.org/leinelab-putzen-only-weekly" ;; 1) /usr/bin/docker exec lab-signal-bot-lab-bot-1 \ - python create_task.py "LeineLab putzen" 4 "in 7 days" \ + python create_task.py "$task_title" 4 "in 7 days" \ --pad-template-url "https://pad.leinelab.org/leinelab-putzen-fortnightly" ;; 2) /usr/bin/docker exec lab-signal-bot-lab-bot-1 \ - python create_task.py "LeineLab putzen" 4 "in 7 days" \ + python create_task.py "$task_title" 4 "in 7 days" \ --pad-template-url "https://pad.leinelab.org/leinelab-putzen-monthly" ;; 3) /usr/bin/docker exec lab-signal-bot-lab-bot-1 \ - python create_task.py "LeineLab putzen" 4 "in 7 days" \ + python create_task.py "$task_title" 4 "in 7 days" \ --pad-template-url "https://pad.leinelab.org/leinelab-putzen-fortnightly" ;; *)