name: extract
about: Extract structured data or matching lines from text and logs
clipboard: false
args:
- name: query
short: 'q'
input: string
help: Extraction criteria (e.g., 'find all errors')
- name: file
short: 'f'
input: string
help: Path or URL to the log or text file
actions:
- tag: tag_lines
run: cmd
expect: list
action: echo {file|load|text}
- tag: tag_content
run: small
expect: string
action: |
[Task]
Read the log line and the search query.
If the line matches the query — output the EXACT line character-for-character, preserving original casing.
If the line does not match — output only a single dash: "-"
Do NOT skip lines. Process every line.
Do NOT modify, normalize, or reformat the line in any way.
[Query]
{query}
[Line]
{tag_lines}
- tag: tag_clean
run: value
expect: string
action: '{tag_content|trim:-}'
- tag: tag_extract
run: value
expect: string
action: '{tag_clean|uniq|join}'