Versions in this module Expand all Collapse all v1 v1.1.9 Nov 26, 2024 v1.1.8 Nov 26, 2024 Changes in this version + const Bilibili + const Gist + const Jsfiddle + const PositionProp + const RegexBili + const RegexJsfiddle + const RegexTwitterId + const RegexTwitterUser + const RegexYoutube + const TagsProp + const Twitter + var ColorMap = map[string]string + func CamelCaseToUnderscore(s string) string + func ConvertRich(t notion.RichText) string + func ConvertRichText(t []notion.RichText) string + func ConvertRow(r *notion.TableRowBlock, fmt string) string + func ConvertTable(rows []notion.Block) string + func DefaultConfigInit() error + func FindTextP(ori string, pre string) string + func FindUrlContext(regex string, url string) string + func GetBlockType(block any) string + func HasEmpty(s string) bool + func RemoveSuffix(str string) (string, error) + func Run(ns *NotionSite) error + type Config struct + type Files struct + CurrentNTPL string + DefaultGalleryFolderName string + DefaultMarkdownName string + DefaultMediaFolderName string + FileFolderPath string + FileName string + FilePath string + HomePath string + MediaPath string + Permission uint32 + Position string + func NewFiles(config Config) (files *Files) + func (files *Files) DownloadMedia(dynamicMedia any) error + type FrontMatter struct + AccessPath string + Author string + Avatar string + Categories []string + CreateAt string + Description string + Draft bool + ExpiryDate string + Image string + IsTranslated bool + Keywords []string + LastMod string + MetaDescription string + MetaTitle string + Position string + ShowComments bool + Slug string + Status string + Tags []string + Title string + Weight int64 + type Markdown struct + GroupByMonth bool + HomePath string + ImagePublicLink string + Template string + type MdBlock struct + Depth int + Extra map[string]any + type MediaBlock struct + type Notion struct + DatabaseID string + FilterProp string + FilterValue []string + PublishedValue string + type NotionAPI struct + Client *notion.Client + func NewAPI() *NotionAPI + func (api *NotionAPI) CheckHasChildDataBase(blocks []notion.Block, cb func(bool, string)) bool + func (api *NotionAPI) FindBlockChildrenCommentLoop(client *notion.Client, blockArr []notion.Block, cursor string) (blocks []notion.Comment, err error) + type NotionCache struct + ChildDatabaseId string + ParentFilesInfo *Files + ParentPropInfo *NotionProp + func NewNotionCaches() []*NotionCache + type NotionCaches struct + TODO []*NotionCache + func (caches *NotionCaches) SetCache(blockId string) + type NotionProp struct + Author string + Avatar string + Categories []string + CreateAt *time.Time + Description string + ExpiryDate time.Time + FileName string + IsCustomNameFile bool + IsSettingFile bool + LastMod time.Time + Name string + Position string + PublishDate time.Time + ShowComments *bool + Slug string + Status string + Tags []string + Title string + Types string + func NewNotionProp(page notion.Page) (np *NotionProp) + func (np *NotionProp) GetFileName() string + func (np *NotionProp) GetTitle() (title string) + func (np *NotionProp) IsCustomNameMdFile() bool + func (np *NotionProp) IsFolder() bool + func (np *NotionProp) IsSetting() bool + type NotionSite struct + func NewNotionSite(api *NotionAPI, tm *ToMarkdown, files *Files, config Config, ...) *NotionSite + func (ns *NotionSite) SetFileInfo(position string) + type ToMarkdown struct + ArticleFolderPath string + ContentBuffer *bytes.Buffer + ContentTemplate string + Files *Files + FrontMatter map[string]any + ImgSavePath string + ImgVisitPath string + NotionProps *NotionProp + func New() *ToMarkdown + func (tm *ToMarkdown) EnableExtendedSyntax(target string) + func (tm *ToMarkdown) ExtendedSyntaxEnabled() bool + func (tm *ToMarkdown) GenBlock(bType string, block MdBlock, addMoreTag bool, skip bool) error + func (tm *ToMarkdown) GenContentBlocks(blocks []notion.Block, depth int) error + func (tm *ToMarkdown) GenFrontMatter(writer io.Writer) (*FrontMatter, error) + func (tm *ToMarkdown) GenerateTo(ns *NotionSite) (*FrontMatter, error) + func (tm *ToMarkdown) WithFrontMatter(page notion.Page)