8.1.5.1. Document¶
-
class
Pyterate.RstFactory.Document.
Document
(topic, input_file, language)[source]¶ Bases:
object
This class is responsible to process a document.
-
property
link_py
¶ return the Python symlink path
-
property
link_rst
¶ return the reST symlink path
-
read
()[source]¶ Parse the source code and extract nodes of codes, RST contents, plot and Tikz figures. The source code is annoted using comment lines starting with special directives of the form #directive name#. RST content lines start with #!#. We can include a figure using #lfig#, a figure generated by matplotlib using the directive #fig#, tikz figure using #tz# and the content of a file using #itxt# and #i# for codes. Comment that must be skipped start with #?#. Hidden code start with #h#. The directive #o# is used to split the output and to instruct to include the previous node. RST content can be formatted with variable from the locals dictionary using @<@…@>@ instead of {…}.
-
property