ipypublish.preprocessors.crop_cells module

class ipypublish.preprocessors.crop_cells.CropCells(**kw)[source]

Bases: nbconvert.preprocessors.base.Preprocessor

A preprocessor to crop the notebook cells from <start> to <end>


An int trait.

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.

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

An int trait.