FFF Info Python Backend / Telegram chatbot

The Python backend for the FFF-Infopunkt website and for the FFF Infopunkt Javascript backend
What does this service do?
- Collecting the data from telegram with a chatbot (called fffinfobot)
- Preparing the data for the dynalite backend (uses the dynamodb service) and pushing Data to server
How to get this working
1. Use python3
- Clone Repository to your local disk
- Install with
pip install telepot pynamodb - Create config.json with your dynalite server and chatbot id (to use ours please use the docker version), the config
file is needed because we are getting the api keys from this file:
Please format the file in the following way:
config.json:
{ "bot": { "private_key": "botprivatekey", "updateId": 0 }, "aws": { "access_key": "awsaccesskey", "private_key": "privatekey", "region": "region" } } - Run server with
python3 bot.py - Format the messages as shown below and have fun
2. Use docker (recommended)
- Run on an x64 machine
docker run -d pboehler/fffinfopythonbackendserver - Run on an arm machine like the Raspberry Pi
docker run -d pboehler/fffinfopythonbackendserver:rpi
Format the messages:
The messages need to be formatted with the following pattern:
- bot:
- A title
- A short description (need to be one line)
- The organisation
- The date
- The start time
- The meeting point / starting point
- The end point
- A website url
The ‘bot:’ statement is needed to let the bot know that the message is meant for him / her
If an element does not exists add ‘None’ / ‘none’ / ‘NONE’ to the line
Other information about running the system:
- We are writing log files, you can view them in file logger.log. The timestamp is counted in Milliseconds from the 01.01.1970 (you can easily convert them with bash)
- Our server at the moment only runs with 0.5 Gb of RAM (so not that much), so please don’t send a million messages at once
Planned for future:
- Integration to more chat services
- ML for text recognition
- Migration to MongoDB (we only want to use OS Software)