Git Product home page Git Product logo

feishu2md-1's Introduction

Feishu2Md

unittest

这是一个下载飞书文档为 Markdown 文件的工具,使用 Go 语言实现。

请看这里:招募有需求和有兴趣的开发者,共同探讨开发维护,有兴趣请联系。

如何使用

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

查阅帮助文档

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

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

VERSION:
   v1.0.0

COMMANDS:
   config   read config file or set field(s) if provided
   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)

获取 API Token

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

  • 进入飞书开发者后台

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

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

  • (重要)打开权限管理,云文档,开通所有只读权限

    • 「查看、评论和导出文档」权限 docs:doc:readonly
    • 「查看 DocX 文档」权限 docx:document:readonly
    • 「查看、评论和下载云空间中所有文件」权限 drive:drive:readonly
    • 「查看和下载云空间中的文件」权限 drive:file:readonly
  • 打开凭证与基础信息,获取 App ID 和 App Secret

生成配置文件

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

通过 feishu2md config 命令可以查看是否成功配置。

生成的配置文件路径为:

  • Windows: %AppData%/feishu2md/config.json

  • Linux: $XDG_CONFIG_HOME/feishu2md/config.json

  • Mac: $XDG_CONFIG_HOME/feishu2md/config.json

如无配置 XDG_CONFIG_HOME 环境变量,则默认为 ~/.config 目录。

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

下载为 Markdown

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

示例:

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

感谢

feishu2md-1's People

Contributors

hasbai avatar sko00o avatar wsine avatar

Watchers

 avatar

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.