Skip to content

fyysikkokilta/fk-viikkotiedotebot

Repository files navigation

Bot for Weekly News Summaries

This bot summarizes the weekly news of the Guild of Physics by parsing the raw contents of current news and feeding them to designated telegram groups on a schedule. The bot also features the following commands:

  • Viewing the weekly news at any time in either Finnish or English
  • Previewing the next week's news (only for admins)

Example

Example output

Running the bot

You can run the bot by building a Python environment and running it there or by running the preconfigured docker-compose service. Common steps:

  1. Obtain a bot token from the Bot Father

Using Python

  1. Running this bot requires python3 and virtualenv packages. You can install virtualenv with
    python3 -m pip install --user virtualenv
    
    or you can install it globally without --user flag.
  2. Create a virtual environment and prepare it by activating and installing dependencies with the following commands:
    python3 -m venv env
    source env/bin/activate
    pip install -r requirements.txt
    
  3. Start the bot in the environment that was created by running
    python3 bot.py
    

Using docker-compose

(pre) If you have created these configurations before and have made changes to the bot files, you should rebuild the image by running docker-compose -f docker-compose.yml build

  1. Set the token and usernames of bot admins in a bot.env file in a subfolder fk-viikkotiedotebot/env. Example contents of the bot.env-file:

    TIEDOTE_BOT_TOKEN=gmU8lKWwuxIIKju
    TIEDOTE_BOT_ADMINS=username1,username2
    
  2. Start the bot by running

    docker-compose -f docker-compose.yml up -d
    
  3. Stop the bot and clean the environment by running

    docker-compose -f docker-compose.yml down
    

About

Distribute weekly info letters to telegram with this bot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published