Skip to content

bierschi/ComunioScore

Repository files navigation

Maps the SofaScore rating to Comunio players

Build Status License: MIT

  • Get current ranking of all comunio user within the community
  • Periodic messages for player rating, goals and offs
  • Messenger integration to share it in groups chat with friends
  • Telegram conversation handler to make various settings
  • Supports postgresql and sqlite databases

Installation

install ComunioScore with pip


pip3 install ComunioScore

or from source


git clone https://github.com/bierschi/ComunioScore
cd ComunioScore
sudo python3 setup.py install

Usage and Examples

Print the available arguments for the ComunioScore Application


ComunioScore --help

Use it with pure command line arguments


ComunioScore args --host 127.0.0.1 --port 8086 --dbhost 127.0.01 --dbport 5432 --dbuser john --dbpassword jane --dbname comunioscore --comunio_user john --comunio_pass jane --token 34kdf4fad8fa8f --chatid 18539452 --season 2020-15-05 --scraperapikey 3543kf233fag3t

Or with a configuration file


ComunioScore config --file /etc/comunioscore/comunioscore.ini

edit the comunioscore.ini file and add credentials for comunio, telegram and postgres database:


[comunio]
username=
password=

[database]
host=
port=
username=
password=
dbname=

[server]
host='0.0.0.0'
port=8086

[telegram]
token=
chatid=

[season]
startdate=

[logging]
dir=/var/log/

[ScraperAPI]
apikey=0df993rvf9afdsf93ra

Build Debian package

change into directory dist_package and execute:


./build_package.sh --debian

install debian package


sudo dpkg -i ComunioScore_*.deb

Logs

logs can be found in /var/log/ComunioScore

Troubleshooting

  • add your current user to group syslog, this allows the application to create a folder in /var/log. Replace <user> with your current user

sudo adduser <user> syslog

to apply this change, log out and log in again and check with the command groups

  • To use pythons build in sqlite database, leave the [database] section in the config file empty

  • If error occurs due to missing pg_config executable, install the libpq-dev package


sudo apt-get install libpq-dev

Changelog

All changes and versioning information can be found in the CHANGELOG

License

Copyright (c) 2019 Bierschneider Christian. See LICENSE for details

About

maps the sofascore rating to comunio players

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published