这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

fyysikkokilta/fk-viikkotiedotebot

Repository files navigation

MERGED TO KILTISBOT

Bot for Weekly News Summaries

This bot summarizes the weekly news of the Guild of Physics by parsing the raw contents of current news. You can also view the newsletter later by sending the bot a command.

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 environment variables in a bot.env. Example contents of the bot.env-file: commandline BOT_TOKEN=gmU8lKWwuxIIKju NEWSLETTER_BASE_URL=https://fyysikkokilta.fi/api/newsletter/telegram
  2. (optional) Set a symlink from wordpress viikkotiedote folder to mails in root. This way generated weekly news are directly added to Wordpress.
  3. Start the bot by running
    docker compose -f docker-compose.yml up -d
    
  4. 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

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •