API Documentation¶
soho.builder module¶
soho.generators package¶
-
class
soho.generators.BaseGenerator¶ The base class that any generator must implement.
-
generate(path)¶ Return a tuple that consists of the metadata and the HTML fragment generated from the file at the given
path.
-
-
soho.generators.register_generator(spec, *ext)¶ Register a generator.
spec- a string that represents the full path to a class, for example
'soho.generators.rst.RSTGenerator'. The class must implement the same interface assoho.generators.BaseGenerator. ext- one or more file extensions to which the plugin will be
associated. At least one file extension must be provided. File
extensions should not contain the dot, for example
'html', not'.html'.
soho.renderers package¶
-
class
soho.renderers.BaseRenderer(template_path)¶ The base class that any renderer must implement.
There is only one renderer for now, so the API is subject to change (as soon as a second renderer is implemented).
-
render(**bindings)¶ Render the template with the given
bindings.
-
-
soho.renderers.register_renderer(spec, *ext)¶ Register a renderer.
spec- a string that represents the full path to a class, for example
'soho.renderers.zpt.ZPTRenderer'. The class must implement the same interface assoho.renderers.BaseRenderer. ext- one or more file extensions to which the plugin will be
associated. At least one file extension must be provided. File
extensions should not contain the dot, for example
'html', not'.html'.