Package lyntin :: Module helpmanager
[show private | hide private]
[frames | no frames]

Module lyntin.helpmanager

Lyntin has a comprehensive help system that can be accessed in-game through the "#help" command. The help material is all organized and manipulated by the "HelpManager". Help is organized as topics which exist in a hierarchy of categories and it comes from a couple of sources:
  1. dynamically loaded at Lyntin startup from files located in the help subdirectory and ending with .tpc extension
  2. when commands are registered via the exported.add_command function
  3. by any module using the exported.add_help function

It's interesting to note that the README and COMMANDS files are generated entirely of in-game help topics using a template script file and my personal home-brew #exporthelp command.

The help manager holds a hierarchy of help files indexed by category. It also houses a series of methods for adding new help text, parsing help file text, and also exporting help content into some format which then can be converted to a variety of other formats: HTML, XML, JoesMagicTextMarkup, ...
Classes
HelpManager The HelpManager exists on the engine scoping--there is only one per Lyntin instance.

Function Summary
tuple of (dict, string) _parse_directives(helptext)
Parses out the directives in the last lines of a given help text and returns these directives in a dict.

Variable Summary
list _directives = ['category']

Function Details

_parse_directives(helptext)

Parses out the directives in the last lines of a given help text and returns these directives in a dict. Also strips the helptext (removing whitespace at the beginning and the end), removes directives found at the end, and returns this adjusted help text.

To add new directives to extract, add them to the '_directives' variable.

If no directives were found, we return an empty string.
Parameters:
helptext - the help text topic
           (type=string)
Returns:
the dictionary of directives and adjusted helptext
           (type=tuple of (dict, string))

Variable Details

_directives

Type:
list
Value:
['category']                                                           

Generated by Epydoc 2.1 on Mon Aug 9 09:17:41 2004 http://epydoc.sf.net