diff --git a/scripts/generate.sh b/scripts/generate.sh index 061d064..53493d3 100644 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -1,10 +1,10 @@ #!/bin/sh -pip3 install -r requirements.txt +pip3 install -r ./scripts/requirements.txt # idees cp ./site/data/idees.sample.json ./site/data/idees.json # chat -python3 ./script/generate_chat_info.py +python3 ./scripts/generate_chat_info.py -# wiki \ No newline at end of file +# wiki diff --git a/scripts/generate_chat_info.py b/scripts/generate_chat_info.py index 7fb33bb..07ad083 100644 --- a/scripts/generate_chat_info.py +++ b/scripts/generate_chat_info.py @@ -6,6 +6,8 @@ from datetime import datetime from monthdelta import monthdelta def main(): + print("Start chat info generation") + crapauds_total = 0 crapauds_recent = 0 channels_total = 0 @@ -37,7 +39,6 @@ def main(): channels_list.append(channel["name"]) messages = rocket.channels_history(channel["_id"], oldest= recent_date, count= 10000).json() messages_recent += len(messages["messages"]) - info = { "crapauds": { @@ -56,6 +57,7 @@ def main(): } save(info) + print("End chat info generation") def save(info): # Récupération du répertoire racine du repo diff --git a/site/data/chat.json b/site/data/chat.json index 4333453..3d90fda 100644 --- a/site/data/chat.json +++ b/site/data/chat.json @@ -1 +1 @@ -{"crapauds": {"total": 2363, "recent": 85}, "canaux": {"total": 176, "recent": 10, "liste": ["activite-et-travail", "bnb-bonheur-national-brut", "cohorte-barcelone", "cohorte-lyon-st-etienne", "crapomobile", "dessins-citoyens-collectifs-booderies", "emmaus-pau-lescar", "empowerment", "projet-cand-alterincub-centre", "terre-de-convergence"]}, "messages": {"total": 185199, "recent": 1108}} \ No newline at end of file +{"crapauds": {"total": 2363, "recent": 85}, "canaux": {"total": 176, "recent": 10, "liste": ["activite-et-travail", "bnb-bonheur-national-brut", "cohorte-barcelone", "cohorte-lyon-st-etienne", "crapomobile", "dessins-citoyens-collectifs-booderies", "emmaus-pau-lescar", "empowerment", "projet-cand-alterincub-centre", "terre-de-convergence"]}, "messages": {"total": 185200, "recent": 1108}} \ No newline at end of file