evennia/docs/0.9.5/api/evennia.commands.default.batchprocess.html

237 lines
14 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>evennia.commands.default.batchprocess &#8212; Evennia 0.9.5 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>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "tex2jax_process|mathjax_process|math|output_area"}})</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 0.9.5</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">evennia.commands.default.batchprocess</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-evennia.commands.default.batchprocess">
<span id="evennia-commands-default-batchprocess"></span><h1>evennia.commands.default.batchprocess<a class="headerlink" href="#module-evennia.commands.default.batchprocess" title="Permalink to this headline"></a></h1>
<p>Batch processors</p>
<p>These commands implements the batch-command and batch-code
processors, using the functionality in evennia.utils.batchprocessors.
They allow for offline world-building.</p>
<p>Batch-command is the simpler system. This reads a file (<a href="#id1"><span class="problematic" id="id2">*</span></a>.ev)
containing a list of in-game commands and executes them in sequence as
if they had been entered in the game (including permission checks
etc).</p>
<p>Batch-code is a full-fledged python code interpreter that reads blocks
of python code (<a href="#id3"><span class="problematic" id="id4">*</span></a>.py) and executes them in sequence. This allows for
much more power than Batch-command, but requires knowing Python and
the Evennia API. It is also a severe security risk and should
therefore always be limited to superusers only.</p>
<dl class="py class">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands">
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.default.batchprocess.</code><code class="sig-name descname">CmdBatchCommands</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/batchprocess.html#CmdBatchCommands"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.muxcommand.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>build from batch-command file</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>batchcommands[/interactive] &lt;python.path.to.file&gt;</p>
</dd>
<dt>Switch:</dt><dd><dl class="simple">
<dt>interactive - this mode will offer more control when</dt><dd><p>executing the batch file, like stepping,
skipping, reloading etc.</p>
</dd>
</dl>
</dd>
</dl>
<p>Runs batches of commands from a batch-cmd text file (<a href="#id5"><span class="problematic" id="id6">*</span></a>.ev).</p>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.key">
<code class="sig-name descname">key</code><em class="property"> = 'batchcommands'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcommand', 'batchcmd']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.switch_options">
<code class="sig-name descname">switch_options</code><em class="property"> = ('interactive',)</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.switch_options" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:perm(batchcommands) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'building'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/batchprocess.html#CmdBatchCommands.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.func" title="Permalink to this definition"></a></dt>
<dd><p>Starts the processor.</p>
</dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(batchcommands) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode">
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.default.batchprocess.</code><code class="sig-name descname">CmdBatchCode</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/batchprocess.html#CmdBatchCode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.muxcommand.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>build from batch-code file</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>batchcode[/interactive] &lt;python path to file&gt;</p>
</dd>
<dt>Switch:</dt><dd><dl class="simple">
<dt>interactive - this mode will offer more control when</dt><dd><p>executing the batch file, like stepping,
skipping, reloading etc.</p>
</dd>
<dt>debug - auto-delete all objects that has been marked as</dt><dd><p>deletable in the script file (see example files for
syntax). This is useful so as to to not leave multiple
object copies behind when testing out the script.</p>
</dd>
</dl>
</dd>
</dl>
<p>Runs batches of commands from a batch-code text file (<a href="#id7"><span class="problematic" id="id8">*</span></a>.py).</p>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.key">
<code class="sig-name descname">key</code><em class="property"> = 'batchcode'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcodes']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.switch_options">
<code class="sig-name descname">switch_options</code><em class="property"> = ('interactive', 'debug')</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.switch_options" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:superuser()'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'building'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/batchprocess.html#CmdBatchCode.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.func" title="Permalink to this definition"></a></dt>
<dd><p>Starts the processor.</p>
</dd></dl>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:superuser()'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</section>
<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>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/api/evennia.commands.default.batchprocess.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com">Home page</a> </li>
<li><a href="https://github.com/evennia/evennia">Evennia Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li><a href="http://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb">IRC</a> -
<a href="https://discord.gg/NecFePw">Discord</a> -
<a href="https://groups.google.com/forum/#%21forum/evennia">Forums</a>
</li>
<li><a href="http://evennia.blogspot.com/">Evennia Dev blog</a> </li>
</ul>
<h3>Versions</h3>
<ul>
<li><a href="../../1.0-dev/api/evennia.commands.default.batchprocess.html">1.0-dev (develop branch)</a></li>
<li><a href="evennia.commands.default.batchprocess.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 0.9.5</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">evennia.commands.default.batchprocess</a></li>
</ul>
</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>