Holst::JupyterFile
Inherits Reference < Object
Representation of a Jupyter notebook
Constructors
new(file_path : String, image_prefix : String = "image", image_dest : String = "images")
SourceInstance methods
cells
Returns all the cells in this notebook as an Array(JupyterCell).
Example:
notebook.cells.size # => 28
notebook.cells.each { |cell| puts(cell) }
content
Sourceexport_images
Sourceimages
Get all images contained in this notebook.
Images are returned as an array of Bytes.
Example:
i = 1
notebook.images.each { |img|
File.write("image-#{i}.png", img)
i += 1
}
to_markdown
Return a markdown rendering of this notebook. Code cells are rendered as code blocks. Images are rendered as a link.