Last updated:
0 purchases
beancountdocverif 1.0.1
Beancount Docverif
Docverif is the "Document Verification" plugin for beancount,
fulfilling the following functions:
Require that every transaction touching an account have an accompanying
document on disk:
2000-01-01 open Expenses:General BEAN
docverif: "Require"
Explicitly declare the name of a document accompanying a transaction:
; Document entry pointing to a working document: should validate correctly
2020-06-01 * "plumber" "fix faucet leak"
document: "2020-06-01.plumber - services.pdf"
Expenses:General
Assets:Bank -150 BEAN
Explicitly declare that a transaction is expected not to have
an accompanying document:
; Explicit "None" document: should ignore missing document
2020-06-01 * "store" "groceries"
document: "None"
Expenses:General
Assets:Bank -10 BEAN
Look for an "implicit" PDF document matching transaction data:
; Document entry without an explicit "document" entry,
; should implicitly match document: "2020-06-01.plumber - services.pdf"
2020-06-01 * "plumber" "services"
Expenses:General
Assets:Bank -150 BEAN
Associate (and require) a document with any type of entry,
including open entries themselves:
2000-01-01 open Assets:Bank BEAN
docverif: "Require"
document: "2020-06-01.plumber - services.pdf"
Guarantee integrity: verify that every document declared
does in fact exist on disk.
Installation
pip install beancount_docverif
Usage
In your toplevel .beancount file, include:
plugin "beancount_docverif"
option "documents" "./"
See the .beancount files in test for examples.
Developing
Install package and dev requirements locally:
python3 -m pip install -e .[dev]
Run tests:
python3 -m pytest
Build both binary and source distributions locally:
python3 setup.py bdist_wheel sdist
See sanitize.sh for maintainer's personal tooling.
Beancount Quirks
We depend on beancount itself finding documents
and auto-generating Document entries.
This requires a documents option in the beancount file itself, eg:
option "documents" "./"
Subdirectory format TODO
Fictitious TODO
Filename must be valid (eg. "broken.pdf" is out)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.