Skip to main content

extract_notebook_content

Function extract_notebook_content 

Source
pub fn extract_notebook_content(json_text: &str) -> Option<String>
Expand description

Extract the human-readable text from a Jupyter notebook’s cells.

Concatenates each cell’s source (code and markdown) together with textual outputs (stream text and text/plain results). Non-text outputs such as image/png data are intentionally skipped to avoid scanning base64 noise.

Returns Some(combined_text) when the notebook parses and yields any text, otherwise None (the caller falls back to the raw content).