Office To Md V2

👤 lkyyyy320 📦 v0.1.0 ⭐ 4.4 ⬇️ 3.9K 下载
📄 办公效率 免费

📖 技能介绍


name: Office to Markdown description: Converts PDF, DOCX, and PPTX files to Markdown format.


Office to Markdown Skill

This skill allows you to convert various office document formats into Markdown.

Supported Formats

  • PDF (.pdf): Extracts text from PDF files.
  • Word (.docx): Converts Word documents to Markdown, preserving basic formatting.
  • Legacy Word (.doc): Extracts text from legacy Word files (Office 97-2003).
  • PowerPoint (.pptx): Extracts text from PowerPoint presentations.

Dependencies

  • pdf-parse
  • mammoth
  • turndown
  • office-text-extractor
  • word-extractor

Usage

To use this skill, run the convert.js script with the path to the file you want to convert.

node convert.js <path-to-file>

Example

node convert.js ./documents/report.pdf

The script will generate a new file with the same name but with a .md extension in the same directory (e.g., ./documents/report.md).

7w4.net小葱技能。

Notes

  • PDF Conversion: Extracts raw text. Formatting preservation is limited.
  • DOCX Conversion: Uses mammoth to convert to HTML first, then turndown to Markdown. Layout preservation is generally good for simple documents.
  • PPTX Conversion: Currently extracts text content. Slide structure might not be fully preserved in the Markdown output.

🤖 AI 评测

这个工具能把 PDF、Word、PPT 等办公文档转成 Markdown 格式,支持中文。文档和示例比较丰富,上手难度不高。但它存在一些小问题:目录结构有点乱,测试覆盖不够全面,部分功能的运行环境配置起来稍显复杂。总体来说功能可用,但还有优化空间。.

📊 多维度评分

适应性4.2
规范性4.2
有效性4.5
可靠性4.3
可信度4.8

📁 包含文件 (15 个)

📄 README.md 3.8 KB
📄 SKILL.md 7.5 KB
📄 _meta.json 134 B
📄 examples/basic-usage.js 4.9 KB
📄 office-to-md/SKILL.md 1.3 KB
📄 office-to-md/convert.js 1.5 KB
📄 office-to-md/openclaw-skill.js 4 KB
📄 office-to-md/package.json 510 B
📄 office-to-md/utils/docConverter.js 500 B
📄 office-to-md/utils/pdfConverter.js 775 B
📄 office-to-md/utils/pptConverter.js 3.7 KB
📄 office-to-md/utils/wordConverter.js 690 B
📄 package.json 1010 B
📄 skill-card.md 2.1 KB
📄 tests/test-converter.js 7.7 KB