Skip to content

Beancount plugin to create expected transactions based on recurrence rules documented in the iCalendar RFC 5545.

License

Notifications You must be signed in to change notification settings

erpreciso/beancount-expected-transaction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How To

Install

Put expect.py somewhere on PYTHONPATH, and put the following line in your ledger.

plugin "expect"  

Setup expectations

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.

Constraints

  • 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

Tutorial (TODO)

References (TODO)

Explanation (TODO)

About

Beancount plugin to create expected transactions based on recurrence rules documented in the iCalendar RFC 5545.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages