feishu-docx
v0.7.0
Published
Convert Feishu Docx into other format (Markdown, HTML ...)
Downloads
329
Readme
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