飞书文档转 markdown 详细教程
基于项目:https://github.com/Wsine/feishu2md
如何使用

在线版
访问 ++https://feishu2md.onrender.com/++ 粘贴文档链接即可,文档链接可以通过 分享 > 开启链接分享 > 复制链接 获得。


点击下载之后,会提示 Please wait. It may take a while to response.
基本都是秒下好,文件名应该是根据标题编码的,我下载两次文件名一样
下载好后,在 vscode 中查看

对比一下毫无破绽有没有

命令行版
命令行版需要借助 飞书 平台的 api,所以让我们先创建一个飞书应用,用以获取 api
获取 API Token
点击链接 https://open.feishu.cn/app进入飞书****开发者平台

创建企业 自建应用 ,信息随意填写
点击创建企业 自建应用

按照提示填写对应的信息

选择测试企业和人员,创建测试企业,绑定应用,切换至测试版本


打开权限管理,云文档 ,开通所有只读权限
- 「查看、评论和导出文档」权限
docs:doc:readonly
- 「查看 DocX 文档」权限
docx:document:readonly
- 「查看、评论和下载云空间中所有文件」权限
drive:drive:readonly
- 「查看和下载云空间中的文件」权限
drive:file:readonly






设置好权限后创建版本,上线



发布成功之后,就可以获取 API ID 和密钥了


https://github.com/Wsine/feishu2md/releases 点击链接下载对应平台的可执行程序

下载后可以看到一个压缩包

把它解压

解压后里面有一个 exe 文件
右键,选择在终端中打开

输入指令./feishu2md -h 即可查看其帮组文档

通过 feishu2md config --appId <your_id> --appSecret <your_secret>
命令即可生成该工具的配置文件。

通过 命令可以查看配置文件路径以及是否成功配置。

通过 feishu2md dl <your feishu docx url>
直接下载,文档链接可以通过 分享 > 开启链接分享 > 复制链接 获得。




问题
- request Drive#GetWikiNode failed: code: 99991672, msg: Access denied. One of the following scopes is required: [wiki:wiki, wiki:wiki:readonly]

