RST documentation ================= DIP package comes with an automatized RST export of parameters. As an example, we use the same files as in HTML and PDF documentations. Environment suitable for a documentation has to be parsed with a special method ``parse_docs()``, that processes node differently as the standard ``parse()`` method. .. code-block:: python >>> from scinumtools.dip import DIP >>> from scinumtools.dip.docs import ExportDocsRST >>> with DIP() as p: >>> p.add_file('definitions.dip') >>> docs = p.parse_docs() >>> with ExportDocsRST(docs) as exp: >>> exp.build( >>> './build', >>> "Example DIP documentation", >>> "In this document we want to demonstrate basic capabilities of a DIP documentation..... " >>> ) ``ExportDocsRST`` class provided above can be used as it is, or as a template for your own personalized documentation. When building your own documentation, you can simply take the `existing source code `_ and modify it according to your needs. RST code is generated using a custom `RST parser class `_. Code above will generate the following default RST documentation. .. toctree:: :maxdepth: 2 :caption: Contents parameters references settings