Read text file
read_text_fileRead one file as whole, head/tail, or a 1-based line range; extract text from PDF, Word, Excel, email, and HTML, and report total lines for edits.
Instructions
Read one file. Whole file by default; head/tail = N lines from an edge; offset/limit = an arbitrary 1-based line range, which also reports total lines and rev (needed for edit_file line edits). Documents (PDF, DOCX, XLSX, PPTX, ODF, EPUB, MSG…) come as numbered lines with section markers, no rev, read-only; HTML, RTF, EML and FB2 read raw, extract:true gives their text. Several files at once: read_multiple_files; images and page images: read_media_file / read_pdf_page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| head | No | ||
| path | Yes | ||
| tail | No | ||
| limit | No | Number of lines from offset | |
| offset | No | First line, 1-based | |
| extract | No | HTML/RTF/EML/FB2: their text instead of the raw file |