beancount-importer
==================
Various custom importers for `beancount`_.
See the `list of supported importers`_.
Installation
------------
.. code-block:: console
$ 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.
.. code-block:: toml
[[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.
.. code-block:: console
$ 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
.. _beancount: https://beancount.github.io/
.. _list of supported importers: https://github.com/TheKevJames/beancount-importer/blob/master/beancount_importer/__init__.py
Raw data
{
"_id": null,
"home_page": "https://github.com/TheKevJames/beancount-importer",
"name": "beancount-importer",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Kevin James",
"author_email": "beancount-importer@thekev.in>",
"download_url": "https://files.pythonhosted.org/packages/89/b7/1e3dc40c8500d0964b6778a4551d09fd94678805c6d92af896049dd3b2fb/beancount_importer-0.2.1.tar.gz",
"platform": null,
"description": "beancount-importer\n==================\n\nVarious custom importers for `beancount`_.\n\nSee the `list of supported importers`_.\n\nInstallation\n------------\n\n.. code-block:: console\n\n $ pipx install beancount-importers\n\nUsage\n-----\n\n``beancount-importer`` expects to be run from within your ledger folder, with a\n``config.toml`` file configured with your account details and your patterns.\nThe file format accepts an optional ``beancount-importer.patterns`` list\ncontaining items in the following format::\n\n [\n 'narration' | 'payee' | 'either' | 'both',\n 'Account:Name',\n '^regex$',\n ]\n\nNote that if using the ``both`` target kind, the payee and narration will be\nconcatendated with a semicolon (``;``) for the purpose of parsing, eg.::\n\n ['both', 'Income:Salary', '^My Company;Salary$'],\n\nIf ``beancount-importer.patterns`` is specified, all definitions in that list\nwill be applied to all your accounts. In this file, you should also list each\nof your accounts, eg.\n\n.. code-block:: toml\n\n [[beancount-importer.paypal]]\n account = 'Assets:Paypal'\n\n [[beancount-importer.tangerine]]\n account = 'Assets:Tangerine:Checking'\n lastfour = '1234'\n\n [[beancount-importer.tangerine]]\n account = 'Liabilities:Tangerine:Mastercard'\n lastfour = '5678'\n patterns = [...]\n\nYou can specify any number of accounts, including multiple of the same kind, so\nlong as they parse with separate filenames. This will be verified when you run\n``identify`` -- any ambiguous filenames will produce an error, in which case\nyou'll need to handle those accounts separately. The ``patterns`` list follows\nthe same parsing as the above global ``patterns`` object and is optional on a\nper-account basis; if specified, those patterns will be appended to your global\npattern list and apply only to this account.\n\n.. code-block:: console\n\n $ cd /my-beancount/ledger\n $ cat config.toml\n [beancount-importer]\n patterns = [\n ['payee', 'Income:Salary', '^My Employer.*$'],\n ]\n\n [[beancount-importer.tangerine]]\n account = 'Assets:Tangerine:Checking'\n lastfour = '1234'\n patterns = [\n ['payee', 'Income:Tangerine:Checking:Interest', '^Interest Paid$'],\n ]\n\n # Check downloaded files for errors\n $ bean-import identify -v ~/Downloads\n\n # Reconcile issues, fix parsing, adjust patterns, etc\n $ bean-import extract -xe index.beancount ~/Downloads\n $ vim\n $ # ...repeat until no errors...\n\n # Actually import the new data\n $ bean-import extract -e index.beancount -o my-ledger.beancount ~/Downloads\n\n # Archive parsed statements\n $ bean-import archive -o docs ~/Downloads\n\n # Verify everything reconciled properly (command provided by beancount)\n $ bean-check index.beancount\n\n # View your ledger (command provided by fava)\n $ fava index.beancount\n\n.. _beancount: https://beancount.github.io/\n.. _list of supported importers: https://github.com/TheKevJames/beancount-importer/blob/master/beancount_importer/__init__.py\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Various beancount importers",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/TheKevJames/beancount-importer",
"Repository": "https://github.com/TheKevJames/beancount-importer"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e719c86ec101e792b9179986b6b5e113d4dddc4263bb4d7e24fff97d965db345",
"md5": "ee3a00356f143b5e5461827fe3a90669",
"sha256": "6843dc0d9fa3683c3a0ae2f1b28e2d80b02541e83ff390a149f04adcf490b651"
},
"downloads": -1,
"filename": "beancount_importer-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ee3a00356f143b5e5461827fe3a90669",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 16314,
"upload_time": "2025-02-10T04:30:31",
"upload_time_iso_8601": "2025-02-10T04:30:31.295937Z",
"url": "https://files.pythonhosted.org/packages/e7/19/c86ec101e792b9179986b6b5e113d4dddc4263bb4d7e24fff97d965db345/beancount_importer-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "89b71e3dc40c8500d0964b6778a4551d09fd94678805c6d92af896049dd3b2fb",
"md5": "1a03ab6b519405d90fe1c8af35a8f137",
"sha256": "cdd8689217641fad4625eb0f4fd2ab4295e3a1d7e56a805995e21e4a60560456"
},
"downloads": -1,
"filename": "beancount_importer-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "1a03ab6b519405d90fe1c8af35a8f137",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 10253,
"upload_time": "2025-02-10T04:30:33",
"upload_time_iso_8601": "2025-02-10T04:30:33.052099Z",
"url": "https://files.pythonhosted.org/packages/89/b7/1e3dc40c8500d0964b6778a4551d09fd94678805c6d92af896049dd3b2fb/beancount_importer-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-10 04:30:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TheKevJames",
"github_project": "beancount-importer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"circle": true,
"lcname": "beancount-importer"
}