def __setup(self, reader=None, renderer=None, extensions=None, executioner=None): """Helper method for setting up MOOSEDocs objects. This is called automatically.""" command.CommandExtension.EXTENSION_COMMANDS.clear() content = [self.__text] + (self.setupContent() or []) reader = self.READER() if reader is None else reader renderer = self.RENDERER() if renderer is None else renderer extensions = extensions or self.EXTENSIONS executioner = executioner or self.EXECUTIONER() config = dict() for ext in extensions: local = self.setupExtension(ext) if local: config[ext.__name__] = local ext = load_extensions(extensions, config) self.__translator = base.Translator(content, reader, renderer, ext, executioner) self.__translator.init() self.__translator.execute() # This is required to setup the meta data
def setUp(self): """ Create the Translator instance. """ self._reader = self.READER() self._renderer = self.RENDERER() extensions = common.load_extensions(self.EXTENSIONS, self.EXTENSIONS_CONFIG) content = self.setUpContent() self._translator = base.Translator(content, self._reader, self._renderer, extensions, **self.CONFIG) self._translator.init()
def setUp(self): """ Create the Translator instance. """ self._reader = self.READER() self._renderer = self.RENDERER() extensions = common.load_extensions(self.EXTENSIONS, self.EXTENSIONS_CONFIG) content = self.setUpContent() self._translator = base.Translator(content, self._reader, self._renderer, extensions, **self.CONFIG) self._translator.init( os.path.join(os.getenv('HOME'), '.local', 'share', 'moose', 'tmp'))
def setup(self, content=None, reader=None, renderer=None, extensions=None, executioner=None): """Helper method for setting up MOOSEDocs objects""" content = content or [] reader = self.READER() if reader is None else reader renderer = self.RENDERER() if renderer is None else renderer extensions = extensions or self.EXTENSIONS executioner = executioner or self.EXECUTIONER ext = load_extensions(extensions) self.__translator = base.Translator(content, reader, renderer, ext, executioner) self.__translator.init()