Skip to content

Latest commit

 

History

History
115 lines (93 loc) · 2.49 KB

README.md

File metadata and controls

115 lines (93 loc) · 2.49 KB

Spacebot

matrix-nio based bot using plugins to realize commands and auto announcements.

Plugins

Plugin Description
amtsblatt Link to "Amtsblatt der Landeshauptstadt Erfurt" and announce new releases
dates Next dates from configured icals and announce upcoming events
echo Print text after keyword
now Current date and time
rss Latest entries from RSS feeds and announce new entries
status Current room status

Dependencies

System (Debian-related)

  • git
  • python3 (>=3.8, tested with 3.11)
  • python3-venv

Python modules

Installation

You should install this application using a dedicated user.

System requirements on Debian

  1. Install system requirements

    sudo apt-get update
    sudo apt-get install python3-venv git
  2. Create spacebot user

    sudo useradd --comment "Spacebot" --create-home  --user-group spacebot

Spacebot

  1. Change to spacebot user

    sudo su - spacebot
  2. Clone repository

    git clone https://github.com/Bytespeicher/spacebot
  3. Initialize virtual environment

    python3 -m venv virtualenv3
  4. Install python requirements in virtual environment

    . virtualenv3/bin/activate
    pip3 install -r spacebot/requirements.txt
    deactivate
  5. Copy example configuration files

    cd ~/spacebot
    cp config/config.example.yaml config/config.yaml
  6. Adjust configuration file config/config.yaml

Install systemd unit

  1. Copy systemd unit file

    sudo cp /home/spacebot/spacebot/contrib/spacebot.service /etc/systemd/system/spacebot.service
  2. Reload systemd daemon to reload unit file and start and enable service

    sudo systemctl daemon-reload
    sudo systemctl enable spacebot.service --now

Update

Spacebot

  1. Change to spacebot user

    sudo su - spacebot
  2. Update repository

    cd spacebot
    git pull
  3. Update virtual environment

    cd
    python3 -m venv --upgrade virtualenv3
  4. Update python requirements in virtual environment

    cd
    . virtualenv3/bin/activate
    pip3 install --upgrade -r spacebot/requirements.txt
    deactivate
  5. Adjust configuration file config/config.yaml

  6. Restart systemd daemon

    sudo systemctl restart spacebot.service