Documentation ¶
Index ¶
- Variables
- func GetConfigFilePath() (string, error)
- type Client
- func (c *Client) DownloadImage(ctx context.Context, imgToken, outDir string) (string, error)
- func (c *Client) DownloadImageRaw(ctx context.Context, imgToken, imgDir string) (string, []byte, error)
- func (c *Client) GetDocxContent(ctx context.Context, docToken string) (*lark.DocxDocument, []*lark.DocxBlock, error)
- func (c *Client) GetDriveFolderFileList(ctx context.Context, pageToken *string, folderToken *string) ([]*lark.GetDriveFileListRespFile, error)
- func (c *Client) GetWikiName(ctx context.Context, spaceID string) (string, error)
- func (c *Client) GetWikiNodeInfo(ctx context.Context, token string) (*lark.GetWikiNodeRespNode, error)
- func (c *Client) GetWikiNodeList(ctx context.Context, spaceID string, parentNodeToken *string) ([]*lark.GetWikiNodeListRespItem, error)
- type Config
- type FeishuConfig
- type OutputConfig
- type Parser
- func (p *Parser) ParseDocxBlock(b *lark.DocxBlock, indentLevel int) string
- func (p *Parser) ParseDocxBlockBullet(b *lark.DocxBlock, indentLevel int) string
- func (p *Parser) ParseDocxBlockCallout(b *lark.DocxBlock) string
- func (p *Parser) ParseDocxBlockGrid(b *lark.DocxBlock, indentLevel int) string
- func (p *Parser) ParseDocxBlockHeading(b *lark.DocxBlock, headingLevel int) string
- func (p *Parser) ParseDocxBlockImage(img *lark.DocxBlockImage) string
- func (p *Parser) ParseDocxBlockOrdered(b *lark.DocxBlock, indentLevel int) string
- func (p *Parser) ParseDocxBlockPage(b *lark.DocxBlock) string
- func (p *Parser) ParseDocxBlockQuoteContainer(b *lark.DocxBlock) string
- func (p *Parser) ParseDocxBlockTable(t *lark.DocxBlockTable) string
- func (p *Parser) ParseDocxBlockTableCell(b *lark.DocxBlock) string
- func (p *Parser) ParseDocxBlockText(b *lark.DocxBlockText) string
- func (p *Parser) ParseDocxContent(doc *lark.DocxDocument, blocks []*lark.DocxBlock) string
- func (p *Parser) ParseDocxTextElement(e *lark.DocxTextElement, inline bool) string
- func (p *Parser) ParseDocxTextElementTextRun(tr *lark.DocxTextElementTextRun) string
- func (p *Parser) ParseDocxWhatever(body *lark.DocBody) string
Constants ¶
This section is empty.
Variables ¶
View Source
var DocxCodeLang2MdStr = map[lark.DocxCodeLanguage]string{ lark.DocxCodeLanguagePlainText: "", lark.DocxCodeLanguageABAP: "abap", lark.DocxCodeLanguageAda: "ada", lark.DocxCodeLanguageApache: "apache", lark.DocxCodeLanguageApex: "apex", lark.DocxCodeLanguageAssembly: "assembly", lark.DocxCodeLanguageBash: "bash", lark.DocxCodeLanguageCSharp: "csharp", lark.DocxCodeLanguageCPlusPlus: "cpp", lark.DocxCodeLanguageC: "c", lark.DocxCodeLanguageCOBOL: "cobol", lark.DocxCodeLanguageCSS: "css", lark.DocxCodeLanguageCoffeeScript: "coffeescript", lark.DocxCodeLanguageD: "d", lark.DocxCodeLanguageDart: "dart", lark.DocxCodeLanguageDelphi: "delphi", lark.DocxCodeLanguageDjango: "django", lark.DocxCodeLanguageDockerfile: "dockerfile", lark.DocxCodeLanguageErlang: "erlang", lark.DocxCodeLanguageFortran: "fortran", lark.DocxCodeLanguageFoxPro: "foxpro", lark.DocxCodeLanguageGo: "go", lark.DocxCodeLanguageGroovy: "groovy", lark.DocxCodeLanguageHTML: "html", lark.DocxCodeLanguageHTMLBars: "htmlbars", lark.DocxCodeLanguageHTTP: "http", lark.DocxCodeLanguageHaskell: "haskell", lark.DocxCodeLanguageJSON: "json", lark.DocxCodeLanguageJava: "java", lark.DocxCodeLanguageJavaScript: "javascript", lark.DocxCodeLanguageJulia: "julia", lark.DocxCodeLanguageKotlin: "kotlin", lark.DocxCodeLanguageLateX: "latex", lark.DocxCodeLanguageLisp: "lisp", lark.DocxCodeLanguageLogo: "logo", lark.DocxCodeLanguageLua: "lua", lark.DocxCodeLanguageMATLAB: "matlab", lark.DocxCodeLanguageMakefile: "makefile", lark.DocxCodeLanguageMarkdown: "markdown", lark.DocxCodeLanguageNginx: "nginx", lark.DocxCodeLanguageObjective: "objectivec", lark.DocxCodeLanguageOpenEdgeABL: "openedge-abl", lark.DocxCodeLanguagePHP: "php", lark.DocxCodeLanguagePerl: "perl", lark.DocxCodeLanguagePostScript: "postscript", lark.DocxCodeLanguagePower: "powershell", lark.DocxCodeLanguageProlog: "prolog", lark.DocxCodeLanguageProtoBuf: "protobuf", lark.DocxCodeLanguagePython: "python", lark.DocxCodeLanguageR: "r", lark.DocxCodeLanguageRPG: "rpg", lark.DocxCodeLanguageRuby: "ruby", lark.DocxCodeLanguageRust: "rust", lark.DocxCodeLanguageSAS: "sas", lark.DocxCodeLanguageSCSS: "scss", lark.DocxCodeLanguageSQL: "sql", lark.DocxCodeLanguageScala: "scala", lark.DocxCodeLanguageScheme: "scheme", lark.DocxCodeLanguageScratch: "scratch", lark.DocxCodeLanguageShell: "shell", lark.DocxCodeLanguageSwift: "swift", lark.DocxCodeLanguageThrift: "thrift", lark.DocxCodeLanguageTypeScript: "typescript", lark.DocxCodeLanguageVBScript: "vbscript", lark.DocxCodeLanguageVisual: "vbnet", lark.DocxCodeLanguageXML: "xml", lark.DocxCodeLanguageYAML: "yaml", }
Functions ¶
func GetConfigFilePath ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DownloadImage ¶
func (*Client) DownloadImageRaw ¶
func (*Client) GetDocxContent ¶
func (*Client) GetDriveFolderFileList ¶
func (*Client) GetWikiName ¶
func (*Client) GetWikiNodeInfo ¶
func (*Client) GetWikiNodeList ¶
type Config ¶
type Config struct { Feishu FeishuConfig `json:"feishu"` Output OutputConfig `json:"output"` }
func ReadConfigFromFile ¶
func (*Config) WriteConfig2File ¶
type FeishuConfig ¶
type OutputConfig ¶
type Parser ¶
type Parser struct { ImgTokens []string // contains filtered or unexported fields }
func NewParser ¶
func NewParser(config OutputConfig) *Parser
func (*Parser) ParseDocxBlock ¶
func (*Parser) ParseDocxBlockBullet ¶
func (*Parser) ParseDocxBlockCallout ¶
func (*Parser) ParseDocxBlockGrid ¶
func (*Parser) ParseDocxBlockHeading ¶
func (*Parser) ParseDocxBlockImage ¶
func (p *Parser) ParseDocxBlockImage(img *lark.DocxBlockImage) string
func (*Parser) ParseDocxBlockOrdered ¶
func (*Parser) ParseDocxBlockQuoteContainer ¶
func (*Parser) ParseDocxBlockTable ¶
func (p *Parser) ParseDocxBlockTable(t *lark.DocxBlockTable) string
func (*Parser) ParseDocxBlockTableCell ¶
func (*Parser) ParseDocxBlockText ¶
func (p *Parser) ParseDocxBlockText(b *lark.DocxBlockText) string
func (*Parser) ParseDocxContent ¶
func (*Parser) ParseDocxTextElement ¶
func (p *Parser) ParseDocxTextElement(e *lark.DocxTextElement, inline bool) string
func (*Parser) ParseDocxTextElementTextRun ¶
func (p *Parser) ParseDocxTextElementTextRun(tr *lark.DocxTextElementTextRun) string
Click to show internal directories.
Click to hide internal directories.