light-file-reading
Solid强大地读文件并学习——Word、PDF、PPTX、Excel、CSV、图片、视频、代码、压缩包等。当用户提供任何文件、问"这个文件讲了什么"、或任务需要理解已有材料时使用(常驻,自动触发)。不只提取文字,而是理解结构、逻辑、图表、数据、实验结果、格式要求、章节关系、视觉风格、隐含要求与可复用内容,并转化为可执行任务。
Data & Documents 77 stars
17 forks Updated today MIT
Install
Quality Score: 88/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 多格式文件深度理解
## 触发
任何涉及已有文件的任务自动启用,无需显式调用。
## 即用脚本(scripts/,均带自检,可直接 python 运行)
- **`scripts/pdf_ops.py`**:`read_meta` / `extract_text(layout)` / `extract_tables`→DataFrame(pdfplumber),`merge` / `split` / `rotate`(pypdf)。`python pdf_ops.py` 跑合成自检。
- **`scripts/docx_read.py`**:`read_paragraphs` / `read_headings`(章节骨架)/ `read_runs`(样式提取)/ `read_tables` / `read_layout`(页边距纸张)。python-docx,**不读修订**。
- **`scripts/xlsx_read.py`**:`list_sheets` / `read_formulas`(不求值)/ `read_values`(缓存)/ `profile`(pandas 数据画像)。openpyxl **无求值引擎**,算值需 LibreOffice 重算。
逐格式完整 copy-paste 代码块见 `references/`(PDF-REF / DOCX-REF / XLSX-REF / PPTX-REF,渐进式按需读)。
## 按格式选工具(见 a09,细节见 references.md)
- **PDF**:机器生成 PDF 用 `pdfplumber` 抽文本(`extract_text(layout=True)`)与表格(`extract_tables`→DataFrame,策略 lines/text,调 snap_tolerance);结构操作(合并/拆分/旋转/加密/书签)用 `pypdf`;扫描件 OCR 走 `pytesseract+pdf2image`;快速归一为 md 用 `markitdown file.pdf -o out.md`。论文 PDF 关注章节/图表/表格定位,可用 `page.crop(bbox)` 锁区域。pdfplumber/pypdf 均无 OCR、不读纯图。
- **Word(.docx)**:读用 `pandoc in.docx -o out.md`(带 `--track-changes=all` 把增删/批注包成 insertion/deletion/comment span 保留作者+时间、`--extract-media=./media` 导图、引文 `--citeproc --bibliography refs.bib --csl apa.csl`)或 `python-docx` 遍历 paragraphs→runs 读样式/题注;提取模板格式要求(页边距/字号/编号/引用风格)。需精确改原文/redline 时走「解包→直接改 XML→重打包」:插入 `<w:ins w:author=.. w:date=..>`、删除 `<w:del>` 内用 `<w:delText>`,最小化只标真正变动的词。注意 python-docx 不读修订、无渲染;pandoc AST 不保页边距等精确格式。
- **PPTX**:读用 `python -m markitdown deck.pptx` 抽文本,再渲染成图(`soffice --headless --convert-to p...
Details
- Author
- Light0305
- Repository
- Light0305/Light-skills
- Created
- 5 days ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
Data & Documents Listed
docx
全面的文档创建、编辑和分析功能,支持修订追踪、批注、格式保留和文本提取。当 Claude 需要处理专业文档(.docx 文件)时使用:(1) 创建新文档,(2) 修改或编辑内容,(3) 处理修订追踪,(4) 添加批注,或其他任何文档任务
45 Updated 3 months ago
diegosouzapw Data & Documents Listed
docx
全面的文档创建、编辑和分析功能,支持修订追踪、批注、格式保留和文本提取。当 Claude 需要处理专业文档(.docx 文件)时使用:(1) 创建新文档,(2) 修改或编辑内容,(3) 处理修订追踪,(4) 添加批注,或其他任何文档任务
490 Updated 4 months ago
LeastBit Data & Documents Listed
pdf-processing-toolkit
当需要合并/拆分/旋转 PDF、提取文本与表格、生成新 PDF、加水印/加密、对扫描件 OCR 时使用;做用 pypdf/pdfplumber/reportlab 等库与 qpdf/pdftotext 等命令完成批量 PDF 处理并产出文件或结构化数据;不适用于填写 PDF 表单字段(用 pdf-form-filler)。触发词:PDF、合并PDF、提取表格、PDF转文本、OCR、加水印
0 Updated 6 days ago
findscripter