pip install dissertate
In nb_config.py
,
import dissertate
c = get_config()
c.Exporter.preprocessors = ['dissertate.preprocessors.CellElider',
'dissertate.preprocessors.EmptyCellElider']
c.Exporter.template_file = dissertate.markdown_template_path()
then,
jupyter nbconvert --config nb_config.py --to markdown your_nb.ipynb
If you don't want a cell in the output, edit the cell metadata to include,
{"tags": ["private"]}
Alternatively, you can use
{"tags": ["todo"]}
or,
{"tags": ["setup"]}
for semantic differences that have no effect on dissertate
processing.
If you want to retain the output of the cell but not the code (e.g., for an emitted matplotlib
graph),
{"tags": ["output-generator"]}