def create_help_entry(key, entrytext, category='General', locks=None, aliases=None):
 global _HelpEntry
 if (not _HelpEntry):
  from evennia.help.models import HelpEntry as _HelpEntry
 try:
  new_help = _HelpEntry()
  new_help.key = key
  new_help.entrytext = entrytext
  new_help.help_category = category
  if locks:
   new_help.locks.add(locks)
  if aliases:
   new_help.aliases.add(aliases)
  new_help.save()
  return new_help
 except IntegrityError:
  string = ("Could not add help entry: key '%s' already exists." % key)
  logger.log_err(string)
  return None
 except Exception:
  logger.log_trace()
  return None

def create_help_entry ( key , entrytext , category = 'General' , locks = None , aliases = None ) : global _HelpEntry if ( not _HelpEntry ) : from evennia . help . models import HelpEntry as _HelpEntry try : new_help = _HelpEntry ( ) new_help . key = key new_help . entrytext = entrytext new_help . help_category = category if locks : new_help . locks . add ( locks ) if aliases : new_help . aliases . add ( aliases ) new_help . save ( ) return new_help except IntegrityError : string = ( "Could not add help entry: key '%s' already exists." % key ) logger . log_err ( string ) return None except Exception : logger . log_trace ( ) return None
create a static help entry in the help database .