2 # Someone's Mattermost scripts.
3 # Copyright (c) 2016-2022 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
4 # published under MIT-License
7 # mv to config.py.examle config.py + edit.
9 # consider running as cronjob
10 # 0 0 * * * (cd /home/someone/mattermost/priviledged/stats; python3 -u main.py)
13 # Mattermost Postgres-DB-Connect string.
14 # Needed priviledges: read only.
15 dbconnstring = "host=... dbname=... user=... password=..."
18 # Needed priviledges: post-to-a-single-channel.
19 mm_api_url = "http://localhost:8065/api"
23 # Ignore events before this date. Useful for some stats.
24 cutoff_date = "2020-02-15"
26 # Ids of stats-channel.
27 stats_daily_channel_id = "..."
28 stats_weekly_channel_id = "..."
31 import channel_activity
32 import posts_with_reactions