Added README and LICENSE

This commit is contained in:
A.M. Rowsell 2025-01-27 17:04:33 -05:00
commit 18dad6d922
Signed by: amr
GPG key ID: 0B6E2D8375CF79A9
2 changed files with 412 additions and 0 deletions

39
README.md Normal file
View file

@ -0,0 +1,39 @@
# DiscoRSS
## What is it?
DiscoRSS is a simple Python script to send RSS feeds to Discord webhooks. It was created because existing bots that did this set limits on the number of feeds, and self-hosting stuff is easier and better anyway. To get this working, you will require the following Python libraries:
```
requests >= 2.4.2
feedparser
```
The remaining imports should all be part of the standard Python install. To configure the script, create /etc/discorss.conf with the following structure:
```
{
"feeds": [
{
"name": "phoronix",
"url": "http://www.phoronix.com/rss.php",
"webhook": "webhook url"
},
{
"name": "pagetable",
"url": "https://www.pagetable.com/?feed=rss2",
"webhook": "webhook url"
},
{
"name": "righto",
"url": "https://www.righto.com/feeds/posts/default",
"webhook": "webhook url",
"offset": -18000
}
]
}
```
The offset should only be required if feeds aren't showing up. This is because feedparser, in its infinite wisdom, just ignores the timezone when converting publish dates from feeds. So most feeds end up with an epoch in UTC. The offset should be the number of seconds between your time zone and UTC. This will eventually be fixed in a future update, I just need to sit down and wrangle with feedparser and datetime some more.
To automate feed posting, create a systemd service and timer to execute the script. I will include examples soon.