| Home | Trees | Index | Help |
|
|---|
| Package lyntin :: Module helpmanager :: Class HelpManager |
|
Manager --+
|
HelpManager
The HelpManager exists on the engine scoping--there is only one per Lyntin instance. It holds a hierarchy of help texts which can be retrieved and perused through via the #help user command. In general, it's best to access the HelpManager instance through the exported module.
Help texts are indexed by an 'fqn' which is a fully-qualified-name. For example, the #alias command would be under 'commands.alias' where 'commands' is the category in the help hierarchy that it goes under and 'alias' is the help text topic name.
Help text can also handle options set in the text in itself. Currently the only option we support is "category". This will be used if the fqn you supply to the addHelp call is lacking a category--for example 'alias'.| Method Summary | |
|---|---|
__init__(self,
e)
| |
| string |
Adds a help text to the hierarchy. |
| tuple of (string, string, string) |
Retrieves the help topic requested. |
| (string, list of strings) |
Retrieves the help topic requested. |
Takes in a fully-qualified name and attempts to remove it from the structure. | |
Prints out the hierarchy--for debugging purposes. | |
| tuple of (list of strings, string) |
Takes an fqn and splits it into a series of categories and a help topic name. |
Takes a tree and trims off the branches that don't hold any elements. | |
| Inherited from Manager | |
Tells the manager to create a new session based on another session. | |
Removes everything the manager was managing--essentially reinitializes it. | |
| string |
Returns information managed by this class. |
| list of mappings |
Returns a list of maps of parameter name -> value that represents all the info this manager is managing for this session. |
| list of strings |
Returns a list of the items that this manager manages. |
| list of tuples |
Returns a list of tuples of the parameters we're storing in this manager and the description of each parameter. |
| string |
Returns a one-liner status of the state of this manager for a given session. |
Tells the manager to remove information regarding the session. | |
| Method Details |
|---|
addHelp(self, fqn, helptext)Adds a help text to the hierarchy. Use the 'exported.add_help' and not this directly.
|
getHelp(self, fqn)Retrieves the help topic requested. This is the hard-core attempt at finding help text. It will look for it outright, then try searching, then try black magic.
|
getNode(self, fqn)Retrieves the help topic requested. The difference between this and getHelp is that getHelp will do searching and try to find the best topic for what you asked for. This will return the topic at the prescribed place or throw an exception if it doesn't exist. This is better for exporting help topics to a manual of some kind.
|
removeHelp(self, fqn)Takes in a fully-qualified name and attempts to remove it from the structure.
|
_printTree(self, tree=None, tab='')Prints out the hierarchy--for debugging purposes. |
_split_name(self, fqn)Takes an fqn and splits it into a series of categories and a help topic name. fqn's are delimited by a '.' (period). It tries to fix up the fqn as well--doing things like removing lyntin command characters from the name (some users type "#help #alias" to view the help on the alias command) and also removing instances of "root" from the beginning of the fqn because it's not needed.
|
_trimTree(self, tree)Takes a tree and trims off the branches that don't hold any elements. This method is recursive and will call itself at the various branches. It modifies the tree in place.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Aug 9 09:17:41 2004 | http://epydoc.sf.net |