Base class for preprocessors
Bases: IPython.nbconvert.utils.base.NbConvertBase
A configurable preprocessor
Inherit from this class if you wish to have configurability for your preprocessor.
Any configurable traitlets this class exposed will be configurable in profiles using c.SubClassName.attribute = value
you can overwrite preprocess_cell() to apply a transformation independently on each cell or preprocess() if you prefer your own logic. See corresponding docstring for informations.
Public constructor
Parameters: | config : Config
**kw : misc
|
---|
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
resources : dictionary
|
---|
Override if you want to apply some preprocessing to each cell. Must return modified cell and resource dictionary.
Parameters: | cell : NotebookNode cell
resources : dictionary
index : int
|
---|