OOF2: The Manual


loadFile — Specify an external file of documentation

Python Synopsis

from oof2.common.IO.xmlmenudump import loadFile

loadFile(filename, func=None) 


Many OOF2 objects contain their own documentation. The reference section of the OOF2 manual is generated automatically from the discussion data in menu items, PropertyRegistrations, etc. Short discussions can be simple character strings, but longer discussions are more conveniently stored in separate files. In those cases, discussion should be set to the return value of loadFile(filename), where filename is the file containing the discussion. The file must contain text that is suitable for inclusion in a DocBook <refentry> element.[70]

The func argument, if specified, should be a function that is called to preprocess the contents of the file before it's included in the manual. The arguments to func are text (the contents of the file) and obj (the menu item or PropertyRegistration or other object being documented).

The file specified by loadFile isn't actually read until the manual is built (using the command OOF.Help.API_Listing.) That means that if you have no intention of building your own version of the manual, you can specify anything you want for the filename. Of course, in that case you can also omit the discussions entirely as well.

The given filename is assumed to be relative to the OOF2/MAN_OOF2 directory. Because of its size, this directory isn't included in the standard OOF2 distributions, so it will be difficult for extension authors to generate their own customized version of the manual. Please contact the OOF2 authors if you need a copy.

[70] The simplest such text would be a single paragraph surrounded by <para> and </para> tags.