mirror of
https://github.com/evennia/evennia.git
synced 2026-03-18 22:06:30 +01:00
294 lines
No EOL
18 KiB
HTML
294 lines
No EOL
18 KiB
HTML
|
||
<!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 — Evennia latest 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" />
|
||
<link rel="next" title="evennia.commands.default.building" href="evennia.commands.default.building.html" />
|
||
<link rel="prev" title="evennia.commands.default.admin" href="evennia.commands.default.admin.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="right" >
|
||
<a href="evennia.commands.default.building.html" title="evennia.commands.default.building"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.commands.default.admin.html" title="evennia.commands.default.admin"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia latest</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.commands.html" >evennia.commands</a> »</li>
|
||
<li class="nav-item nav-item-5"><a href="evennia.commands.default.html" accesskey="U">evennia.commands.default</a> »</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="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>
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="evennia.commands.default.admin.html"
|
||
title="previous chapter">evennia.commands.default.admin</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="evennia.commands.default.building.html"
|
||
title="next chapter">evennia.commands.default.building</a></p>
|
||
<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/docs/latest/index.html">Documentation Top</a> </li>
|
||
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
|
||
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
|
||
<li><a href="http://games.evennia.com">Game Index</a> </li>
|
||
<li>
|
||
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
|
||
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
|
||
<a href="https://evennia.blogspot.com/">Blog</a>
|
||
</li>
|
||
</ul>
|
||
<h3>Doc Versions</h3>
|
||
<ul>
|
||
|
||
<li><a href="evennia.commands.default.batchprocess.html">latest (main branch)</a></li>
|
||
|
||
<li><a href="../4.x/index.html">v4.0.0 branch (outdated)</a></li>
|
||
|
||
<li><a href="../3.x/index.html">v3.0.0 branch (outdated)</a></li>
|
||
|
||
<li><a href="../2.x/index.html">v2.0.0 branch (outdated)</a></li>
|
||
|
||
<li><a href="../1.x/index.html">v1.0.0 branch (outdated)</a></li>
|
||
|
||
<li><a href="../0.x/index.html">v0.9.5 branch (outdated)</a></li>
|
||
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<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] <python.path.to.file></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"> = ['batchcmd', 'batchcommand']</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>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcmd batchcommand', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" 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] <python path to file></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>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcodes', 'category': 'building', 'key': 'batchcode', 'no_prefix': ' batchcodes', 'tags': '', 'text': '\n build from batch-code file\n\n Usage:\n batchcode[/interactive] <python path to file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n debug - auto-delete all objects that has been marked as\n deletable in the script file (see example files for\n syntax). This is useful so as to to not leave multiple\n object copies behind when testing out the script.\n\n Runs batches of commands from a batch-code text file (*.py).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</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="right" >
|
||
<a href="evennia.commands.default.building.html" title="evennia.commands.default.building"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.commands.default.admin.html" title="evennia.commands.default.admin"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia latest</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.commands.html" >evennia.commands</a> »</li>
|
||
<li class="nav-item nav-item-5"><a href="evennia.commands.default.html" >evennia.commands.default</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">evennia.commands.default.batchprocess</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2024, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||
</div>
|
||
</body>
|
||
</html> |