Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evroon/selfoss-discord

Send RSS updates from Selfoss to Discord
https://github.com/evroon/selfoss-discord

discord rss rust

Last synced: 27 days ago
JSON representation

Send RSS updates from Selfoss to Discord

Awesome Lists containing this project

README

        

# selfoss-discord
[![build](https://github.com/evroon/selfoss-discord/actions/workflows/build.yaml/badge.svg)](https://github.com/evroon/selfoss-discord/actions/workflows/build.yaml)
[![codecov](https://codecov.io/gh/evroon/selfoss-discord/graph/badge.svg?token=626FVGQH49)](https://codecov.io/gh/evroon/selfoss-discord)

Send RSS updates from Selfoss to Discord.

The Python script fetches new RSS items from `/items` and sends a message to discord for each new RSS item. The messages are sent in specific Discord channels that are created based on the RSS feed's name.

Preview of an RSS update message in Discord: (using [msfs-rss](https://github.com/evroon/msfs-rss))

![Preview](https://raw.githubusercontent.com/evroon/selfoss-discord/main/etc/preview.png)

## Usage
First, install openssl:
```
sudo apt-get install pkg-config libssl-dev
```

Create a bot in Discord with permissions to send manages and manage channels for the server you want to send messages to.
Create a file called `.env` with the following content:
```bash
DISCORD_TOKEN="your discord bot token"
DISCORD_SERVER_ID="the ID of your server/guild"
SELFOSS_BASE_URL="url where selfoss lives"
SELFOSS_USERNAME="selfoss username"
SELFOSS_PASSWORD="selfoss password"
```

Use systemd to run the update periodically, like this [service](https://github.com/evroon/concordia/blob/master/ansible/roles/selfoss/templates/selfoss-update.service.j2) and [timer](https://github.com/evroon/concordia/blob/master/ansible/roles/selfoss/templates/selfoss-update.timer.j2).