Package trac :: Package admin :: Module api :: Class IAdminCommandProvider

Class IAdminCommandProvider

source code

    object --+    
             |    
core.Interface --+
                 |
                IAdminCommandProvider

Extension point interface for adding commands to the console administration interface trac-admin.
Instance Methods
 
get_admin_commands()
Return a list of available admin commands.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

get_admin_commands()

source code 

Return a list of available admin commands.

The items returned by this function must be tuples of the form (command, args, help, complete, execute), where command contains the space-separated command and sub-command names, args is a string describing the command arguments and help is the help text. The first paragraph of the help text is taken as a short help, shown in the list of commands.

complete is called to auto-complete the command arguments, with the current list of arguments as its only argument. It should return a list of relevant values for the last argument in the list.

execute is called to execute the command, with the command arguments passed as positional arguments.