Document verification plugin for Beancount
Project description
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"
-
Explictly 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 "bad_beantools.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 adocuments
option in the beancount file itself, eg:option "documents" "./"
-
Subdirectory format TODO
-
Fictitious TODO
-
Filename must be valid (eg. "broken.pdf" is out)
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
Built Distribution
Hashes for beancount_docverif-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93f61892e89f9972b7acee6c7e2d9d7ab271f42f10114cc7f21e01a37fe8f658 |
|
MD5 | 92c30916a8563985093eefcb0caa618d |
|
BLAKE2b-256 | 3405de4a089101488e22705d747b0eb05e14ebee8087723aa95309077f5c668c |