Kaya 0.5.2 module reference for KayaDoc

List of modules in this version

KayaDoc module

This module contains functions to convert documentation files created with kayac's -xmldocs option into HTML or man page format. The source of the kayadoc2man program in the tools directory of the Kaya distribution may be useful for examples of use. It also provides an API to examine the documentation for writing other formats - see the ElementTree module for details of processing the XML representation.

HTML documentation produced with this module may be seen on the Kaya website, and man pages are installed in prefix/man/man3/*.3kaya.gz by the Kaya installation process.

// generate HTML document for a particular function
doc = readDoc("MyModule.xml");
entry = findEntry(doc,EntryLocation("myFunction",0,EntryFunction));
appendExisting(html.body,describeFunctionHTML(entry));

// get a list of all the data types in a module
// and summarise them in HTML
doc = readDoc("MyModule.xml");
ds = listDataTypes(doc);
for d in ds {
    htmliseContents(d.summary,html.body,linkFn);
}

// get the short summary for a module in man page format
doc = readDoc("MyModule.xml");
summ = extractSummary(moduleSummary(doc));
manstr = manSummary(summ)

A specification for the -xmldocs format can be found in the XMLDOCS file.

Type Synonyms

Data types

Exceptions

Functions

kaya@kayalang.org | Last modified 30 December 2008 | Supported by Durham CompSoc | Powered by Kaya