Skip to main content

Module syntax

Module syntax 

Source
Expand description

The text forms: on patterns, conditions, lists, words and quoting.

Functions§

check_pattern
Check an on pattern against the application’s event kinds. hint is appended to the “matches no action kind” message (for example where the catalog is listed).
condition_text
A condition in the form parse_condition reads.
matches_kind
Does an on pattern (*, kind, prefix.*) match an event kind?
parse_condition
Parse FIELD OP VALUE, e.g. inserted > 0, format=pdf, title ~ "btc halving".
parse_condition_with
parse_condition where fields starting with one of call_prefixes (like svc:) are call-style: PREFIX NAME/TOOL(args).path, whose arguments may hold any character but ).
parse_on
import,journal.* and repeated values both work.
quote
A value quoted only when it has to be.
split_list
Split a; b; "c;d" on semicolons outside quotes (lists on one line).
tokenize
Words of a then-action: each word, and its key when written key=value (the key unquoted, before the first =). Quotes group words and are removed.