Updated HTML docs

This commit is contained in:
Griatch 2021-02-27 20:21:31 +01:00
parent 801df95026
commit b77bb57004
690 changed files with 24165 additions and 10952 deletions

View file

@ -29,6 +29,7 @@
<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="">evennia.utils.inlinefuncs</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="document">
@ -43,14 +44,15 @@
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$funcname(arg, arg, ...)
</pre></div>
</div>
<p>embedded in any text where any arg can be another <strong>$funcname{}</strong> call.
<p>embedded in any text where any arg can be another <strong>**$funcname()**</strong> call.
This functionality is turned off by default - to activate,
<strong>settings.INLINEFUNC_ENABLED</strong> must be set to <strong>True</strong>.</p>
<p>Each token starts with <strong>$funcname(</strong> where there must be no space between the
$funcname and “(“. It ends with a matched ending parentesis “)”.</p>
<p>Inside the inlinefunc definition, one can use \ to escape. This is
<p>Each token starts with <strong>$funcname(</strong> where there must be no space
between the <strong>$funcname</strong> and <strong>“(“</strong>. The inlinefunc ends with a matched ending parentesis.
<strong>“)”</strong>.</p>
<p>Inside the inlinefunc definition, one can use <strong>** to escape. This is
mainly needed for escaping commas in flowing text (which would
otherwise be interpreted as an argument separator), or to escape <strong>}</strong>
otherwise be interpreted as an argument separator), or to escape **)</strong>
when not intended to close the function block. Enclosing text in
matched <strong>“””</strong> (triple quotes) or <strong></strong> (triple single-quotes) will
also escape <em>everything</em> within without needing to escape individual
@ -60,7 +62,7 @@ modules defined by <strong>settings.INLINEFUNC_MODULES</strong>. They are identi
by their function name (and ignored if this name starts with <strong>_</strong>). They
should be on the following form:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">funcname</span> <span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="c1"># ...</span>
<span class="c1"># ...</span>
</pre></div>
</div>
<p>Here, the arguments given to <strong>$funcname(arg1,arg2)</strong> will appear as the
@ -84,8 +86,9 @@ When this happens, the original parsed string is returned and the result of
the <strong>stackfull</strong> inlinefunc is appended to the end. By default this is an
error message.</p></li>
</ul>
<p>Syntax errors, notably not completely closing all inlinefunc blocks, will lead
to the entire string remaining unparsed.</p>
<p>Syntax errors, notably failing to completely closing all inlinefunc
blocks, will lead to the entire string remaining unparsed. Inlineparsing should
never traceback.</p>
<hr class="docutils" />
<dl class="py function">
<dt id="evennia.utils.inlinefuncs.random">
@ -109,11 +112,9 @@ to the entire string remaining unparsed.</p>
value will be returned. Otherwise it will be an integer value in the
given range.</p>
<p class="rubric">Example</p>
<ul class="simple">
<li><p><strong>$random()</strong></p></li>
<li><p><strong>$random(5)</strong></p></li>
<li><p><strong>$random(5, 10)</strong></p></li>
</ul>
<p><strong>$random()</strong>
<strong>$random(5)</strong>
<strong>$random(5, 10)</strong></p>
</dd></dl>
<dl class="py function">
@ -296,17 +297,19 @@ it. It is passed to the inlinefunc.</p></li>
<dd class="field-odd"><ul class="simple">
<li><p><strong>in_template</strong> (<em>str</em>) The template to be used for nick recognition.</p></li>
<li><p><strong>out_template</strong> (<em>str</em>) The template to be used to replace the string
matched by the <strong>in_template</strong>.</p></li>
matched by the in_template.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>regex, template (regex, str)</em> Regex to match against strings and a
template with markers <strong>{arg1}</strong>, <strong>{arg2}</strong>, etc for replacement using the
standard <strong>.format</strong> method.</p>
<dd class="field-even"><p><em>regex (regex)</em> Regex to match against strings
template (str): Template with markers {arg1}, {arg2}, etc for
replacement using the standard .format method.</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><a class="reference internal" href="#evennia.utils.inlinefuncs.NickTemplateInvalid" title="evennia.utils.inlinefuncs.NickTemplateInvalid"><strong>inlinefuncs.NickTemplateInvalid</strong></a> If the in/out template does not have a matching
number of $args.</p>
<dd class="field-odd"><ul class="simple">
<li><p><a class="reference internal" href="#evennia.utils.inlinefuncs.NickTemplateInvalid" title="evennia.utils.inlinefuncs.NickTemplateInvalid"><strong>evennia.utils.inlinefuncs.NickTemplateInvalid</strong></a> If the in/out template</p></li>
<li><p><strong>does not have a matching number of $args.</strong> </p></li>
</ul>
</dd>
</dl>
</dd></dl>
@ -364,7 +367,6 @@ etc to match the regex.</p></li>
<li><a href="../../0.9.5/api/evennia.utils.inlinefuncs.html">0.9.5 (v0.9.5 branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
@ -381,6 +383,7 @@ etc to match the regex.</p></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="">evennia.utils.inlinefuncs</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, The Evennia developer community.