← 返回 Skills 市场
landylai0604

docx-footnote-reader

作者 landylai0604 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
163
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install docx-footnote-reader
功能描述
Extract footnotes, endnotes, and body text from .docx files using Node.js. Use this skill when you need to read footnote/endnote content from Word documents,...
使用说明 (SKILL.md)

DOCX Footnote Reader

Overview

A skill for extracting footnotes, endnotes, and body text from Microsoft Word (.docx) files. This is particularly useful for:

  • Technical documentation with reference notes
  • Legal documents with citations
  • Academic papers with footnoted references
  • Any document where footnote content is important

Usage

Command Line

node index.js path/to/document.docx

Programmatic API

const { extractFootnotes } = require('docx-footnote-reader');

const result = await extractFootnotes('./document.docx');

console.log(`Body: ${result.body.length} characters`);
console.log(`Footnotes: ${result.footnotes.length} notes`);
console.log(`Endnotes: ${result.endnotes.length} notes`);

// Access individual footnotes
result.footnotes.forEach((note, idx) => {
  console.log(`Footnote ${idx + 1}: ${note}`);
});

Return Value

The extractFootnotes function returns a Promise that resolves to:

{
  body: string;           // Document body text
  footnotes: string[];    // Array of footnote strings
  endnotes: string[];     // Array of endnote strings
}

How It Works

  1. Uses word-extractor library to parse the .docx file
  2. Extracts body text via doc.getBody()
  3. Extracts footnotes via doc.getFootnotes() - handles both string and array return types
  4. Extracts endnotes via doc.getEndnotes() - handles both string and array return types
  5. Splits footnote/endnote strings by newline and filters empty entries

Important Notes

  • The word-extractor library returns footnotes as a single string separated by newlines, not an array
  • This skill automatically handles both string and array return types
  • Empty footnotes/endnotes are filtered out
  • Each footnote string is trimmed of whitespace

Dependencies

  • Node.js >= 14
  • word-extractor (automatically installed via npm)

Installation

cd docx-footnote-reader
npm install

Example Output

========================================
Extraction Result
========================================

Body length: 58057 characters

Footnotes count: 73

Footnotes:

Footnote 1:
Description about error injection in this document, if the context does not mention single-frame multi-bit or Burst, it refers to single-bit error injection.

Footnote 2:
This feature is only supported on PG2K100 devices.

...

Troubleshooting

"Cannot find module 'word-extractor'"

Run npm install in the skill directory.

Empty footnotes array

  • Check that the document actually contains footnotes
  • Verify the file path is correct
  • Try opening the document in Word to confirm footnotes exist

Footnotes merged into one string

This is expected behavior from word-extractor. This skill automatically splits them by newlines.

File Structure

docx-footnote-reader/
├── index.js        # Main extraction logic
├── package.json    # npm dependencies
├── SKILL.md        # This file
└── LICENSE.txt     # License terms
安全使用建议
This skill appears to do exactly what it says: parse a .docx and return body/footnotes/endnotes using the 'word-extractor' npm package. Before installing: (1) confirm the license (SKILL.md says 'Proprietary' but LICENSE.txt is Apache 2.0), (2) review the 'word-extractor' npm package (version ^1.0.0) for trustworthiness if you run it on sensitive documents, and (3) run npm install and use the tool in a controlled environment for untrusted documents since it will process whatever .docx you pass in. If you rely on strict licensing, ask the publisher to clarify the correct license.
功能分析
Type: OpenClaw Skill Name: docx-footnote-reader Version: 1.0.0 The skill is a straightforward utility for extracting text, footnotes, and endnotes from Word documents using the legitimate 'word-extractor' library. The code in index.js contains no network activity, unauthorized file system access, or data exfiltration logic, and the SKILL.md instructions are purely functional without any prompt injection attempts.
能力评估
Purpose & Capability
Name/description match the implementation: index.js and SKILL.md implement a Node.js extractor using the 'word-extractor' library. One minor inconsistency: SKILL.md lists the license as 'Proprietary' while LICENSE.txt contains the Apache 2.0 text — clarify which license applies.
Instruction Scope
Runtime instructions and SKILL.md only describe reading the provided .docx file and returning body/footnotes/endnotes. The code only reads the file path given on the CLI or via the exported function and does not access other files, environment variables, or external endpoints.
Install Mechanism
This is an instruction+code skill with no install spec. It uses a normal npm dependency ('word-extractor' in package.json). npm install will fetch that package from the registry — expected for a Node.js skill.
Credentials
No environment variables, credentials, or config paths are requested. The skill's needs are minimal and proportionate to its task.
Persistence & Privilege
Skill is not always-enabled and does not request persistent/system-wide privileges or modify other skills/config. It exports a function and provides a CLI — normal behavior.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install docx-footnote-reader
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /docx-footnote-reader 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of docx-footnote-reader. - Extracts footnotes, endnotes, and body text from .docx files. - Supports both command line and Node.js API usage. - Handles different return formats from underlying word-extractor library. - Filters and trims empty or whitespace-only notes. - Designed for technical, legal, and academic documents where footnote content is important.
元数据
Slug docx-footnote-reader
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

docx-footnote-reader 是什么?

Extract footnotes, endnotes, and body text from .docx files using Node.js. Use this skill when you need to read footnote/endnote content from Word documents,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 163 次。

如何安装 docx-footnote-reader?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install docx-footnote-reader」即可一键安装,无需额外配置。

docx-footnote-reader 是免费的吗?

是的,docx-footnote-reader 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

docx-footnote-reader 支持哪些平台?

docx-footnote-reader 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 docx-footnote-reader?

由 landylai0604(@landylai0604)开发并维护,当前版本 v1.0.0。

💬 留言讨论