woo.document

woo.document.allWooPackages(outDir='/tmp', skip='^(woo|wooExtra(|\\..*))$')[source]

Generate documentation of packages in the Restructured Text format. Each package is written to file called out/.`woo.[package].rst` and list of files created is returned.

woo.document.classDocHierarchy_topsAndDict(mod)[source]

Return tuple containing list of top-level class objects, and dictionary which maps all module-contained class objects to classes which should be documented under it (derived classes, and doc-related classes specified via ClassTrait.section

Return ReST-formatted line with hyperlinks to class headers (and implementation, if the corresponding .cpp file exists).

woo.document.fixDocstring(s)[source]
woo.document.guessInstanceTypeFromCxxType(klass, trait, noneOnFail=False)[source]
woo.document.guessListTypeFromCxxType(klass, trait, warnFail=False)[source]

Guess type of array from parsing trait.cxxType. Ugly but works.

woo.document.makeCGeomFunctorsMatrix()[source]
woo.document.makeClassAttrDocUrl(klass, attr=None)[source]

Return URL to documentation of Woo class or its attribute in http://woodem.org. :param klass: class object :param attr: attribute to link to. If given, must exist directly in given klass (not its parent); if not given or empty, link to the class itself is created and attr is ignored. :return: URL as text

woo.document.makeObjectHref(obj, attr=None, text=None)[source]

Create HTML hyperlink, wrapping makeObjectUrl. adding <a href="...">text</a>.

Parameters:text – visible text of the hyperlink; if not given, either class name or attribute name without class name (when attr is given) is used.
woo.document.makeObjectUrl(obj, attr=None)[source]

Return HTML href to a obj optionally to the attribute attr. The class hierarchy is crawled upwards to find out in which parent class is attr defined, so that the href target is a valid link. In that case, only single inheritace is assumed and the first class from the top defining attr is used.

Parameters:
  • obj – object of class deriving from woo.core.Object, or string; if string, attr must be empty.
  • attr – name of the attribute to link to; if empty, linke to the class itself is created.
Returns:

HTML with the hyperref.

woo.document.makeSphinxHtml(k)[source]

Given a class, try to guess name of the HTML page where it is documented by Sphinx

woo.document.makeTraitInfo(obj, klass, trait)[source]
woo.document.oneModuleWithSubmodules(mod, out, exclude=None, level=0, importedInto=None)[source]
woo.document.sphinxOnlineDocPath = 'http://www.woodem.org/'

Base URL for the documentation. Packaged versions should change to the local installation directory.

Tip

Got questions? Ask at ask.woodem.org. Report issues to github.