Put expect.py
somewhere on PYTHONPATH
, and put the following line
in your ledger.
plugin "expect"
Add metadata to the transaction you expect to repeat.
2024-01-01 * "Beverages" "Recurrent weekly provision of soft drinks"
expected: "True"
frequency: "weekly"
duration_in_years: 1
E:Drinks 250 EUR
L:Beverages
Metadata should resemble the dateutil.rrule
parameters.
See documentation.
- frequency
- must be in the RFC 5545 names (https://datatracker.ietf.org/doc/html/rfc5545), otherwise default to monthly
- interval
- interval between expectations
- until OR count OR duration_in_years
- either end date, or number of expected occurrences. The two meta MUST NOT be given both in the same entry (https://dateutil.readthedocs.io/en/stable/rrule.html#dateutil.rrule.rrule)
- amount (optional)
- the amount of the transaction, replacing the one in the posting. Mainly used if the origin of the recurrent transaction is an actual transaction, but the expectations might vary in future expected transactions, therefore with a different amount.
- the transaction containing metadata cannot be de-duplicated; it must be an actual transaction.
- the transaction must have only two postings, with only one containing an amount
- the `amount’ metadata will replace the posting with the amount