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.2.tar.gz (22.1 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.2-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feishu_wiki_md-0.3.2.tar.gz
  • Upload date:
  • Size: 22.1 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.2.tar.gz
Algorithm Hash digest
SHA256 2e66fda15ebc70861d7eea15d23d5a85261dfee1a3d5ab8e57a662f639aa422e
MD5 a89117d8375928f6375af577e4b0a7da
BLAKE2b-256 638acd2bb3884f6cc722c36fd3f5d2fad9787286e8d279abd24593bb32f8b96e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: feishu_wiki_md-0.3.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 60d5d6923883bac678e1333a71d56102c3aea9cb8ce9a9f6b6f96b1afead414d
MD5 02e43a66351d60f8fe962dd12ee5a66b
BLAKE2b-256 f93048eeb13fefbb40b41320d5770ed9f4b1307bebd299530a0036b20f945fcb

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