Create the Document¶
Sphinx¶
Define the Document Structure
Define the document structure based on toctree, see [sphinxdoc] and [restdir].
Write the ‘setup.py’
Write a setup with imported setupdocx classes, for a complete example refer to Source.
1 2 3 4 5 6 7
# # setup extension modules # from setupdocx import usage, sed # documents from setupdocx.build_docx import BuildDocX
Add a custom class:
1 2 3 4 5 6 7
class build_docx(BuildDocX): """Defines additional text processing. """ def __init__(self, *args, **kargs): BuildDocX.__init__(self, *args, **kargs) self.name = 'setupdocx'
Integrate into distutils [distutils]:
1 2 3 4
setup( cmdclass={ 'build_docx': build_docx, },
Create the Configuration
Create a configuration directory, e.g. by copying and adapting one of the provided templates. The provided templates should work out of the box on a production platform based on Linux - they did at the time of writing. Refer to the sections for a pre-view.
Standard Themes:
These are contained in the standard Sphinx installation.
Special Themes:
These are opensource and has to be installed, e.g. via PyPI, or github.
Custom Themes: These are modified by local changes. The current demos are based on standard themes.
Call the ‘setup.py’
Create teh document:
python setup.py build_docx --conf-dir=/your/configuration/path/
The document is created by default in the directory:
build/doc/<docname>
Read the Document
In case of the document type html this contains by default the main page:
build/doc/<docname>/index.html
See also EXAMPLES.
Epydoc¶
available soon