evennia/docs/1.0-dev/Setup/RSS.html
2020-11-14 13:44:49 +01:00

154 lines
No EOL
8.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>RSS &#8212; Evennia 1.0-dev documentation</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">RSS</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="rss">
<h1>RSS<a class="headerlink" href="#rss" title="Permalink to this headline"></a></h1>
<p><a class="reference external" href="http://en.wikipedia.org/wiki/RSS">RSS</a> is a format for easily tracking updates on websites. The
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 whats new.</p>
<p>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
<a class="reference external" href="http://code.google.com/feeds/p/evennia/updates/basic">here</a>.</p>
<div class="section" id="configuring-rss">
<h2>Configuring RSS<a class="headerlink" href="#configuring-rss" title="Permalink to this headline"></a></h2>
<p>To use RSS, you first need to install the <a class="reference external" href="http://code.google.com/p/feedparser/">feedparser</a> python
module.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">feedparser</span>
</pre></div>
</div>
<p>Next you activate RSS support in your config file by settting <code class="docutils literal notranslate"><span class="pre">RSS_ENABLED=True</span></code>.</p>
<p>Start/reload Evennia as a privileged user. You should now have a new command available, <code class="docutils literal notranslate"><span class="pre">&#64;rss2chan</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="nd">@rss2chan</span> <span class="o">&lt;</span><span class="n">evennia_channel</span><span class="o">&gt;</span> <span class="o">=</span> <span class="o">&lt;</span><span class="n">rss_url</span><span class="o">&gt;</span>
</pre></div>
</div>
<div class="section" id="setting-up-rss-step-by-step">
<h3>Setting up RSS, step by step<a class="headerlink" href="#setting-up-rss-step-by-step" title="Permalink to this headline"></a></h3>
<p>You can connect RSS to any Evennia channel, but for testing, lets set up a new channel “rss”.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> @ccreate rss = RSS feeds are echoed to this channel!
</pre></div>
</div>
<p>Lets connect Evennias code-update feed to this channel. The RSS url for evennia updates is
<code class="docutils literal notranslate"><span class="pre">https://github.com/evennia/evennia/commits/master.atom</span></code>, so lets add that:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="nd">@rss2chan</span> <span class="n">rss</span> <span class="o">=</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">evennia</span><span class="o">/</span><span class="n">evennia</span><span class="o">/</span><span class="n">commits</span><span class="o">/</span><span class="n">master</span><span class="o">.</span><span class="n">atom</span>
</pre></div>
</div>
<p>Thats it, really. New Evennia updates will now show up as a one-line title and link in the channel.
Give the <code class="docutils literal notranslate"><span class="pre">&#64;rss2chan</span></code> 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 <code class="docutils literal notranslate"><span class="pre">/delete</span></code>
switch:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="nd">@rss2chan</span><span class="o">/</span><span class="n">delete</span> <span class="n">rss</span> <span class="o">=</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">evennia</span><span class="o">/</span><span class="n">evennia</span><span class="o">/</span><span class="n">commits</span><span class="o">/</span><span class="n">master</span><span class="o">.</span><span class="n">atom</span>
</pre></div>
</div>
<p>You can connect any number of RSS feeds to a channel this way. You could also connect them to the
same channels as <a class="reference internal" href="IRC.html"><span class="doc">IRC</span></a> to have the feed echo to external chat channels as well.</p>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<p><h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">RSS</a><ul>
<li><a class="reference internal" href="#configuring-rss">Configuring RSS</a><ul>
<li><a class="reference internal" href="#setting-up-rss-step-by-step">Setting up RSS, step by step</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Setup/RSS.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div>
<h3>Versions</h3>
<ul>
<li><a href="RSS.html">1.0-dev (develop branch)</a></li>
<li><a href="../../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">RSS</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>