<spanid="evennia-help-filehelp"></span><h1>evennia.help.filehelp<aclass="headerlink"href="#module-evennia.help.filehelp"title="Permalink to this headline">¶</a></h1>
<p>The filehelp-system allows for defining help files outside of the game. These
will be treated as non-command help entries and displayed in the same way as
help entries created using the <strong>sethelp</strong> default command. After changing an
entry on-disk you need to reload the server to have the change show in-game.</p>
<p>An filehelp file is a regular python module with dicts representing each help
entry. If a list <strong>HELP_ENTRY_DICTS</strong> is found in the module, this should be a list of
dicts. Otherwise <em>all</em> top-level dicts in the module will be assumed to be a
<spanclass="s1">'locks'</span><spanclass="p">:</span><spanclass="o"><</span><spanclass="nb">str</span><spanclass="o">></span><spanclass="p">}</span><spanclass="c1"># optional, use access-type 'view'. Default is view:all()</span>
</pre></div>
</div>
<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
<strong>settings.DEFAULT_HELP_CATEGORY**</strong> to customize what category is used if
<spanclass="s2">"locks"</span><spanclass="p">:</span><spanclass="s2">"view:all()"</span><spanclass="p">,</span><spanclass="c1"># this is optional unless restricting access</span>
<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
help command.</p>
<dlclass="py attribute">
<dtid="evennia.help.filehelp.FileHelpEntry.key">
<codeclass="sig-name descname">key</code><emclass="property">: str</em><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">aliases</code><emclass="property">: list</em><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property">: str</em><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">entrytext</code><emclass="property">: str</em><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.entrytext"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property">: str</em><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.lock_storage"title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="sig-name descname">search_index_entry</code><aclass="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>
<codeclass="sig-name descname">locks</code><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpEntry.locks"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.locks"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">web_get_detail_url</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpEntry.web_get_detail_url"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.web_get_detail_url"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the URI path for a View that allows users to view details for
this object.</p>
<p>ex. Oscar (Character) = ‘/characters/oscar/1/’</p>
<p>For this to work, the developer must have defined a named view somewhere
in urls.py that follows the format ‘modelname-action’, so in this case
a named view of ‘character-detail’ would be referenced by this method.</p>
<codeclass="sig-name descname">web_get_admin_url</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpEntry.web_get_admin_url"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.help.filehelp.FileHelpEntry.web_get_admin_url"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the URI path for the Django Admin page for this object.</p>
<codeclass="sig-name descname">access</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">accessing_obj</span></em>, <emclass="sig-param"><spanclass="n">access_type</span><spanclass="o">=</span><spanclass="default_value">'view'</span></em>, <emclass="sig-param"><spanclass="n">default</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpEntry.access"><spanclass="viewcode-link">[source]</span></a><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<codeclass="sig-name descname">__init__</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span><spanclass="p">:</span><spanclass="n">str</span></em>, <emclass="sig-param"><spanclass="n">aliases</span><spanclass="p">:</span><spanclass="n">list</span></em>, <emclass="sig-param"><spanclass="n">help_category</span><spanclass="p">:</span><spanclass="n">str</span></em>, <emclass="sig-param"><spanclass="n">entrytext</span><spanclass="p">:</span><spanclass="n">str</span></em>, <emclass="sig-param"><spanclass="n">lock_storage</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span>→ None<aclass="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>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.help.filehelp.</code><codeclass="sig-name descname">FileHelpStorageHandler</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">help_file_modules</span><spanclass="o">=</span><spanclass="default_value">['world.help_entries']</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpStorageHandler"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.help.filehelp.FileHelpStorageHandler"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">__init__</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">help_file_modules</span><spanclass="o">=</span><spanclass="default_value">['world.help_entries']</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpStorageHandler.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.help.filehelp.FileHelpStorageHandler.__init__"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">load</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpStorageHandler.load"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.help.filehelp.FileHelpStorageHandler.load"title="Permalink to this definition">¶</a></dt>
<dd><p>Load/reload file-based help-entries from file.</p>
<codeclass="sig-name descname">all</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">return_dict</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/help/filehelp.html#FileHelpStorageHandler.all"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.help.filehelp.FileHelpStorageHandler.all"title="Permalink to this definition">¶</a></dt>
<dd><p>Get all help entries.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>return_dict</strong> (<em>bool</em>) – Return a dict <strong>**{key: FileHelpEntry,…}**</strong>. Otherwise,
return a list of <strong>**FileHelpEntry</strong>.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><em>dict or list</em>– Depending on the setting of <strong>**return_dict**</strong>.</p>