- Fix generate.sh
- Add log in generate_chat_info.py
This commit is contained in:
parent
4bac49679a
commit
0c50498f88
3 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
# wiki
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}}
|
||||
{"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}}
|
Loading…
Reference in a new issue