Background
I have a notebook which I can export to reveal.js slides using:
jupyter nbconvert "${executed_nb_path}" \
--to slides \
--SlidesExporter.reveal_scroll=True \
--TemplateExporter.exclude_input=True \
--no-prompt
It excludes cells with cell metadata:
{
"slideshow": {
"slide_type": "skip"
}
}
Question
How do I export to other outputs formats, such as html
or md
, and apply the same preprocessing with respect to cell metadata? I would like to be able to do this at the command line if possible (e.g. by setting command line arguments for the preprocessing), as opposed to creating a python script.
What I have tried
-
Tried to work out the correct "traitlet" argument to add: docs here
- no dice with
--TagRemovePreprocessor.remove_cell_tags='slideshow.slide_type="skip"'
- no dice with
-
Looked at the source code to see how the preprocessing is done:
- the entry point for
jupyter nbconvert --to slides ...
isnbconvert.exporters:SlidesExporter
nbconvert.exporters.slides._RevealMetadataPreprocessor
contains:if cell.metadata.slide_type not in {'notes', 'skip'}
- the entry point for
from jupyter nbconvert: convert to markdown and/or html excluding slides marked as `skip`
No comments:
Post a Comment