Commands
file read
Read the content of a file, printed or opened natively.
poly file read prints a file's content. What that means depends on the format: text files print raw, PDFs and other document transcodes print extracted text, audio and video print a WebVTT transcript, and images open in your native image viewer.
Usage
poly file read <TARGET>
TARGET accepts a local path inside the sync folder, a //-prefixed Poly path, a deep link, or a web URL — see How it Works for the full reference syntax.
Flags
Flags are grouped into mutually exclusive families — pick at most one family per invocation.
| Flag | Description |
|---|---|
--at <REVISION|TIME> | Read the file as of a revision ID (from file history) or a fuzzy time, e.g. "yesterday". |
--pages "3-4,7" | Read specific pages (PDFs). Alternative: --start-page / --end-page. |
--timestamp "00:40:05-00:42:15" | Read a transcript range (audio/video). Alternative: --start-timestamp / --end-timestamp. |
--lines "4-5" or "4:23-5:10" | Read a line range, optionally with character offsets. Alternative: --start-line / --end-line (--start-char requires --start-line, --end-char requires --end-line). |
--crop "(L,T)-(R,B)" | Crop to a normalized [0,1] box (images and PDF pages). --page <N> selects the PDF page and requires --crop. |
Examples
# Print a text file's contents
poly file read //Home/notes/todo.md
# Extract text from pages 3 through 5 of a PDF
poly file read //Home/docs/report.pdf --pages "3-5"
# Read a video's transcript between two timestamps
poly file read //Home/videos/standup.mp4 --timestamp "00:02:10-00:03:00"
# Read a specific line range, with character offsets
poly file read //Home/src/main.rs --lines "10:5-20:0"
# Crop the top-left quadrant of an image
poly file read //Home/photos/scan.png --crop "(0,0)-(0.5,0.5)"
# Crop a region of page 2 of a PDF
poly file read //Home/docs/report.pdf --crop "(0.1,0.1)-(0.9,0.3)" --page 2
# Read the file as it looked yesterday
poly file read //Home/notes/todo.md --at yesterday
Related
file search— search for fragments within a file instead of reading a range.file show— inspect metadata without reading content.file history— list the revisions you can pass to--at.- Searching — full-text and semantic search across all of Poly.