ipypublish.preprocessors.split_outputs module

class ipypublish.preprocessors.split_outputs.SplitOutputs(*args, **kwargs)[source]

Bases: nbconvert.preprocessors.base.Preprocessor

a preprocessor to split outputs into separate cells, merging the cell and output metadata, with output metadata taking priority

preprocess(nb, resources)[source]

Preprocessing to apply on each notebook.

Must return modified nb, resources.

If you wish to apply your preprocessing to each cell, you might want to override preprocess_cell method instead.

Parameters
  • nb (NotebookNode) – Notebook being converted

  • resources (dictionary) – Additional resources used in the conversion process. Allows preprocessors to pass variables into the Jinja engine.

split

A boolean (True, False) trait.

ipypublish.preprocessors.split_outputs.merge(a, b, path=None, overwrite=True)[source]

merges b into a

Examples

>>> from pprint import pprint
>>> pprint(merge({'a':{'b':1},'c':3},{'a':{'b':2}}))
{'a': {'b': 2}, 'c': 3}