Updated HTML docs

This commit is contained in:
Griatch 2021-05-30 21:07:39 +02:00
parent 5ed4efea19
commit 4dc5b239aa
77 changed files with 1293 additions and 660 deletions

View file

@ -50,13 +50,14 @@ dicts. Otherwise <em>all</em> top-level dicts in the module will be assumed to
help-entry dict.</p>
<p>Each help-entry dict is on the form</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="s1">&#39;key&#39;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">str</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s1">&#39;text&#39;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">str</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s1">&#39;category&#39;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">str</span><span class="o">&gt;</span><span class="p">,</span> <span class="c1"># optional, otherwise settings.DEFAULT_HELP_CATEGORY</span>
<span class="s1">&#39;aliases&#39;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">list</span><span class="o">&gt;</span><span class="p">,</span> <span class="c1"># optional</span>
<span class="s1">&#39;text&#39;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">str</span><span class="o">&gt;</span><span class="p">}</span>
<span class="s1">&#39;locks&#39;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">str</span><span class="o">&gt;</span><span class="p">}</span> <span class="c1"># optional, use access-type &#39;view&#39;. Default is view:all()</span>
</pre></div>
</div>
<p>where the <strong>category</strong> is optional and the <strong>text**</strong> should be formatted on the
same form as other help entry-texts and contain <strong>**# subtopics**</strong> as normal.</p>
<p>The <strong>text**</strong> should be formatted on the same form as other help entry-texts and
can contain <strong>**# subtopics**</strong> as normal.</p>
<p>New help-entry modules are added to the system by providing the python-path to
the module to <strong>settings.FILE_HELP_ENTRY_MODULES</strong>. Note that if same-key entries are
added, entries in latter modules will override that of earlier ones. Use
@ -67,6 +68,7 @@ not set explicitly.</p>
<span class="s2">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;The Gods&quot;</span><span class="p">,</span> <span class="c1"># case-insensitive, also partial-matching (&#39;gods&#39;) works</span>
<span class="s2">&quot;aliases&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;pantheon&#39;</span><span class="p">,</span> <span class="s1">&#39;religion&#39;</span><span class="p">],</span>
<span class="s2">&quot;category&quot;</span><span class="p">:</span> <span class="s2">&quot;Lore&quot;</span><span class="p">,</span>
<span class="s2">&quot;locks&quot;</span><span class="p">:</span> <span class="s2">&quot;view:all()&quot;</span><span class="p">,</span> <span class="c1"># this is optional unless restricting access</span>
<span class="s2">&quot;text&quot;</span><span class="p">:</span> <span class="s1">&#39;&#39;&#39;</span>
<span class="s1"> The gods formed the world ...</span>
@ -97,7 +99,7 @@ not set explicitly.</p>
<hr class="docutils" />
<dl class="py class">
<dt id="evennia.help.filehelp.FileHelpEntry">
<em class="property">class </em><code class="sig-prename descclassname">evennia.help.filehelp.</code><code class="sig-name descname">FileHelpEntry</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">aliases</span><span class="p">:</span> <span class="n">list</span></em>, <em class="sig-param"><span class="n">help_category</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">entrytext</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/help/filehelp.html#FileHelpEntry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">evennia.help.filehelp.</code><code class="sig-name descname">FileHelpEntry</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">aliases</span><span class="p">:</span> <span class="n">list</span></em>, <em class="sig-param"><span class="n">help_category</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">entrytext</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">lock_storage</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/help/filehelp.html#FileHelpEntry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Represents a help entry read from file. This mimics the api of the
database-bound HelpEntry so that they can be used interchangeably in the
@ -122,15 +124,40 @@ help command.</p>
<code class="sig-name descname">entrytext</code><em class="property">: str</em><a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry.entrytext" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.help.filehelp.FileHelpEntry.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property">: str</em><a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="evennia.help.filehelp.FileHelpEntry.search_index_entry">
<em class="property">property </em><code class="sig-name descname">search_index_entry</code><a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry.search_index_entry" title="Permalink to this definition"></a></dt>
<dd><p>Property for easily retaining a search index entry for this object.</p>
</dd></dl>
<dl class="py attribute">
<dt id="evennia.help.filehelp.FileHelpEntry.locks">
<code class="sig-name descname">locks</code><a class="reference internal" href="../_modules/evennia/help/filehelp.html#FileHelpEntry.locks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="evennia.help.filehelp.FileHelpEntry.access">
<code class="sig-name descname">access</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">accessing_obj</span></em>, <em class="sig-param"><span class="n">access_type</span><span class="o">=</span><span class="default_value">'view'</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/help/filehelp.html#FileHelpEntry.access"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry.access" title="Permalink to this definition"></a></dt>
<dd><p>Determines if another object has permission to access this help entry.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>accessing_obj</strong> (<em>Object</em><em> or </em><em>Account</em>) Entity trying to access this one.</p></li>
<li><p><strong>access_type</strong> (<em>str</em>) type of access sought.</p></li>
<li><p><strong>default</strong> (<em>bool</em>) What to return if no lock of <strong>access_type</strong> was found.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="evennia.help.filehelp.FileHelpEntry.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">aliases</span><span class="p">:</span> <span class="n">list</span></em>, <em class="sig-param"><span class="n">help_category</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">entrytext</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry.__init__" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">aliases</span><span class="p">:</span> <span class="n">list</span></em>, <em class="sig-param"><span class="n">help_category</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">entrytext</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">lock_storage</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#evennia.help.filehelp.FileHelpEntry.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>