Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
pysphinxdoc.docgen.DocWriter¶
- class pysphinxdoc.docgen.DocWriter(module_dir, module_name, verbose=0)[source]¶
Bases:
objectA basic class to create a Sphinx complient documentation of a module.
- Parameters:
- module_dir: str
the path to the module to be documented. This must contain a ‘doc’ folder where the documentation will be generated, organized as follows:
logos: ‘$name.png’, ‘$name-transparent.png’, ‘$name-desaturate-100.png’
user_guide (optional): ‘index.rst’, ‘.rst’
- module_name: list of str
the name of the python package to be documented.
- verbose: int, default 0
the verbosity level.
Notes
Prefer to use directly the
sphinxdocscript.- classmethod edit_from_template(template_file, template_info)[source]¶
Edit/return a template file.
- Parameters:
- template_file: str
the location of the template file (modified inplace).
- template_info: dict
a mapping used to edit the template content.
- Returns:
- template: str
the filled template.
- classmethod write_from_template(template_file, template_info, verbose=0)[source]¶
Edit/save inplace a template file.
- Parameters:
- template_file: str
the location of the template file (modified inplace).
- template_info: dict
a mapping used to edit the template content.
- verbose: int, default 0
control the verbosity.