Using "go" to import csv files

59 views
Skip to first unread message

Paul Marriott

unread,
Jan 22, 2023, 7:40:28 AM1/22/23
to Beancount

I recently started using "go" for a project and found it to be a great choice. Initially as a learning tool, I created a simple application to convert csv files to beancount journal format, after preprocessing them using google sheets. I thought I'd share it with the group. Here's the link to the repository on Github: https://github.com/PaulsTek/csv2bean

It's been helpful for me in dealing with csv files and I hope it can help someone else too. Let me know if you have any questions or feedback.

Red S

unread,
Jan 22, 2023, 3:02:34 PM1/22/23
to Beancount
Always great to see folks share importers. However, one request for anyone considering writing importers: at the very least, please do consider integrating your importer with the importer framework that ships with Beancount (bean-identify/extract/file in older versions; or beangulp in v3). 

What this does is:
-- help us all as a community to avoid duplicated and wasted effort
- for consumers of your importers, it lets them quickly integrate your importer into their system (as opposed to figuring out your system for configuration and integration)

Of course, if possible, using a framework like my reds-importers (or a couple others out there) helps us even more as a community to channel our importing efforts into one direction and make that stronger, robust, and awesome. But this is less of an ask than the above.

My two cents.

Daniele Nicolodi

unread,
Jan 23, 2023, 4:59:33 PM1/23/23
to bean...@googlegroups.com
On 22/01/2023 21:02, Red S wrote:
> Always great to see folks share importers. However, one request for
> anyone considering writing importers: at the very least, *please do
> consider integrating your importer with the importer framework that
> ships with Beancount*

This is possible only if the importers are written in Python [1]. The
importer shared by the OP are written in Go.

[1] Well, technically it would be possible to write the importer in
another language and write Python bindings for it. But I don't see why
someone would go through this sort of pain.

Cheers,
Dan

Reply all
Reply to author
Forward
0 new messages