matrix-nio based bot using plugins to realize commands and auto announcements.
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 |
- git
- python3 (>=3.8, tested with 3.11)
- python3-venv
- see requirements.txt
You should install this application using a dedicated user.
-
Install system requirements
sudo apt-get update sudo apt-get install python3-venv git
-
Create spacebot user
sudo useradd --comment "Spacebot" --create-home --user-group spacebot
-
Change to spacebot user
sudo su - spacebot
-
Clone repository
git clone https://github.com/Bytespeicher/spacebot
-
Initialize virtual environment
python3 -m venv virtualenv3
-
Install python requirements in virtual environment
. virtualenv3/bin/activate pip3 install -r spacebot/requirements.txt deactivate
-
Copy example configuration files
cd ~/spacebot cp config/config.example.yaml config/config.yaml
-
Adjust configuration file config/config.yaml
-
Copy systemd unit file
sudo cp /home/spacebot/spacebot/contrib/spacebot.service /etc/systemd/system/spacebot.service
-
Reload systemd daemon to reload unit file and start and enable service
sudo systemctl daemon-reload sudo systemctl enable spacebot.service --now
-
Change to spacebot user
sudo su - spacebot
-
Update repository
cd spacebot git pull
-
Update virtual environment
cd python3 -m venv --upgrade virtualenv3
-
Update python requirements in virtual environment
cd . virtualenv3/bin/activate pip3 install --upgrade -r spacebot/requirements.txt deactivate
-
Adjust configuration file config/config.yaml
-
Restart systemd daemon
sudo systemctl restart spacebot.service