From d6f2e21175ed1d2e2777e088aa67443fcaea4eb0 Mon Sep 17 00:00:00 2001 From: Mickael Date: Wed, 4 Sep 2019 18:38:59 +0200 Subject: [PATCH] Add possibility to choose monthly or daily generation --- scripts/generate.sh | 7 +++++++ scripts/generate_daily.sh | 5 ----- scripts/generate_monthly.sh | 5 ----- 3 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 scripts/generate_daily.sh delete mode 100644 scripts/generate_monthly.sh diff --git a/scripts/generate.sh b/scripts/generate.sh index 4809a1a..9f4466d 100644 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -14,6 +14,13 @@ wget -O ./site/data/tube.json https://tube.crapaud-fou.org/feeds/videos.json?sor # chat pip3 install -r ./scripts/requirements.txt +echo $ROCKETCHAT_GENERATION +if [ $ROCKETCHAT_GENERATION = "MONTHLY" ] ; then + python3 ./scripts/generate_chat_stat_monthly.py +elif [ $ROCKETCHAT_GENERATION = "DAILY" ]; then + python3 ./scripts/generate_chat_stat_daily.py +fi + python3 ./scripts/generate_chat_info.py # global diff --git a/scripts/generate_daily.sh b/scripts/generate_daily.sh deleted file mode 100644 index 22d8cba..0000000 --- a/scripts/generate_daily.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# chat -pip3 install -r ./scripts/requirements.txt -python3 ./scripts/generate_chat_stat_daily.py \ No newline at end of file diff --git a/scripts/generate_monthly.sh b/scripts/generate_monthly.sh deleted file mode 100644 index 53d1f2b..0000000 --- a/scripts/generate_monthly.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# chat -pip3 install -r ./scripts/requirements.txt -python3 ./scripts/generate_chat_stat_monthly.py \ No newline at end of file