一键导入
book-ingester
Foundation Layer. Extracts raw text and images from PDF, EPUB, FB2, DOCX. Cleans OCR artifacts and sets structural H1/H2 marks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Foundation Layer. Extracts raw text and images from PDF, EPUB, FB2, DOCX. Cleans OCR artifacts and sets structural H1/H2 marks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Master Skill Bundle (v9.0). A 4-role pipeline (Ingest, Architect, Design, Assemble) for creating offline-first interactive books with high-fidelity UI.
Intelligence Layer. Handles semantic distillation, terminology mining via terms.json, and visual blueprinting.
Deployment Layer. Bundles chapters into a single-file offline app. Handles final QA and linting.
Presentation Layer. Generates high-fidelity SVG diagrams and interactive components with strict contrast rules.
| name | book-ingester |
| description | Foundation Layer. Extracts raw text and images from PDF, EPUB, FB2, DOCX. Cleans OCR artifacts and sets structural H1/H2 marks. |
You are the Foundation Layer. Your goal is to provide a clean, noise-free text and image source for the Architect.
--strip-noise for PDF sources to remove running headers, footers, and technical artifacts./assets directory. Run optimize_assets.py to prevent mobile OOM crashes.<!-- TABLE_START -->...<!-- TABLE_END --> markers.../scripts/ingest.py as the primary tool.# PDF with noise stripping (MANDATORY for scientific papers)
python ../scripts/ingest.py --input book.pdf --output ./chapters --force --lang en --strip-noise
chapter1.html, chapter2.html, etc.assets/..html/.xhtml/# patterns to preserve inter-chapter links. Do NOT modify this logic.ingest_epub() now accepts and propagates --lang. If the EPUB <html> element has no lang= attribute, the CLI value is injected. Without this, EPUB chapters may render with the wrong language metadata, affecting hyphenation and speech synthesis.--pdf-chapters, the PDF becomes a single chapter1.html. This is intentional for short books. For long books, provide --pdf-chapters.pdf_parser_general.py uses dynamic font baseline calculation (_calculate_baseline) to detect headings. It works for both Pocket (10pt) and A4 (11-12pt) formats.lxml XPath on w:drawing elements. Requires pip install python-docx lxml.optimize_assets.py for PDF/DOCX sources. Unoptimized images cause mobile OOM crashes at >1000px width.