Skip to main content

Document verification plugin for Beancount

Project description

Beancount Docverif Build Status

Docverif is the "Document Verification" plugin for beancount, fulfilling the following functions:

  1. Require that every transaction touching an account have an accompanying document on disk:

    2000-01-01  open  Expenses:General BEAN
      docverif: "Require"
    
  2. 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
    
  3. 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
    
  4. 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
    
  5. 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"
    
  6. 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.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

  1. 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" "./"
    
  2. Subdirectory format TODO

  3. Fictitious TODO

  4. 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

beancount_docverif-0.1.1.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

beancount_docverif-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file beancount_docverif-0.1.1.tar.gz.

File metadata

  • Download URL: beancount_docverif-0.1.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200531 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for beancount_docverif-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ccae35018c0df48d3e046a2bbd866d1c80539bce944ed20d72c07662afee1952
MD5 65f8526e81efd985e53c7517d8f54596
BLAKE2b-256 4730576ed5141a7d38671bacb5bbbc411043333b8778dab61435e2086073f7ff

See more details on using hashes here.

File details

Details for the file beancount_docverif-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: beancount_docverif-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200531 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for beancount_docverif-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fef69561b878404f540953c564362df134971874310007a86bc0e58bdeff44b4
MD5 9be8aed85a1ac8b2031f5653d2d34f9d
BLAKE2b-256 ab237e2719858717825dfe44a40888d0045f6481d154970adf4f6e61f6d51ed9

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