feishu-docx

v0.6.7
Convert Feishu Docx into other format (Markdown, HTML ...)

Feishu Docx

Convert Feishu Docx into other formats (Markdown, HTML ...)

Visit https://github.com/longbridgeapp/feishu-pages to learn more.

How to add new fixture

https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document/list

Installation

yarn add feishu-docx

Usage

import { MarkdownRenderer } from 'feishu-docx'

// Load docx JSON from file
const docx = fs.readFileSync('test.json')
const render = new MarkdownRenderer(docx)
const text = render.parse();
const fileTokens = render.fileTokens;

Now fileTokens is:

{
  "TVEyb1pmWo8oIwxyL3kcIfrrnGd": {
      token: 'TVEyb1pmWo8oIwxyL3kcIfrrnGd',
      type: 'file',
  }
}

License

MIT

npm i feishu-docx

Metadata

  • MIT
  • Whatever
  • Jason Lee
  • released 6/4/2024

Downloads

Maintainers