icsv2ledger compatible categorizer for CSV importer

42 views
Skip to first unread message

Stefano Zacchiroli

unread,
Apr 23, 2018, 10:07:54 AM4/23/18
to bean...@googlegroups.com
On the Ledger side, I've been using icsv2ledger[1] for many years. That
means I've a pretty rich mapping DB in the format of that tool.

[1]: https://github.com/quentinsf/icsv2ledger

When I started to play with bean-extract and the builtin CSV importer
(beancount.ingest.importers.csv), it occurred to me that it'd be nice to
have a categorizer for it that used the icsv2ledger mapping file as a
backend. Hence I wrote it, and you can find it attached to this mail.

Comments welcome.

In particular, this is my first attempt as using the internal Beancount
data structures, so I'd love to hear what I'm doing wrong.

Also, is the built-in CSV importer meant to be used this way
(sub-classing and all) or am I missing something?

Please let me knkow if this adapter is of interest to others than me. In
that case I can publish it on a more suitable place than this list.

Cheers
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
icsv2ledger.py
Reply all
Reply to author
Forward
0 new messages