返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
f

feishu-md2blocks

Insert rich Markdown content (including tables) into Feishu documents. Use when feishu_doc write/append fails with tables, or when inserting complex formatted content (tables, code blocks, nested lists) into an existing document at a specific position.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
262
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

feishu-md2blocks

# Feishu Markdown to Blocks Insert Markdown content—including tables—into Feishu documents via the block convert + descendant API. ## When to Use - `feishu_doc` `write` replaces the entire document; use this to **insert** content at a position - `feishu_doc` `create_table_with_values` has limitations for larger tables - You need to insert tables, code blocks, or complex nested content into an existing doc ## Usage ```bash # Insert from file (appends to document end) python3 <skill_dir>/scripts/md2blocks.py <doc_token> content.md # Insert from stdin echo "| A | B |\n|---|---|\n| 1 | 2 |" | python3 <skill_dir>/scripts/md2blocks.py <doc_token> - # Insert after a specific block python3 <skill_dir>/scripts/md2blocks.py <doc_token> content.md --after <block_id> # Replace all content python3 <skill_dir>/scripts/md2blocks.py <doc_token> content.md --replace ``` ## How It Works 1. Calls `POST /docx/v1/documents/blocks/convert` to convert Markdown → block structures 2. Removes `merge_info` from table blocks (read-only field that causes insertion errors) 3. Calls `POST /docx/v1/documents/{doc}/blocks/{parent}/descendant` to insert blocks The descendant API handles nested structures (tables with cells containing text) that the simpler `/children` API cannot. ## Position Control The `--after <block_id>` option inserts content right after the specified block. The script finds the block's index automatically. **Key detail:** The `/descendant` API's `index` parameter **must be in the request body**, not as a URL query parameter. Passing `?index=N` in the URL is silently ignored (content appends to end). The script handles this correctly. ## Supported Markdown Text, headings (h1-h9), bullet lists, ordered lists, code blocks, quotes, tables, todo items, dividers. ## Limitations - Images in Markdown are not automatically uploaded; they require separate upload + patch steps - Max 1000 blocks per insert call; split large documents if needed - Requires `docx:document.block:convert` permission on the Feishu app - Document edit rate limit: 3 ops/sec per document ## Reference For complete block-level API reference, see the **feishu-block-ops** skill which covers: - All block APIs (create/read/update/delete/batch) - Block type reference, text element types - Table operation patterns (batch edit, merge cells) - Common patterns and gotchas

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 feishu-md2blocks-1776272537 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 feishu-md2blocks-1776272537 技能

通过命令行安装

skillhub install feishu-md2blocks-1776272537

下载

⬇ 下载 feishu-md2blocks v1.0.0(免费)

文件大小: 4.02 KB | 发布时间: 2026-4-16 16:38

v1.0.0 最新 2026-4-16 16:38
- Initial release of feishu-md2blocks: Insert rich Markdown (including tables, code blocks, and nested lists) into Feishu documents at specific positions.
- Supports converting Markdown to Feishu blocks, removing problematic merge info from tables, and precise positioning using the descendant API.
- Offers command line usage to append, insert after a block, or fully replace document content.
- Handles complex content that feishu_doc write/append cannot, with support for most standard Markdown features.
- Documents key API details, limitations, and prerequisites for use.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部