搜索

PythonReactSEOPDF
OpenClaw

feishu-doc-reader

Read and extract content from all Feishu (Lark) document types using the official Feishu Open API

alfredxia-ai0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install alfredxia-ai/feishu-document-reader

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Feishu Document Reader

This skill enables reading and extracting content from all Feishu (Lark) document types using the official Feishu Open API.

Configuration

Set Up the Skill
  1. Create the configuration file at ./reference/feishu_config.json with your Feishu app credentials:
{
  "app_id": "your_feishu_app_id_here",
  "app_secret": "your_feishu_app_secret_here"
}
  1. Make sure the scripts are executable:
chmod +x scripts/read_doc.sh
chmod +x scripts/read_feishu.sh
chmod +x scripts/get_blocks.sh

Security Note: The configuration file should be kept secure and not committed to version control. Consider using proper file permissions (chmod 600 ./reference/feishu_config.json).

Usage

Unified Document Reader (推荐)

使用统一文档读取器可以自动识别并读取所有支持的文档类型:

# 自动识别文档类型并读取
./scripts/read_feishu.sh "docx_xxxxxxxxxxxxxx"
./scripts/read_feishu.sh "sheet_xxxxxxxxxxxxx"
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx"
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxx"

# 从URL直接读取
./scripts/read_feishu.sh "https://xxx.feishu.cn/docx/xxxxx"

# 指定文档类型
./scripts/read_feishu.sh "token" --type bitable

# 格式化JSON输出
./scripts/read_feishu.sh "token" --pretty

# 只输出文本内容
./scripts/read_feishu.sh "docx_token" --output text
Wiki Knowledge Base (知识库)

读取飞书知识库节点和内容:

# 读取单个Wiki节点
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxxx" --type wiki

# 读取整个知识空间
./scripts/read_feishu.sh --wiki-space "SPACE_ID"

# 递归读取所有子节点内容
./scripts/read_feishu.sh --wiki-space "SPACE_ID" --recursive
Bitable (多维表格)

读取飞书多维表格数据:

# 读取多维表格(包含所有数据表和记录)
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx" --type bitable
Basic Document Reading
# 读取新版文档
./scripts/read_doc.sh "docx_xxxxxxxxxxxxxx"

# 读取电子表格
./scripts/read_doc.sh "sheet_xxxxxxxxxxxxx" sheet

# 读取多维表格
./scripts/read_doc.sh "...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/alfredxia-ai/feishu-document-reader
Version
—
Commit
729425df188fe3eb461658c5594af26a9e9b4f93
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Feishu Document Reader - 飞书文档统一读取器

全面支持飞书(Lark)各类在线文档的读取,包括文档、表格、知识库等。

Features

  • 多文档类型支持:
    • ✅ Docx (新版文档) - 完整blocks结构和内容
    • ✅ Doc (旧版文档) - 基本支持
    • ✅ Sheet (电子表格) - 完整数据读取
    • ✅ Bitable (多维表格) - 字段和记录完整提取
    • ✅ Wiki (知识库) - 节点信息和内容读取
  • 自动类型识别: 根据token或URL自动识别文档类型
  • 统一接口: 一个命令读取所有类型
  • 安全认证: 自动令牌管理和刷新
  • 完善的错误处理: 详细的错误信息和诊断

Quick Start

1. Configuration

Create ./reference/feishu_config.json:

{
  "app_id": "your_feishu_app_id",
  "app_secret": "your_feishu_app_secret"
}

Set proper permissions:

