version: 0.0.1
name: extract
about: Extract structured data or matching lines from text and logs
clipboard: false
args:
- name: file
short: 'f'
input: string
help: Path or URL to the log or text file
api:
output: dialog
input: query|prompt
args:
file: query|file_path
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|prompt}
[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}'