https://github.com/rollecode/jklbot
Jyväskylä Bot for Mastodon
https://github.com/rollecode/jklbot
Last synced: 17 days ago
JSON representation
Jyväskylä Bot for Mastodon
- Host: GitHub
- URL: https://github.com/rollecode/jklbot
- Owner: rollecode
- Created: 2025-02-08T21:21:01.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-10T10:53:34.000Z (over 1 year ago)
- Last Synced: 2026-05-03T16:24:03.922Z (27 days ago)
- Language: Python
- Homepage: https://mementomori.social/@jkl
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jyväskylä Bot for Mastodon
Jyväskylä Bot is a Mastodon bot that posts updates city of Jyväskylä news from various sources.
This bot posts:
- Jyväskylä news from RSS feed at jyvaskyla.fi
- Events in Jyväskylä
- Jyväskylä Facebook posts

## Installation
First, make sure python-venv is installed:
```bash
sudo apt-get install python3-venv
```
For the Mastodon bot to work properly, you need the following permissions when creating the application token (_yourinstance.social_/settings/applications):
- `read` - to read public posts (optional, but good for verification)
- `write:statuses` - to post updates to your timeline
Create a virtual environment and activate it:
```bash
cd jklbot
python3 -m venv venv
source venv/bin/activate
```
Install the dependencies:
```bash
pip install -r requirements.txt
```
Then run the bot:
```bash
python main.py
```
## Systemd service
Add with:
```bash
sudo nano /etc/systemd/system/jklbot.service
```
```ini
[Unit]
Description=Jyväskylä Mastodon Bot
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/jklbot
ExecStart=/path/to/jklbot/venv/bin/python3 /path/to/jklbot/main.py
Restart=always
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.target
```
Enable and start the service:
```bash
sudo systemctl daemon-reload
sudo systemctl enable jklbot
sudo systemctl start jklbot
```
Monitor:
```bash
sudo journalctl -u jklbot --all -f
```
## Contributing to the project
1. Fork the repository
2. Create a new branch
3. Make your changes and commit them
4. Push your changes to your fork
5. Create a pull request