There's a large number of useful libraries sitting around inside MoinMoin which provide a way to create robust macro code which pays attention to system wide configuration and styles.

Here I try to explore and document these libraries - or at least make reference to them so you don't need to go searching through the code every time you want to work out how to do something.

Contents

Objects

Macros are defined by creating a file named macro_name.py within which a function execute must be defined. The execute function takes two parameters: macro and arguments.

arguments is a string (yes a string, it is not a list) which is defined by the value specified between the ( and ) characters in the macro call.

macro is a MoinMoin.wikimacro.Macro instance which contains all sorts of useful information about the request being made.

macro object

Attributes:

Modules

The following modules can be imported into macro code.

MoinMoin.widget.*

TODO

MoinMoin.formatter.*

TODO

MoinMoin.i18n.*

TODO

BradsWiki: Wiki Notes/MoinMoinMacroDevelopment (last edited 2006-05-22 02:25:13 by BradleyDean)