60 [[nodiscard]]
const std::string&
title()
const {
return title_; }
61 [[nodiscard]]
size_t num_cells()
const {
return cells_.size(); }
87 enum class Kind { Markdown, Code } kind;
89 bool hidden_source =
false;
90 std::vector<Output> outputs;
95 std::vector<Cell> cells_;
A document of markdown, code and rich outputs, written as a Jupyter notebook (nbformat 4....
Definition report.hpp:41
const std::string & title() const
Definition report.hpp:60
std::string to_ipynb() const
The notebook as nbformat 4.5 JSON. Its kernel spec is xeus-cpp's C++17 kernel, so the code cells run ...
Report & show(const T &value)
output(mime_bundle_repr(value)).
Definition report.hpp:54
Report(std::string title="")
Report & markdown(std::string text)
A markdown cell.
Report & output(MimeBundle bundle)
A rich output: attached to the last cell if it is a code cell, otherwise in a code cell of its own.
void save_html(const std::string &path, const HtmlOptions &options={}) const
std::string to_html(const HtmlOptions &options={}) const
One HTML page. Vega-Lite charts load Vega from the CDN (pinned, with integrity hashes) or,...
Report & text(std::string text)
A plain-text output (a stream output on stdout in the notebook).
void save_ipynb(const std::string &path) const
Report & code(std::string source)
A code cell showing source as C++ (not run).
size_t num_cells() const
Definition report.hpp:61
Self-contained HTML views of the viz documents (VIZ-3): interactive Vega-Lite charts with tooltips,...
Rich notebook display: mime_bundle_repr() for pulsatrix's types (roadmap NB-1).
Definition acquisition_functions.hpp:16
MimeBundle mime_bundle_repr(const Tensor &tensor)
@ Output
What the model's output is and means: its schema, labels and scope.
std::string MarkdownToHtml(const std::string &markdown)
Markdown (the subset Report::to_html() supports) as HTML; raw HTML is escaped.
Options for every HTML view.
Definition html.hpp:36
One displayable value in several formats: MIME type to data, richest first. Text formats (text/plain,...
Definition mime_bundle.hpp:35