ptx
Generate a permuted (keyword-in-context) index from input text, displaying each word in its surrounding context for searchable cross-references.
Instructions
Build a permuted (keyword-in-context) index from input text, showing each word in its surrounding context. Read-only, no side effects. Returns JSON with the index by default; use --raw for plain output. Use to create searchable cross-reference indices. Not for sorting or deduplication — use 'sort' and 'uniq'. See also 'sort'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | Words of left/right context. | |
| encoding | No | Text encoding. | utf-8 |
| ignore | No | Ignore a keyword. Repeatable. | |
| ignore_case | No | Compare filters case-insensitively. | |
| max_lines | No | Maximum JSON records to emit. | |
| only | No | Only include this keyword. Repeatable. | |
| paths | No | Files to index, or '-' for stdin. Defaults to stdin. | |
| raw | No | Write index rows without a JSON envelope. |