ipypublish.scripts.nbexport module

ipypublish.scripts.nbexport.export_notebook(nb, format, config, template)[source]

exports a notebook in a particular format

Parameters:
  • nb (nbformat.notebooknode.NotebookNode) –
  • format (str) – the nbconvert exporter class prefix (‘Latex’, ‘HTML’,…)
  • config (dict) – configuration for the nbconvert exporter
  • template (str) – the Jinja template for the conversion
Returns:

  • export (tuple) – (body, resources)
  • extension (str) – the file extension of the exported format (e.g. .tex)