Skip to main content

Feishu document toolkit: download docs via API or convert exported Word to AI-friendly Markdown

Project description

feishu-wiki-md

飞书文档工具:通过 API 下载飞书文档 / 将飞书导出的 Word 转为 AI 友好的 Markdown。

功能

下载飞书文档 (dl)

  • 通过飞书链接直接下载文档并转为 Markdown
  • 支持普通文档和知识库 Wiki
  • 自动下载文档中的图片

Word 转 Markdown (wm)

  • 将飞书导出的 .docx 文件转为干净的 Markdown
  • 支持标题、列表、表格、图片、超链接、行内格式
  • AI 友好后处理:标题层级归一化、空白折叠、Word 元素清理

安装

# 一键运行(无需安装)
uvx feishu-wiki-md --help

# 或本地安装
uv tool install .

使用

1. 登录飞书

首次使用 dl 前需要登录(需要先在飞书开放平台创建应用):

feishu-wiki-md login
# 或指定 app 凭据
feishu-wiki-md login --app-id cli_xxx --app-secret xxx

2. 下载飞书文档

# 下载到当前目录
feishu-wiki-md dl https://xxx.feishu.cn/docx/ABC123

# 指定输出目录
feishu-wiki-md dl https://xxx.feishu.cn/wiki/XYZ456 -o ./docs/

3. Word 转 Markdown

# 转换单个文件(输出到同目录)
feishu-wiki-md wm 需求文档.docx

# 批量转换
feishu-wiki-md wm *.docx -o ./output/

输出规则

  • 无图片需求文档.docx需求文档.md
  • 有图片
    需求文档/
    ├── index.md
    └── assets/
        ├── image001.png
        └── image002.png
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feishu_wiki_md-0.3.3.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feishu_wiki_md-0.3.3-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file feishu_wiki_md-0.3.3.tar.gz.

File metadata

  • Download URL: feishu_wiki_md-0.3.3.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for feishu_wiki_md-0.3.3.tar.gz
Algorithm Hash digest
SHA256 58d6beccade1ba4019101df86749eab22d6ea8e6aa3b5c487edc10530a429b75
MD5 90d5c86bd01895ff3e7dd8c6d48b52fe
BLAKE2b-256 c3ee3540c04750558bc4063312ef1f1d350709c8c1e9c72e6e03d1eb9e2ff6d8

See more details on using hashes here.

File details

Details for the file feishu_wiki_md-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: feishu_wiki_md-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for feishu_wiki_md-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3bce1a0f475b6559134786a3abfd7d94f485568d81b2cc2d821fbcc0a6f7b2c0
MD5 1e2f38c9d48a80c0f3248ff265338bba
BLAKE2b-256 9bc7926f1d2273d2c7a53b0bf5abac6cb9966c8979d52f7359a70f2228a92e49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page