On Wed, 15 Oct 2014 00:20:23 -0400
Martin Blais <bl...@furius.ca> wrote:
Hello Martin,
> Tonight I implemented a new command to convert from Beancount to an
> SQL database (SQLite3 implementation).
I still did not convert from Gnucash to ledger-based accounting and
wonder what is your priority in regard to some tool to provide ledger
<--> Beancount conversion?
Of course, my inquiry is in the context of looking your general
development of Beancount.
On Wed, 15 Oct 2014 10:29:07 +0200
Gour <go...@atmarama.net> wrote:
> I still did not convert from Gnucash to ledger-based accounting and
> wonder what is your priority in regard to some tool to provide ledger
> <--> Beancount conversion?
Excuse me for making noice...now I'm looking at tutorial and see:
"It should be possible to convert example files generated from the
script to Ledger syntax, like this:
bean-query example.beancount ledger > example.lgr "
which really makes me enthusiastic to try Beancount. ;)
Now, I'm going to check whether there is some helper for creating
budgets...both (h)ledger require some extra calc to be done to estimate
correct monthly amounts.
On Wed, 15 Oct 2014 11:26:15 -0400
Martin Blais <bl...@furius.ca> wrote:
> If you want to help expedite this, you can create a GNUcash ledger
> that has at least one of every kind of transaction (especially with
> units held at cost, investments, etc.) that you use and share it with
> the list, either I or someone will surely pick it up and make a
> little conversion script that you can then try it on your real
> GNUcash ledger (note that this will take iterations, we might not get
> it right the first time and without access to your own file it would
> take cooperation and debug support to iron out all the issues that
> come up converting your file).
I do not use all these stuff, but have you seen:
https://github.com/MatzeB/pygnucash which converts from Gnucash's
SQLite3 db?
Considering your recent SQL-related work, it might be easier than to
convert from XML?
Wed, 15 Oct 2014 19:16:58 <CAK21+hOJYjx=jNMzrvPZGwoK+U+0KFrfYxZJKHRecva_FQ78sg@mail.gmail.com>
The changes from MatzeB's original are:
massage account names due to differences between ledger-cli and
beancount; you have almost certainly got a better bit of code to
do that than my effort, I just got rid of stuff in account names
as bean-check complained about it
adjust for differences in account structure permissiveness [2]
present commodity / currency transactions to match beancount
I am happy to share the script with you and answer any queries you have
about the GnuCash side.
Some notes for you to consider:
1. bean-check makes no distinction between a warning and an error
1.1 "Duplicate Entry" drawing 10 cash twice in one day is not an error
[2] gnc has a top level Trading account type, I chose to place them
under Equity in beancount, another person might choose to exclude them
from the conversion process [3]
[3] as an aside I have read your critique of GnuCash in your document
about why you got started on beancount and presume you know a lot of it
doesn't apply. No, I am not trying to change your mind, just mentioning
it as gnc Trading accounts are one of the things many people don't know
about and cover some of your issues, I also consider some to be
unnecessary, but that is my problem :)
Let me know if you want the script here or by e-mail, you are better at
python than me and will make it much tidier in minutes.
>Also, if you can identify the distinct of transactions you're using that
>would also help me create a unit test.
>Thanks,
Most, I would have thought. GnuCash doesn't have distinct transactions
types in the sense I think you mean.
units of stuff (e.g. currencies + commodities) seem to be what excite
you most and my beancount balance sheet agrees with gnucash apart from
the interpretational bits.
perhaps it would be better (considering in another post you are
producing test / sample data for beancount) that you produce a "one of
each type" of transaction distinctly recognised by beancount and someone
(probably me while I am interested) will use that as a comparative.
P.S. MatzeB if you read this will you let me know if you are interested
in having a look at my messy code? The difference really isn't worth
another project
--
Wm...
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/n4rcDlRF7pQUFwcf%40tarrcity.demon.co.uk.
For more options, visit https://groups.google.com/d/optout.
1.1 "Duplicate Entry" drawing 10 cash twice in one day is not an errorHmm, so here's the thing, in the implementation, each transaction has a unique signature, a "hash", which allows me to make comparisons between sets of transactions. The transactions will only be detected as duplicates if and only if _all_ of their fields are exactly the same. This rarely if ever happens in practice. You probably were cut-n-pasting the same transaction to test things out.The reason this exists is that it has happened a few times in the past that in the course of importing a transaction was copied twice - clearly an error. This check exists to detect this.Okay, so here's what I'm going to do:- Make the unused account check optional; it will be available through an optional plugin.- Make the duplicates check optional; similarly will be available through an optional plugin.Those who want super tight checks will have to add the options.Something like this:option "plugin" "beancount.plugins.nounused"option "plugin" "beancount.plugins.noduplicates"By default unused accounts and duplicates would be allowed.How's that?
Sat, 18 Oct 2014 13:48:05 <CAK21+hMNcR-j_6skp3w+b0Ferh5DixJoxbi5oHGn76dYjvzMZQ@mail.gmail.com>
Martin Blais <bl...@furius.ca> wrote...
1.1 "Duplicate Entry" drawing 10 cash twice in one day is not an error
Hmm, so here's the thing, in the implementation, each transaction has a
unique signature, a "hash", which allows me to make comparisons between
sets of transactions.
me, says Martin, me !
The transactions will only be detected as duplicates
if and only if _all_ of their fields are exactly the same. This rarely if
ever happens in practice.
In *your* life!
This is where I must stand up and say I think you are a fool.
Your life may be such that you never do something twice in one day, I am not like that. My life is not like that.
GnuCash has the notion of a transaction ID that ledger-cli and beancount don't.
Why do you think they have that if not for ordinary repetitive stuff? If you've only just realised a person may withdraw the same amount of notes from a cash machine in one day you are living a very restricted life in my opinion.
You probably were cut-n-pasting the same
transaction to test things out.
Wrong. I, a human being, withdrew a unit note of my countries convenient currency, unit 10, from a machine, provided by a global bank twice in one day.
I am *NOT* going to apologize to you for doing that, OK! Sort your stuff out.
TBH, I am finding this bit of you weird, MartinB.
The reason this exists is that it has happened a few times in the past
that in the course of importing a transaction was copied twice - clearly an
error. This check exists to detect this.
Why should I or anyone else have to play extra checks and padding because you or your bank fucked up in the past? This is *not* the way to get people on your side, Martin.
Okay, so here's what I'm going to do:
- Make the unused account check optional; it will be available through an
optional plugin.
CoA sensibility suggests this is a good idea.
- Make the duplicates check optional; similarly will be available through
an optional plugin.
I think someone else said something about apportioning and accounts not balancing exactly. I mean, if I sell stuff I don't have *and* I didn't have Trading accounts would you prevent the record of the transaction?
This is the issue. Do you record reality or not? I think you are, in some circumstances worse than ledger-cli because you want to impose. Post event things may be clear.
Those who want super tight checks will have to add the options.
Something like this:
option "plugin" "beancount.plugins.nounused"
option "plugin" "beancount.plugins.noduplicates"
By default unused accounts and duplicates would be allowed.
How's that?
I'm unaffected, your theoretical 3 users may speak.
Implemented.
https://bitbucket.org/blais/beancount/commits/01ab95c5ab260fb3d6dc34861e
5111c4da3ff35d?at=default
https://bitbucket.org/blais/beancount/commits/0362940c62197b2ab4b0838b5f
7c754afb2ef7eb?at=default
Beancount users: if you still wants these validation checks, add this to
your file:
option "plugin" "beancount.plugins.nounused"
option "plugin" "beancount.plugins.noduplicates"
BTW, I think if you dropped the unnecessary precision you might get some extra users.
Sat, 18 Oct 2014 17:23:34 <CAK21+hMneyWt_NaUJt9cEKp3YFh9nfMa_ooUc9sM2J_AEg...@mail.gmail.com>
Martin Blais <bl...@furius.ca> wrote...
Again, you're misinterpreting the intent of the constraint. I never claimed
you could not do this in Beancount, just putting a unique narration/comment
on each transaction disambiguated it in the first place.
I do not want to explain to my accounting s/w why I took some money out of my account. I do that by saying how I spend it. If you and other people withdraw money from a machine and *only* ever spend it on what you decided on at that moment I feel sorry for you.
The bank never made a mistake, the user did. It's easy to make mistakes.
How? Do you mean I booked a hiking trip in Nepal kind of mistake ?
I
was trying to provide some help to the user in avoiding to make the common
mistake of repeating the _very_ same transaction by accident.
Isn't the obvious check, "do my accounts agree with my bank" ?
About the precision issue, I've already written a proposal doc to outline
what the problems are,
as I and other people have noticed, you do that a lot, I hope it makes you feel better.
and what could be a great solution, which will get
implemented:
https://docs.google.com/document/d/1MY2JMiiXUmcwsOT0CkiK-fCo0ZE7nbr8uTcT
L50b6X4/
oh, you're going to implement it? great!
what a pity the link doesn't work, but that might be your crap quoting
And thanks for the two bits of constructive feedback 2 or 3 emails prior.
I'm always glad to hear of friction others may have and to make suitable
adjustments.
ok, I guess you'll be just the same place in a year or two's time.
Gour will be no better off and I'll have some nice SQL reports to show.
Sun, 19 Oct 2014 11:38:28 <CAK21+hMfxt2eQU2xGwUX0xzHFGO-V6axRbeWWrEz_kL_uvML7A@mail.gmail.com>
Martin Blais <bl...@furius.ca> wrote...
Wm:
Gour will be no better off and I'll have some nice SQL reports to
show.
Can't wait to see them. Please share some great results with us (and
some code!), it would be lovely to compare what the GnuCash community
produces with the Ledgerverse. There's always room to grow I'm sure.
There is some recent SQL stuff in the gnc lists that may be of interest, I have a weird idea of trying to make your query work with other db based backends like those offered by GnuCash but IIRC you said SQL couldn't do it.