2020-04-07 23:13:24 +02:00
|
|
|
# RSS
|
|
|
|
|
|
|
|
|
|
|
2021-06-23 20:05:25 +12:00
|
|
|
[RSS](https://en.wikipedia.org/wiki/RSS) is a format for easily tracking updates on websites. The
|
2020-06-16 16:53:35 +02:00
|
|
|
principle is simple - whenever a site is updated, a small text file is updated. An RSS reader can
|
|
|
|
|
then regularly go online, check this file for updates and let the user know what's new.
|
2020-04-07 23:13:24 +02:00
|
|
|
|
2020-06-16 16:53:35 +02:00
|
|
|
Evennia allows for connecting any number of RSS feeds to any number of in-game channels. Updates to
|
|
|
|
|
the feed will be conveniently echoed to the channel. There are many potential uses for this: For
|
|
|
|
|
example the MUD might use a separate website to host its forums. Through RSS, the players can then
|
|
|
|
|
be notified when new posts are made. Another example is to let everyone know you updated your dev
|
|
|
|
|
blog. Admins might also want to track the latest Evennia updates through our own RSS feed
|
2021-06-23 20:05:25 +12:00
|
|
|
[here](https://code.google.com/feeds/p/evennia/updates/basic).
|
2020-04-07 23:13:24 +02:00
|
|
|
|
|
|
|
|
## Configuring RSS
|
|
|
|
|
|
2021-06-23 20:05:25 +12:00
|
|
|
To use RSS, you first need to install the [feedparser](https://code.google.com/p/feedparser/) python
|
2020-06-16 16:53:35 +02:00
|
|
|
module.
|
2020-04-07 23:13:24 +02:00
|
|
|
|
|
|
|
|
pip install feedparser
|
|
|
|
|
|
|
|
|
|
Next you activate RSS support in your config file by settting `RSS_ENABLED=True`.
|
|
|
|
|
|
2020-06-16 16:53:35 +02:00
|
|
|
Start/reload Evennia as a privileged user. You should now have a new command available, `@rss2chan`:
|
2020-04-07 23:13:24 +02:00
|
|
|
|
|
|
|
|
@rss2chan <evennia_channel> = <rss_url>
|
|
|
|
|
|
|
|
|
|
### Setting up RSS, step by step
|
|
|
|
|
|
|
|
|
|
You can connect RSS to any Evennia channel, but for testing, let's set up a new channel "rss".
|
|
|
|
|
|
|
|
|
|
@ccreate rss = RSS feeds are echoed to this channel!
|
|
|
|
|
|
2020-06-16 16:53:35 +02:00
|
|
|
Let's connect Evennia's code-update feed to this channel. The RSS url for evennia updates is
|
|
|
|
|
`https://github.com/evennia/evennia/commits/master.atom`, so let's add that:
|
2020-04-07 23:13:24 +02:00
|
|
|
|
|
|
|
|
@rss2chan rss = https://github.com/evennia/evennia/commits/master.atom
|
|
|
|
|
|
2020-06-16 16:53:35 +02:00
|
|
|
That's it, really. New Evennia updates will now show up as a one-line title and link in the channel.
|
|
|
|
|
Give the `@rss2chan` command on its own to show all connections. To remove a feed from a channel,
|
|
|
|
|
you specify the connection again (use the command to see it in the list) but add the `/delete`
|
|
|
|
|
switch:
|
2020-04-07 23:13:24 +02:00
|
|
|
|
|
|
|
|
@rss2chan/delete rss = https://github.com/evennia/evennia/commits/master.atom
|
|
|
|
|
|
2020-06-16 16:53:35 +02:00
|
|
|
You can connect any number of RSS feeds to a channel this way. You could also connect them to the
|
2021-10-21 21:04:14 +02:00
|
|
|
same channels as [IRC](./IRC.md) to have the feed echo to external chat channels as well.
|