evennia.help.manager

Custom manager for HelpEntry objects.

class evennia.help.manager.HelpEntryManager(*args, **kwargs)[source]

Bases: evennia.typeclasses.managers.TypedObjectManager

This HelpEntryManager implements methods for searching and manipulating HelpEntries directly from the database.

These methods will all return database objects (or QuerySets) directly.

Evennia-specific: find_topicmatch find_apropos find_topicsuggestions find_topics_with_category all_to_category search_help (equivalent to evennia.search_helpentry)

find_topicmatch(topicstr, exact=False)[source]

Searches for matching topics or aliases based on player’s input.

Parameters
  • topcistr (str) – Help topic to search for.

  • exact (bool, optional) – Require exact match (non-case-sensitive). If False (default), match sub-parts of the string.

Returns

matches (HelpEntries) – Query results.

find_apropos(topicstr)[source]

Do a very loose search, returning all help entries containing the search criterion in their titles.

Parameters

topicstr (str) – Search criterion.

Returns

matches (HelpEntries) – Query results.

find_topicsuggestions(topicstr)[source]

Do a fuzzy match, preferably within the category of the current topic.

Parameters

topicstr (str) – Search criterion.

Returns

matches (Helpentries) – Query results.

find_topics_with_category(help_category)[source]

Search topics having a particular category.

Parameters

help_category (str) – Category query criterion.

Returns

matches (HelpEntries) – Query results.

get_all_topics()[source]

Get all topics.

Returns

all (HelpEntries) – All topics.

get_all_categories()[source]

Return all defined category names with at least one topic in them.

Returns

matches (list)

Unique list of category names across all

topics.

all_to_category(default_category)[source]

Shifts all help entries in database to default_category. This action cannot be reverted. It is used primarily by the engine when importing a default help database, making sure this ends up in one easily separated category.

Parameters

default_category (str) – Category to move entries to.

search_help(ostring, help_category=None)[source]

Retrieve a search entry object.

Parameters
  • ostring (str) – The help topic to look for.

  • category (str) – Limit the search to a particular help topic