Skip to main content

A bot for feeding RSS feeds to Discord channels

Reason this release was yanked:

Broken build

Project description

rss2discord

A simple script for posting RSS feeds to a Discord webhook.

Installation

You can install this using pipx or the like, e.g.

pipx install rss2discord

Configuration

First, set up a webhook on Discord; consult the Discord Intro to Webhooks for more information.

Then, for each webhook, create a .json file with the following format:

{
    "webhook": "https://discord.com/api/webhooks/<channel_id>/<token>",
    "database": "feed.db",

    "username": "RSS Bot",
    "avatar_url": "https://example.com/bot.png",
    "include_summary": true,
    "include_image": false,

    "feeds": [{
        "feed_url": "https://example.com/feed",
        "username": "Example Feed",
        "avatar_url": "https://example.com/image.png",
        "include_image": true
    }, {
        "feed_url": "https://example.com/another_feed",
        "avatar_url": "https://example.com/another_image.png",
        "include_summary": false
    },
    "https://example.com/feed3",
    "https://example.com/feed4"
    ]
}

The schema is pretty basic; at the top level, the following keys are supported:

  • webhook: the webhook URL (i.e. the channel to post to)

  • database: The path to the file to store the information about already-seen entries

  • username: The display name to use for the posting bot (will default to the webhook name)

  • avatar_url: An image to use as the post avatar (will default to the webhook's icon)

  • include_summary: Whether to put the feed's summary text into the preview (defaults to true)

  • include_image: Whether to include the primary entry image into the preview (defaults to true)

  • feeds: A list of feeds to send to the channel. A feed can be just a URL, or it can be a configuration blob with the following values:

    • feed_url: The URL to the feed
    • username, avatar_url, include_summary, include_image: Overrides the top-level configuration

Only webhook is required, but database is strongly recommended.

Running it

You can run rss2discord config.json and it will go ahead and post all new items to the Discord channel. rss2discord --help will give you more detailed information about how to use it.

When first setting things up, I highly recommend doing:

rss2discord config.json -nvv

to get an idea of what will happen, and

rss2discord config.json -p

to pre-populate the database with existing items so that it doesn't spam the channel, unless you like that sort of thing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rss2discord-0.2.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rss2discord-0.2.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file rss2discord-0.2.1.tar.gz.

File metadata

  • Download URL: rss2discord-0.2.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.6 Darwin/24.5.0

File hashes

Hashes for rss2discord-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4b3ba418783351c68134ba6fc0948e9d5b7ca1a4e0f9efdd9d5a001f22e8dcbe
MD5 16c4ec39488ecaba81d866ffa65d1ad6
BLAKE2b-256 a692c31c3a86959663d2c992f258e9b2a8223a83550d0f21855f6dd45be2b962

See more details on using hashes here.

File details

Details for the file rss2discord-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: rss2discord-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.6 Darwin/24.5.0

File hashes

Hashes for rss2discord-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5245893b8d2205c85ecf23d1db6d4c1b7df2cac8b47ce43fae8efcf96e3710a4
MD5 75588b1042d9b91b1c7adf082e3f7b4e
BLAKE2b-256 6fb6ab1a57c3a8d62e1c44b08b246fbbce5a36c5d048a4baf5b2209e19242ef0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page