Git Product home page Git Product logo

feishu2md's Introduction

Feishu2Md

Golang - feishu2md Unittest Release Docker - feishu2md Render - feishu2md

这是一个下载飞书文档为 Markdown 文件的工具,使用 Go 语言实现。 在https://github.com/Wsine/feishu2md项目上进行的修改,自己使用顺便共享.

获取 API Token

配置文件需要填写 APP ID 和 APP SECRET 信息,请参考 飞书官方文档 获取。推荐设置为

  • 进入飞书开发者后台
  • 创建企业自建应用,信息随意填写
  • 选择测试企业和人员,创建测试企业,绑定应用,切换至测试版本
  • (重要)打开权限管理,云文档,开通所有只读权限
    • 「查看、评论和导出文档」权限 docs:doc:readonly
    • 「查看 DocX 文档」权限 docx:document:readonly
    • 「查看、评论和下载云空间中所有文件」权限 drive:drive:readonly
    • 「查看和下载云空间中的文件」权限 drive:file:readonly
  • 打开凭证与基础信息,获取 App ID 和 App Secret

wiki专用

  • 新建群组,把应用加入到群内(添加机器人选项)
  • 在知识库设置里面->成员设置->把群组添加进来.

请我喝咖啡

命令行版本

借助 Go 语言跨平台的特性,已编译好了主要平台的可执行文件,可以在 Release 中下载,并将相应平台的 feishu2md 可执行文件放置在 PATH 路径中即可。

查阅帮助文档

$ feishu2md -h
NAME:
   feishu2md - download feishu/larksuite document to markdown file

USAGE:
   feishu2md [global options] command [command options] [arguments...]

VERSION:
   v2-1f5416e

COMMANDS:
   config   Read config file or set field(s) if provided
   dump     Dump json response of the OPEN API
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)

$ feishu2md config -h
NAME:
   feishu2md config - Read config file or set field(s) if provided

USAGE:
   feishu2md config [command options] [arguments...]

OPTIONS:
   --appId value      Set app id for the OPEN API
   --appSecret value  Set app secret for the OPEN API
   --help, -h         show help (default: false)

生成配置文件

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

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

更多的配置选项请手动打开配置文件更改。

下载为 Markdown

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

示例:

$ feishu2md https://domain.feishu.cn/docs/docxtoken

感谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.