Loading...
Loading...
Extract text from source documents (PDF, DOCX, PPTX, HTML, Markdown) for spreadsheet workflows. Use to understand source material before populating workbooks.
npx skill4agent add witanlabs/witan-cli read-sourcewitan read--outlineWITAN_STATELESS=1--stateless4084295005025035044xx# Get document structure first
witan read report.pdf --outline
witan read slides.pptx --outline
# Read specific sections
witan read report.pdf --pages 1-5
witan read slides.pptx --slides 1-3
witan read notes.docx --offset 50 --limit 100
# Read from URLs
witan read https://example.com/report.pdf --outline
witan read https://example.com/data.csv
# JSON output for automation
witan read report.pdf --json
witan read report.pdf --outline --json| Code | Meaning |
|---|---|
| Success |
| Error (bad arguments, network failure, unsupported format) |
--pages--slides--offset--limit--outlinewitan read report.pdf --outlinewitan read report.pdf --pages 12-15witan read deck.pptx --outlinewitan read deck.pptx --slides 5-8witan read notes.docx --outlinewitan read notes.docx --offset 120 --limit 50witan read <file-or-url> [flags]| Flag | Default | Description |
|---|---|---|
| — | PDF page range (e.g. |
| — | Presentation slide range (e.g. |
| | Start line (1-indexed) |
| | Maximum lines to return |
| | Show document structure instead of content |
| | Output full JSON response |
| Constraint | Value |
|---|---|
| Max PDF pages per read | 10 |
| Max PPTX slides per read | 10 |
| Default line limit | 2000 |
| Max file size | 25 MB |
witan read source.pdf --outlinewitan read source.pdf --pages 3-8witan xlsx exec model.xlsx --input-json '...' 1 Revenue Summary
2
3 Q1: $1,250,000
4 Q2: $1,380,000
text/plain [15 pages, 10 read, 847 lines total, showing 1–847]--outlineIntroduction [pages 1-2]
Background [pages 1-1]
Methodology [pages 2-2]
Results [pages 3-8]
Financial Summary [pages 3-5]
Projections [pages 6-8]
Appendix [pages 9-15]
[15 pages]| Error | Fix |
|---|---|
| Check file path exists and is readable |
| Check the URL is accessible |
| File exceeds 25 MB limit |
| Set Content-Type header (API only) |
| Empty outline | Document has no bookmarks/headings; use offset/limit to navigate |
| Truncated text | Use |