Name

xpt.embedded_manpage.embed_manpage — extract embedded man-pages from source code

Synopsis

import xpt.embedded_manpage

xml = embed_manpage(nd,directory)

Description

Embed_manpage extracts Unix man-pages from sources. Why embedded documentation: See eg. http://www.fossil-scm.org/index.html/doc/tip/www/embeddeddoc.wiki advocacy + ideas http://www.digitalmars.com/d/1.0/ddoc.html usage, otherlinks eg. doxygen http://www.python.org/community/sigs/current/doc-sig/otherlangs/ http://docs.python.org/devguide/documenting.html http://sphinx-doc.org/markup/inline.html Arguments: directory is a colon-separated list of directories which is searched for files holding embedded man-pages VARIABLES Variables are set using the .set command and can be used in the text with the special %{NAME} construction. Standard variables are __file__, __linenr__ and __null__. COMMANDS Command start with a dot on the first position on a line. The following commands are defined: .set NAME VALUE set variable NAME to value VALUE .setre REGEX NAME VALUE search text to match regex REGEX. REGEX must have one or more remembered values which can be used in the NAME and/or VALUE part as $1, $2, etc. Eg.: .setre (RETURN)\s+(VALUE) name_$1 With value: ($2) will set variable name_RETURN to hold value 'With value: (VALUE)'. Note that the text search starts right after the .setre command.

Return value

A Python list containing LibXML2 nodes in DocBook 5 refentry format

Errors

See Also

xpt(1), python(1), xpt.docbook.docbook5_refentry().