Skip to content
A collection of my custom beancount importers & price sources, written in Python
Python
Branch: master
Clone or download

README.md

beancount-plugins

Build Status

A collection of my custom beancount importers & price sources, written in Python (3.7).

payslip.Importer

Import a PDF payslip.

Usage

Add the following to payslip_config.py:

from importers import payslip

CONFIG = [
    payslip.Importer('Google', 'Savings:NatWest', 'GBP', student_loan=False)
]

Ensure you have a payslip .pdf file in the payslips directory:

$ tree payslips/
payslips/
└── june.pdf

Run bean-extract to extract the transaction:

$ bean-extract payslip_config.py payslips/
;; -*- mode: beancount -*-
**** payslips/june.pdf

2017-07-31 * "Google" "Salary"
  Expenses:Tax:Income               123.45 GBP
  Expenses:Tax:NationalInsurance    789.10 GBP
  Assets:Savings:NatWest           1122.33 GBP
  Income:Salary:Google    

Developing

Create and activate a venv, then install the dependencies using pip:

$ python3 -m venv venv
$ source venv/bin/activate
(venv)$ pip3 install -r requirements_dev.txt
(venv)$ PYTHONPATH=. bean-extract ft_config.py prices/

Type Checking

Mypy is installed to run static type checking on the source files.

Run the following command to perform the static type analysis:

(venv)$ mypy --ignore-missing-imports .

Contributing

Bug reports and pull requests are welcome on GitHub.

License

This project is available under the terms of the ISC license. See the LICENSE file for the copyright information and licensing terms.

You can’t perform that action at this time.