def 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 as :class:`soho.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'``. """ register_plugin(registry, spec, *ext)
__version__ = '0.8.0' import soho.generators import soho.renderers from soho.utils import register_plugin register_plugin(soho.generators.registry, 'soho.generators.html.HTMLGenerator', 'html', 'zpt', 'pt') register_plugin(soho.generators.registry, 'soho.generators.rst.RSTGenerator', 'rst') register_plugin(soho.renderers.registry, 'soho.renderers.zpt.ZPTRenderer', 'html', 'zpt', 'pt')
def _call_fut(self, registry, spec, *keys): from soho.utils import register_plugin return register_plugin(registry, spec, *keys)