limabean.core.filters

Functions to filter directives and postings according to their various fields, conventionally aliased to f.

Example:

(show (inventory (f/date> 2025)))

In general these filters reject anything missing the target field.

acc

(acc & target-accs)

Predicate for :acc field to be equal to one of target-accs.

cur

(cur target-cur)

Predicate for :cur field to be equal to target-cur.

date<

(date< & args)

Predicate for :date field to be < args.

args may be:

  • a java-time.api/local-date
  • a string in ISO 8601 format
  • an integer year, with month and day inferred as 1
  • integers year and month, with day inferred as 1
  • integers year, month, and day

date<=

(date<= & args)

Predicate for :date field to be <= args.

args are as described in date<

date>

(date> & args)

Predicate for :date field to be > args.

args are as described in date<

date>=

(date>= & args)

Predicate for :date field to be >= args.

args are as described in date<

date>=<

(date>=< b1 e1)(date>=< b1 b2 e1 e2)(date>=< b1 b2 b3 e1 e2 e3)

Predicate for :date field to be >= begin-date and < end-date.

Precisely 2, 4, or 6 args must be given, the first half of which are the begin date and the second half the end date, and are as described in date<

every-f

(every-f & filters)

Combinator filter which selects only what every filter selects

narration-match

(narration-match regex)

Predicate for whether the narration matches the given regex

payee-match

(payee-match regex)

Predicate for whether the payee matches the given regex

some-f

(some-f & filters)

Combinator filter which selects only what at least one filter selects

sub-acc

(sub-acc & target-accs)

Predicate for :acc field to be equal to one of target-accs or a subaccount of any of them.