portail/scripts/generate.sh

30 lines
817 B
Bash
Raw Normal View History

2019-08-17 00:37:23 +00:00
#!/bin/sh
2019-08-20 09:47:39 +00:00
2019-08-17 00:37:23 +00:00
# idees
2019-08-20 09:50:31 +00:00
wget -O ./site/data/idees.json https://idees.crapaud-fou.org/stats.php
2019-08-17 00:37:23 +00:00
2019-08-20 12:17:45 +00:00
# wiki
wget -O ./site/data/wiki.json https://wiki.crapaud-fou.org/stats.php
2019-08-26 18:18:31 +00:00
# rencontres
wget -O ./site/data/rencontres.json https://wiki.crapaud-fou.org/rencontres.php
2019-08-27 04:32:43 +00:00
# tube
2019-09-05 02:56:14 +00:00
wget -O ./site/data/tube.json "https://tube.crapaud-fou.org/feeds/videos.json?sort=-publishedAt&filter=local"
2019-08-27 04:32:43 +00:00
2019-08-22 01:32:26 +00:00
# chat
2019-08-23 00:43:52 +00:00
pip3 install -r ./scripts/requirements.txt
echo $ROCKETCHAT_GENERATION
if [ -n "$ROCKETCHAT_GENERATION" ]; then
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
fi
2019-08-22 01:32:26 +00:00
python3 ./scripts/generate_chat_info.py
2019-08-30 19:07:25 +00:00
# global
python3 ./scripts/generate_global_info.py