tomarkdown

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRich

func ConvertRich(t notion.RichText) string

func ConvertRichText

func ConvertRichText(t []notion.RichText) string

Types

type MdBlock

type MdBlock struct {
	notion.Block
	Depth int
	Extra map[string]interface{}
}

type ToMarkdown

type ToMarkdown struct {
	FrontMatter     map[string]interface{}
	ContentBuffer   *bytes.Buffer
	ImgSavePath     string
	ImgVisitPath    string
	ContentTemplate string
	// contains filtered or unexported fields
}

func New

func New() *ToMarkdown

func (*ToMarkdown) EnableExtendedSyntax

func (tm *ToMarkdown) EnableExtendedSyntax(target string)

func (*ToMarkdown) ExtendedSyntaxEnabled

func (tm *ToMarkdown) ExtendedSyntaxEnabled() bool

func (*ToMarkdown) GenBlock

func (tm *ToMarkdown) GenBlock(bType notion.BlockType, block MdBlock) error

func (*ToMarkdown) GenContentBlocks

func (tm *ToMarkdown) GenContentBlocks(blocks []notion.Block, depth int) error

func (*ToMarkdown) GenFrontMatter

func (tm *ToMarkdown) GenFrontMatter(writer io.Writer) error

func (*ToMarkdown) GenerateTo

func (tm *ToMarkdown) GenerateTo(page notion.Page, blocks []notion.Block, writer io.Writer) error

func (*ToMarkdown) WithFrontMatter

func (tm *ToMarkdown) WithFrontMatter(page notion.Page)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL