Documentation
¶
Index ¶
Constants ¶
View Source
const ( PlainText = "text/plain" MarkdownText = "text/markdown" Stdout = "application/vnd.jupyter.stdout" // Custom mime-type for stream output to stdout. Stderr = "application/vnd.jupyter.stderr" // Custom mime-type for stream output to stderr. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Markdown ¶ added in v0.3.0
type Markdown struct {
Source MultilineString `json:"source"`
}
Markdown defines the schema for a "markdown" cell.
type MultilineString ¶
type MultilineString []string
MultilineString stores multi-line text as strings or string arrays in the raw JSON. TODO(optimization): check if we can scan into [][]byte directly
func (MultilineString) Text ¶
func (s MultilineString) Text() (txt []byte)
Text concatenates all lines in a multiline string into a single byte slice.
func (*MultilineString) UnmarshalJSON ¶
func (s *MultilineString) UnmarshalJSON(data []byte) error
type Notebook ¶
type Notebook struct {
VersionMajor int `json:"nbformat"`
VersionMinor int `json:"nbformat_minor"`
Metadata json.RawMessage `json:"metadata"` // TODO: omitempty
}
type Raw ¶ added in v0.3.0
type Raw struct {
Source MultilineString `json:"source"`
Metadata RawCellMetadata `json:"metadata"`
}
Raw defines the schema for a "raw" cell.
type RawCellMetadata ¶ added in v0.3.0
type RawCellMetadata struct {
Format *string `json:"format"`
RawMimeType *string `json:"raw_mimetype"`
}
RawCellMetadata may specify a target conversion format.
func (*RawCellMetadata) MimeType ¶ added in v0.3.0
func (raw *RawCellMetadata) MimeType() string
MimeType returns a more specific mime-type if one is provided and "text/plain" otherwise.
Click to show internal directories.
Click to hide internal directories.