Releasing gnucash-to-beancount 1.0b0

170 views
Skip to first unread message

Henrique Bastos

unread,
Jan 2, 2017, 12:40:36 AM1/2/17
to Beancount
Hi all!

I've been digging into beancount and I'm very impressed! What an amazing tool. Congrats to Martin and everybody involved.

I use Gnucash for 6 years now. So I wrote a gnucash-to-beancount converter to start working with beancount. It's still 1.0beta0 and has limitations but it's working for me.


The repository includes a Gnucash sample file with the expected golden files.

How it works right now:

- maps all account types from Gnucash to Beancount;
- deal with currency conversions using priced Posting;
- export the price table using Beancount's Price directive;
- use the directives: Open, Commodity, Price, Transaction, Posting
- insert on META Gnucash data that has no place in Beancount;
- Use Beancount's printer.

Any suggestions, comments or additional Gnucash sample files are welcome.

[]'s, HB!

Martin Blais

unread,
Jan 2, 2017, 1:18:57 PM1/2/17
to Beancount
Awesome! :-)
I added a link to it from the contrib page 


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/73d0775b-cae4-49e8-b0d6-fe2b9c874793%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oon-Ee Ng

unread,
Jan 3, 2017, 10:04:02 PM1/3/17
to bean...@googlegroups.com
Thanks, I just did that conversion myself using a combination of
scripts I found elsewhere and some manual fixes. How does your
convertor work with scheduled transactions?
> --
> 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.

Henrique Bastos

unread,
Jan 4, 2017, 6:59:29 AM1/4/17
to bean...@googlegroups.com
The way I understood Gnucash's schema is that an occurred scheduled transaction is a normal transaction that has reference to it's origin.

So *I think* all occurred scheduled transactions will be processed correctly. However no reference is kept to it been generated by a scheduled transaction.

I don't use scheduled transactions myself, so I didn't go deep on this path.

Do you have any suggestions?

Daniël Bos

unread,
Jan 4, 2017, 8:47:09 AM1/4/17
to bean...@googlegroups.com

If the information is readily available, it would probably be nice to link the occurrences using a link or tag in Beancount.


--
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 post to this group, send email to bean...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Best regards,
Daniël Bos

Your government is reading your email. Slow them down with encryption.

My public key: http://goo.gl/gms497 (4096 bit RSA, id EF2D5D91)
Fingerprint  : D8D0 9FBE F075 F709 7B52  2F73 326C 2123 EF2D 5D91

Henrique Bastos

unread,
Jan 4, 2017, 9:12:53 AM1/4/17
to bean...@googlegroups.com
On Wed, Jan 4, 2017 at 11:46 AM, Daniël Bos <cor...@gmail.com> wrote:

If the information is readily available, it would probably be nice to link the occurrences using a link or tag in Beancount.

That's interesting. But we would still loose the scheduled transaction details, right?

Unless I create a custom directive just to keep this information. However, it doesn't seem useful.

Daniël Bos

unread,
Jan 4, 2017, 9:21:42 AM1/4/17
to bean...@googlegroups.com

Yes, Beancount, out of the box, doesn't support scheduled transactions, so you can only import the actual instances of these transactions.

If you want to record more details about the scheduled transactions, perhaps that could be done using meta-data on a "custom" directive, which you could link to the transactions using the same link or tag.

To actually generate new scheduled transactions, you'd have to write some custom code. Though I expect you could get the guys at Fava (Beancount web interface) excited about integrating such a feature.


--
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 post to this group, send email to bean...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Henrique Bastos

unread,
Jan 4, 2017, 10:56:14 AM1/4/17
to bean...@googlegroups.com
On Wed, Jan 4, 2017 at 12:21 PM, Daniël Bos <cor...@gmail.com> wrote:

Yes, Beancount, out of the box, doesn't support scheduled transactions, so you can only import the actual instances of these transactions.

If you want to record more details about the scheduled transactions, perhaps that could be done using meta-data on a "custom" directive, which you could link to the transactions using the same link or tag.

To actually generate new scheduled transactions, you'd have to write some custom code. Though I expect you could get the guys at Fava (Beancount web interface) excited about integrating such a feature.


On Wed, Jan 4, 2017, 22:12 Henrique Bastos <henr...@bastos.net> wrote:
On Wed, Jan 4, 2017 at 11:46 AM, Daniël Bos <cor...@gmail.com> wrote:

If the information is readily available, it would probably be nice to link the occurrences using a link or tag in Beancount.

That's interesting. But we would still loose the scheduled transaction details, right?

Unless I create a custom directive just to keep this information. However, it doesn't seem useful.

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to bean...@googlegroups.com.
--

Best regards,
Daniël Bos

Your government is reading your email. Slow them down with encryption.

My public key: http://goo.gl/gms497 (4096 bit RSA, id EF2D5D91)
Fingerprint  : D8D0 9FBE F075 F709 7B52  2F73 326C 2123 EF2D 5D91

--
You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/pcZI0xEnps8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+unsubscribe@googlegroups.com.

To post to this group, send email to bean...@googlegroups.com.
Message has been deleted
Message has been deleted

Henrique Bastos

unread,
Jan 13, 2017, 5:10:47 PM1/13/17
to bean...@googlegroups.com

It lacks support for lots and realized gains. I never used it on GNUCash, but if you can provide a sample GNUCash file with a couple transactions using those features I could try to implement it.

[]'s, HB!

Oon-Ee Ng

unread,
Jan 16, 2017, 4:15:03 PM1/16/17
to bean...@googlegroups.com
I used gnucash2ledger and then ledger2beancount, both python scripts I
found randomly online. I have them here if you can't find them. Seems
quite complete, at least with the features I used in gnucash.

On Fri, Jan 13, 2017 at 9:03 AM, <cantas...@gmail.com> wrote:
> Hi,
>
> What scripts did you use?
>
> I am still trying to fix my conversions for lots, cash dividends, etc...
> https://groups.google.com/d/msgid/beancount/5679508f-c2f3-4c3b-8318-3d372aea074c%40googlegroups.com.

Henrique Bastos

unread,
Jan 16, 2017, 6:22:13 PM1/16/17
to bean...@googlegroups.com
Great. Please, open an issue at https://github.com/henriquebastos/gnucash-to-beancount/issues 

Don't forget to add a reference to the gnucash2ledger script.

I also need a simple and crafted gnucash sample file to make sure I can test what I achieve.

[]'s,

> To post to this group, send email to bean...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/5679508f-c2f3-4c3b-8318-3d372aea074c%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/pcZI0xEnps8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages