Install
openclaw skills install docx-footnote-readerExtract 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, such as technical specifications, legal documents, or academic papers.
openclaw skills install docx-footnote-readerA skill for extracting footnotes, endnotes, and body text from Microsoft Word (.docx) files. This is particularly useful for:
node index.js path/to/document.docx
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}`);
});
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
}
word-extractor library to parse the .docx filedoc.getBody()doc.getFootnotes() - handles both string and array return typesdoc.getEndnotes() - handles both string and array return typesword-extractor library returns footnotes as a single string separated by newlines, not an arraycd docx-footnote-reader
npm install
========================================
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.
...
Run npm install in the skill directory.
This is expected behavior from word-extractor. This skill automatically splits them by newlines.
docx-footnote-reader/
├── index.js # Main extraction logic
├── package.json # npm dependencies
├── SKILL.md # This file
└── LICENSE.txt # License terms