Documentation
¶
Index ¶
- Constants
- type Notebook
- func (nb *Notebook) AddContent(title string, content string)
- func (nb *Notebook) AddHeader(id string, content string)
- func (nb *Notebook) Close() error
- func (nb *Notebook) Print(a ...any) (n int, err error)
- func (nb *Notebook) Printf(format string, a ...any) (n int, err error)
- func (nb *Notebook) Println(a ...any) (n int, err error)
- func (nb *Notebook) Render(w io.Writer) error
Constants ¶
View Source
const HeaderCellStyle = "cell-style" // ID to set a style header to style cells. A default value is provided.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notebook ¶
type Notebook struct {
Title string // The notebook title.
Output string // A filename to save the Notebook to.
// contains filtered or unexported fields
}
Notebook is a struct to receive all the contents of a notebook in memory.
func New ¶
func New() *Notebook
New creates a new Notebook.
Output filename is initialized to be the os.Arg[0] +'.html'.
func (*Notebook) AddContent ¶
AddContent appends html content into a new Cell.
func (*Notebook) AddHeader ¶
AddHeader appends a header statement, once per ID. Calling AddHeader with the same ID will overwrite the existing value.
Click to show internal directories.
Click to hide internal directories.