Skip to main content

Various beancount importers

Project description

Various custom importers for beancount.

See the list of supported importers.

Installation

$ pipx install beancount-importers

Usage

beancount-importer expects to be run from within your ledger folder, with a config.toml file configured with your account details and your patterns. The file format accepts an optional beancount-importer.patterns list containing items in the following format:

[
    'narration' | 'payee' | 'either' | 'both',
    'Account:Name',
    '^regex$',
]

Note that if using the both target kind, the payee and narration will be concatendated with a semicolon (;) for the purpose of parsing, eg.:

['both', 'Income:Salary', '^My Company;Salary$'],

If beancount-importer.patterns is specified, all definitions in that list will be applied to all your accounts. In this file, you should also list each of your accounts, eg.

[[beancount-importer.paypal]]
account = 'Assets:Paypal'

[[beancount-importer.tangerine]]
account = 'Assets:Tangerine:Checking'
lastfour = '1234'

[[beancount-importer.tangerine]]
account = 'Liabilities:Tangerine:Mastercard'
lastfour = '5678'
patterns = [...]

You can specify any number of accounts, including multiple of the same kind, so long as they parse with separate filenames. This will be verified when you run identify – any ambiguous filenames will produce an error, in which case you’ll need to handle those accounts separately. The patterns list follows the same parsing as the above global patterns object and is optional on a per-account basis; if specified, those patterns will be appended to your global pattern list and apply only to this account.

$ cd /my-beancount/ledger
$ cat config.toml
[beancount-importer]
patterns = [
    ['payee', 'Income:Salary', '^My Employer.*$'],
]

[[beancount-importer.tangerine]]
account = 'Assets:Tangerine:Checking'
lastfour = '1234'
patterns = [
    ['payee', 'Income:Tangerine:Checking:Interest', '^Interest Paid$'],
]

# Check downloaded files for errors
$ bean-import identify -v ~/Downloads

# Reconcile issues, fix parsing, adjust patterns, etc
$ bean-import extract -xe index.beancount ~/Downloads
$ vim
$ # ...repeat until no errors...

# Actually import the new data
$ bean-import extract -e index.beancount -o my-ledger.beancount ~/Downloads

# Archive parsed statements
$ bean-import archive -o docs ~/Downloads

# Verify everything reconciled properly (command provided by beancount)
$ bean-check index.beancount

# View your ledger (command provided by fava)
$ fava index.beancount

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_importer-0.2.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

beancount_importer-0.2.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beancount_importer-0.2.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0

File hashes

Hashes for beancount_importer-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cdd8689217641fad4625eb0f4fd2ab4295e3a1d7e56a805995e21e4a60560456
MD5 1a03ab6b519405d90fe1c8af35a8f137
BLAKE2b-256 89b71e3dc40c8500d0964b6778a4551d09fd94678805c6d92af896049dd3b2fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beancount_importer-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0

File hashes

Hashes for beancount_importer-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6843dc0d9fa3683c3a0ae2f1b28e2d80b02541e83ff390a149f04adcf490b651
MD5 ee3a00356f143b5e5461827fe3a90669
BLAKE2b-256 e719c86ec101e792b9179986b6b5e113d4dddc4263bb4d7e24fff97d965db345

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