]> git.somenet.org - pub/jan/mattermost-privileged.git/blob - stats/config.py.example
maintenance/fs.py
[pub/jan/mattermost-privileged.git] / stats / config.py.example
1 #
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
5 #
6 # Config file.
7 #   mv to config.py.examle config.py + edit.
8 #
9 # consider running as cronjob
10 #   0 0 * * *  (cd /home/someone/mattermost/priviledged/stats; python3 -u main.py)
11 #
12
13 # Mattermost Postgres-DB-Connect string.
14 # Needed priviledges: read only.
15 dbconnstring = "host=... dbname=... user=... password=..."
16
17 # sysadmin-bot
18 # Needed priviledges: post-to-a-single-channel.
19 mm_api_url = "http://localhost:8065/api"
20 mm_user = "..."
21 mm_user_pw = "..."
22
23 # Ignore events before this date. Useful for some stats.
24 cutoff_date = "2020-02-15"
25
26 # Ids of stats-channel.
27 stats_daily_channel_id = "..."
28 stats_weekly_channel_id = "..."
29
30 # stats to run
31 import channel_activity
32 import posts_with_reactions
33 import user_activity
34
35 stats_daily = [
36         channel_activity,
37         user_activity,
38     ]
39
40 stats_weekly = [
41         posts_with_reactions,
42     ]