Skip to main content

A collection of beancount plugins

Project description

beancount-nblock

A collection of beancount plugins.

unlinked_documents: find missing links between documents and transactions

It might be desireable to enforce a link between certain kind of documents and a corresponding transaction. Typical use cases are incoming and outgoing invoices where a receipt (referenced via a document directive) should have a matching transaction.

The following is valid, according to this plugin:

2019-01-01 * "Payee" "A description" ^ER-some-id
  Assets:Bank:Checking     300.00 EUR
  Expenses:Home

2019-01-01 document Assets:Bank:Checking "/path/to/receipt.pdf" ^ER-some-id

An error is generated in case either of the above directives is missing.

Usage

Add the following to your beancount file:

plugin "beancount_nblock.unlinked_documents"

The default list of patterns is: AR-*, ER-*. A custom list of patterns may be configured via:

plugin "beancount_nblock.unlinked_documents" "PATTERN-FOO-*,PATTERN-BAR-*

repel: avoid specific combinations of tags and accounts in a single transaction

Check for combinations of tag and account names and raise an error in case they occur together in a transaction.

Consider the tag/account pair (FOO, Assets:Checking) where FOO is a tag and Assets:Checking is an account name. The following transaction is flagged by the plugin:

2019-01-01 * "Payee" "A description" #FOO
  Assets:Checking     300.00 EUR
  Expenses:Home

Usage

Add the following to your beancount file:

plugin "beancount_nblock.repel" "PLUGIN CONFIGURATION"

where PLUGIN CONFIGURATION is a list of tag/account tuples such as "[('FOO', 'Assets:Checking')]". The tag FOO should not occur in the same transaction as the account Assets:Checking.

file_ordering: enforces strict date ordering within individual Beancount files

This Beancount plugin validates that each Beancount file that contains 2 or more transactions is strictly chronologically ordered. I.e., no transaction that occurs later in a given file (in file order) has a date that occurs earlier (in calendar order) than a previous transaction in the same file.

While Beancount by default doesn't care about file ordering of directives, ensuring in-file date ordering on transaction is a useful check to avoid certain kinds of booking errors, e.g., copy-pasting an old transaction, forgetting to bump its date.

This plugin was developed by Stefano Zacchiroli and released under GNU General Public License (GPL), version 2 or above. It was incorporated into this repository from https://github.com/zacchiro/beancount-plugins-zack at commit a86a50bbd7fcc6e202db35dce3ca3af0a504493c to simplify distribution and installation via pip.

Usage

Add the following to your beancount file:

plugin "beancount_nblock.file_ordering"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beancount_nblock-0.2.1.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beancount_nblock-0.2.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file beancount_nblock-0.2.1.tar.gz.

File metadata

  • Download URL: beancount_nblock-0.2.1.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for beancount_nblock-0.2.1.tar.gz
Algorithm Hash digest
SHA256 35e60703ed69d6a5d4b83eb46fe299987c8c34d560132dc31912c7600475b579
MD5 2631185a83d50818d21ac704ea62a7e3
BLAKE2b-256 b1ed38464dbac6a86d8c28a78de2d80c24fcb11629bea2b8f5721ff774c6a6c4

See more details on using hashes here.

File details

Details for the file beancount_nblock-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for beancount_nblock-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0340b6a7ad98c73ff08a079bb5cf342a66a97015878f5867a497395f3a0655fb
MD5 d553f77ff9b1fa3ff1aa8c4a9d113295
BLAKE2b-256 55cfe892639364a713c4e810012de346d626efcc2d91ea40719d5b9210e4a219

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page