doc-reader

Extract text and structured content from diverse document formats into a unified JSON envelope.

6.1k|1.2k|Updated Jun 9, 2022
One-click install
npx skills add https://github.com/charliedream1/ai_quant_trade --skill doc-reader-charliedream1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: doc-reader
Source: https://github.com/charliedream1/ai_quant_trade/tree/main/a_%E5%85%A8%E7%BD%91%E4%BC%98%E7%A7%80%E8%B5%84%E6%BA%90/10_%E5%A4%A7%E6%A8%A1%E5%9E%8B/07_skill%E5%8C%85/vibe_trading_skills/doc-reader
Command: npx skills add https://github.com/charliedream1/ai_quant_trade --skill doc-reader-charliedream1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This tool reads a wide range of document formats and returns extracted text and data in a single, consistent JSON envelope, simplifying downstream processing and analysis.

Core Features & Use Cases

  • Universal text extraction: Extract raw text, tables, and metadata from PDFs, Word, Excel, PowerPoint, images (OCR), CSV/TSV, plain text, JSON/YAML/TOML, HTML/XML, and source code.
  • Unified output format: Always receive a structured JSON envelope with per-format fields for easy integration into pipelines.
  • Use Case: Quickly digitize a mixed document bundle by converting all files into searchable text and structured data for indexing and analytics.

Quick Start

Run read_document on a file path to extract text and metadata into a unified JSON envelope.

Frequently Asked Questions about doc-reader

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text from a PDF and an image in the same batch?▼

To extract text from mixed files like PDFs and images, the tool applies OCR for images and extension-based dispatch for PDFs, returning all extracted content in a unified JSON envelope for consistent downstream processing.

What is the best way to get structured data from Word, Excel, and PowerPoint documents?▼

The best way to extract structured data from Office documents is to parse them into a unified JSON envelope. It processes Word, Excel, and PowerPoint formats via extension-based dispatch, retaining per-format content for easy integration.

Does this text extraction tool handle encoding fallbacks for non-UTF-8 files?▼

Yes, the text extraction tool handles encoding fallbacks for non-UTF-8 files. It automatically attempts multiple encodings including utf-8-sig, gbk, gb2312, big5, and latin-1 to accurately parse plain text and source code.

Can I parse CSV, JSON, and YAML config files into a consistent format?▼

Yes, you can parse CSV, JSON, and YAML config files into a consistent format. The tool extracts structured content from these formats and returns it within a unified JSON envelope, simplifying data pipeline integration.

Why does my extracted document content include markup and source code formatting?▼

Extracted document content includes markup and source code formatting because the tool implements per-format content retention. This ensures that specific structural elements from HTML, XML, and code files are preserved within the JSON envelope.