def _compile_string(self, nb_json): """Export notebooks as HTML strings.""" self._req_missing_ipynb() c = Config(self.site.config['IPYNB_CONFIG']) c.update(get_default_jupyter_config()) exportHtml = HTMLExporter(config=c) body, _ = exportHtml.from_notebook_node(nb_json) return body
def __init__(self, data=[], config=None, **kwargs): """""" config = Config() #config=config) config.update(**kwargs) super(TreeChart, self).__init__(config=config, **kwargs) self.opt = {} self.data = data self.init_classes()
def __init__(self, data=data, config={}, **kwargs): """""" config = Config(config) config.update(**kwargs) super(TreeChart, self).__init__(config=config, **kwargs) self.data = data self.init_classes()
def _compile_string(self, nb_json): """Export notebooks as HTML strings.""" if flag is None: req_missing(['ipython[notebook]>=2.0.0'], 'build this site (compile ipynb)') c = Config(self.site.config['IPYNB_CONFIG']) c.update(get_default_jupyter_config()) exportHtml = HTMLExporter(config=c) body, _ = exportHtml.from_notebook_node(nb_json) return body
def _compile_string(self, nb_json): """Export notebooks as HTML strings.""" self._req_missing_ipynb() c = Config(self.site.config['IPYNB_CONFIG']) c.update(get_default_jupyter_config()) if 'template_file' not in self.site.config['IPYNB_CONFIG'].get('Exporter', {}): c['Exporter']['template_file'] = 'basic.tpl' # not a typo exportHtml = HTMLExporter(config=c) body, _ = exportHtml.from_notebook_node(nb_json) return body
def _compile_string(self, nb_json): """Export notebooks as HTML strings.""" self._req_missing_ipynb() c = Config(self.site.config['IPYNB_CONFIG']) c.update(get_default_jupyter_config()) if 'template_file' not in self.site.config['IPYNB_CONFIG'].get( 'Exporter', {}): c['Exporter']['template_file'] = 'basic.tpl' # not a typo exportHtml = HTMLExporter(config=c) body, _ = exportHtml.from_notebook_node(nb_json) return body