How are people using importers?

109 views
Skip to first unread message

Bruce Berkowicz

unread,
Sep 2, 2022, 3:25:46 PM9/2/22
to Beancount
I am currently writing importers to get year-to-date data into my beancount file.
I am writing the extract code so that it posts transactions that balance.

Do you do it this way?
Or do you post the transactions as unbalanced and then edit the file by hand, adding the balancing account to each transaction?

Just curious.

Bruce

Patrick Ruckstuhl

unread,
Sep 2, 2022, 3:30:12 PM9/2/22
to bean...@googlegroups.com


Hi,

Most of my importers only look at one leg (e.g. if I'm importing a credit card statement, that's only the amount).
Then I use https://github.com/beancount/smart_importer as a wrapper around the import and that does based on previous transactions suggest the other legs of the transactions. I do this in fava which allows me to interactively correct the couple of transactions where the suggestion is not correct.
This allows me to import lots of transactions with very little effort.

Regards,
Patrick

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3b692fac-d3b3-4c0d-a3a3-b5860fe4285an%40googlegroups.com.

Daniele Nicolodi

unread,
Sep 2, 2022, 3:53:14 PM9/2/22
to bean...@googlegroups.com
The approach I use (and that I think is most common) is to generally
have importers emit transactions with only one postings.

I enter the other leg of the transaction with a combination of manual
editing and automated prediction based on a machine learning
categorization algorithm.

Exploiting the fat that for most transactions there is only one other
leg and thus it is not necessary to repeat the amount, and using an
editor with completion support and with support for navigating the
structure of a benacount ledger makes the manual entry matter of a few
keystrokes.

The machine learning solution I use is similar to smart_importer but has
a much simpler design and uses scoring to filter out unlikely
predictions. The machine learning of course works only after you
accumulate a some history to use for the training.

I also used a rule-based categorization system with simple match rules.
Writing the rules for such a solution however is generally tedious to
write so that is effective only for often recurring transactions,
otherwise manual editing is faster.

I like to have the transactions completion in a separate step from the
transactions import. The only ad-hoc code I have in the importers is for
cleaning up payees and narrations.

Cheers,
Dan

Martin Blais

unread,
Sep 2, 2022, 9:32:28 PM9/2/22
to bean...@googlegroups.com
I output one posting and categorize by hand.
(I think I coded up rules at some point and then it broke, I think it's worth the time investment to auto-categorize the common stuff.)

--

Red S

unread,
Sep 8, 2022, 4:44:21 AM9/8/22
to Beancount
Depends on whether it's investment accounts or others. From The Five-Minute Ledger Update:
Categorizing:
  • Investment accounts have a deterministic, finite set of transaction types, and are easy to build correct and complete transaction postings for, during import
  • For credit card and bank accounts, I use the awesome smart_importer.

Reply all
Reply to author
Forward
0 new messages