chmod 600 ./reference/feishu_config.json
chmod +x scripts/*.sh
2. Usage
统一读取器(推荐):
# 自动识别文档类型
./scripts/read_feishu.sh "docx_your_document_token"
./scripts/read_feishu.sh "sheet_xxxxxxxxxxxxx"
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx"
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxx"

# 从URL读取
./scripts/read_feishu.sh "https://xxx.feishu.cn/docx/xxxxx"

# 格式化输出
./scripts/read_feishu.sh "docx_token" --pretty
读取知识库:
# 读取单个节点
./scripts/read_feishu.sh "wikcn_token" --type wiki

# 读取整个知识空间
./scripts/read_feishu.sh --wiki-space "SPACE_ID" --recursive
读取多维表格:
./scripts/read_feishu.sh "base_token" --type bitable --pretty
Python直接调用:
python scripts/feishu_reader.py "docx_token" --pretty
python scripts/feishu_reader.py "base_token" --type bitable
python scripts/feishu_reader.py --wiki-space "SPACE_ID"
3. Output Format

输出包含以下内容(根据文档类型有所不同):

文档 (docx/doc):

  • document: 文档元信息
  • blocks: 完整的blocks结构
  • text_content: 提取的纯文本

电子表格 (sheet):

  • spreadsheet: 表格元信息
  • sheets: 各工作表数据

多维表格 (bitable):

  • app: 多维表格元信息
  • tables: 数据表列表(含字段和记录)...

来源内容

SKILL.md
# Feishu Document Reader

This skill enables reading and extracting content from all Feishu (Lark) document types using the official Feishu Open API.

## Configuration

### Set Up the Skill

1. Create the configuration file at `./reference/feishu_config.json` with your Feishu app credentials:

```json
{
  "app_id": "your_feishu_app_id_here",
  "app_secret": "your_feishu_app_secret_here"
}
```

2. Make sure the scripts are executable:
```bash
chmod +x scripts/read_doc.sh
chmod +x scripts/read_feishu.sh
chmod +x scripts/get_blocks.sh
```

**Security Note**: The configuration file should be kept secure and not committed to version control. Consider using proper file permissions (`chmod 600 ./reference/feishu_config.json`).

## Usage

### Unified Document Reader (推荐)

使用统一文档读取器可以自动识别并读取所有支持的文档类型:

```bash
# 自动识别文档类型并读取
./scripts/read_feishu.sh "docx_xxxxxxxxxxxxxx"
./scripts/read_feishu.sh "sheet_xxxxxxxxxxxxx"
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx"
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxx"

# 从URL直接读取
./scripts/read_feishu.sh "https://xxx.feishu.cn/docx/xxxxx"

# 指定文档类型
./scripts/read_feishu.sh "token" --type bitable

# 格式化JSON输出
./scripts/read_feishu.sh "token" --pretty

# 只输出文本内容
./scripts/read_feishu.sh "docx_token" --output text
```

### Wiki Knowledge Base (知识库)

读取飞书知识库节点和内容:

```bash
# 读取单个Wiki节点
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxxx" --type wiki

# 读取整个知识空间
./scripts/read_feishu.sh --wiki-space "SPACE_ID"

# 递归读取所有子节点内容
./scripts/read_feishu.sh --wiki-space "SPACE_ID" --recursive
```

### Bitable (多维表格)

读取飞书多维表格数据:

```bash
# 读取多维表格(包含所有数据表和记录)
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx" --type bitable
```

### Basic Document Reading

```bash
# 读取新版文档
./scripts/read_doc.sh "docx_xxxxxxxxxxxxxx"

# 读取电子表格
./scripts/read_doc.sh "sheet_xxxxxxxxxxxxx" sheet

# 读取多维表格
./scripts/read_doc.sh "...
README
# Feishu Document Reader - 飞书文档统一读取器

全面支持飞书(Lark)各类在线文档的读取,包括文档、表格、知识库等。

## Features

- **多文档类型支持**: 
  - ✅ Docx (新版文档) - 完整blocks结构和内容
  - ✅ Doc (旧版文档) - 基本支持
  - ✅ Sheet (电子表格) - 完整数据读取
  - ✅ Bitable (多维表格) - 字段和记录完整提取
  - ✅ Wiki (知识库) - 节点信息和内容读取
- **自动类型识别**: 根据token或URL自动识别文档类型
- **统一接口**: 一个命令读取所有类型
- **安全认证**: 自动令牌管理和刷新
- **完善的错误处理**: 详细的错误信息和诊断

## Quick Start

### 1. Configuration

Create `./reference/feishu_config.json`:

```json
{
  "app_id": "your_feishu_app_id",
  "app_secret": "your_feishu_app_secret"
}
```

Set proper permissions:
```bash
chmod 600 ./reference/feishu_config.json
chmod +x scripts/*.sh
```

### 2. Usage

#### 统一读取器(推荐):
```bash
# 自动识别文档类型
./scripts/read_feishu.sh "docx_your_document_token"
./scripts/read_feishu.sh "sheet_xxxxxxxxxxxxx"
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx"
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxx"

# 从URL读取
./scripts/read_feishu.sh "https://xxx.feishu.cn/docx/xxxxx"

# 格式化输出
./scripts/read_feishu.sh "docx_token" --pretty
```

#### 读取知识库:
```bash
# 读取单个节点
./scripts/read_feishu.sh "wikcn_token" --type wiki

# 读取整个知识空间
./scripts/read_feishu.sh --wiki-space "SPACE_ID" --recursive
```

#### 读取多维表格:
```bash
./scripts/read_feishu.sh "base_token" --type bitable --pretty
```

#### Python直接调用:
```bash
python scripts/feishu_reader.py "docx_token" --pretty
python scripts/feishu_reader.py "base_token" --type bitable
python scripts/feishu_reader.py --wiki-space "SPACE_ID"
```

### 3. Output Format

输出包含以下内容(根据文档类型有所不同):

**文档 (docx/doc)**:
- `document`: 文档元信息
- `blocks`: 完整的blocks结构
- `text_content`: 提取的纯文本

**电子表格 (sheet)**:
- `spreadsheet`: 表格元信息
- `sheets`: 各工作表数据

**多维表格 (bitable)**:
- `app`: 多维表格元信息
- `tables`: 数据表列表(含字段和记录)...

相关技能

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

139mail

chang-tong

139邮箱邮件收发 Skill - 支持 IMAP/SMTP 协议,兼容139/QQ/163/Gmail等主流邮箱 功能: 1. 发送邮件(SMTP) 2. 接收邮件(IMAP) 3. 查看收件箱列表 4. 查看未读邮件 当用户提到 "发邮件"、"收邮件"、"查看邮件"、"邮箱"...