This is a Python package to
- execute a notebook without opening it
- tagging an exec with a time stamp
- convert it to html with a number of options
- Remove code cells
- Selectively remove some cells
- Outline important cells
- Add a ribbon
- embed images to avoid broken links
- archive the notebook and its html snapshot
This is to help
- use notebook as 'Excel macros'
- share the result (only the interesting parts) as standalone documents
From terminal:
pip install notebook_snapshot
Read and run the demo notebook.
It will
- run the sample notebook
- snapshot it as html after applying custom mofications
- move the executed notebook and its snapshot, both time stamped, to an archive folder
The configuration options are self explanatory from the demo notebook except the selection of cells
- A code cell and its output can be tagged 'important' by
- starting it with
# NBCONVERT IMPORTANT
- adding metadata
"nbconvert": "important"
- starting it with
- A code cell and its output can be tagged for removal by
- starting it with
# NBCONVERT REMOVE
- adding metadata
"nbconvert": "remove"
- starting it with
As an example the sample notebook can be converted to
-
Remove injection of notebook CSS 5.4.0 when nbconvert version goes over 5.3.1.
Waiting for nbconvert PR#682 to come into effect. -
Looking for a way to link notebook CSS instead of adding it to the file - to save ~300kB file size.
Cf question on Jupyter nbconvert Google Group. -
IMPORTANT Looking for a way to save widget states from nbconvert.
Now only possible via GUI.