2021-04-06 GnuCash IRC logs

00:21:40 *** marusich has joined #gnucash
00:21:40 *** ChanServ sets mode: +v marusich
00:37:53 *** marusich has quit IRC
00:38:10 *** marusich has joined #gnucash
00:38:10 *** ChanServ sets mode: +v marusich
01:09:38 *** Mechtilde has joined #gnucash
01:29:49 *** fell has quit IRC
01:31:08 *** fell has joined #gnucash
01:31:08 *** ChanServ sets mode: +o fell
01:31:27 *** sbluhm has joined #gnucash
01:31:27 *** ChanServ sets mode: +v sbluhm
01:57:03 *** mikee has quit IRC
01:59:36 *** mikee has joined #gnucash
02:01:05 *** Mechtilde has quit IRC
02:01:08 *** frakturfreak has quit IRC
02:14:50 *** frakturfreak has joined #gnucash
02:14:50 *** ChanServ sets mode: +v frakturfreak
02:30:43 *** sbluhm has quit IRC
02:56:53 *** sbluhm has joined #gnucash
02:56:53 *** ChanServ sets mode: +v sbluhm
03:05:02 *** fell has quit IRC
03:05:21 *** fell has joined #gnucash
03:05:21 *** ChanServ sets mode: +o fell
03:10:22 *** sbluhm has quit IRC
03:19:01 *** marusich has quit IRC
03:35:15 *** gjanssens has joined #gnucash
03:35:16 *** ChanServ sets mode: +o gjanssens
04:23:02 *** sbluhm has joined #gnucash
04:23:02 *** ChanServ sets mode: +v sbluhm
04:53:47 *** sbluhm has quit IRC
05:00:32 *** sbluhm has joined #gnucash
05:00:33 *** ChanServ sets mode: +v sbluhm
05:05:02 *** Aussie_matt has quit IRC
05:05:48 *** sbluhm has quit IRC
05:21:30 *** sbluhm has joined #gnucash
05:41:25 *** Mechtilde has joined #gnucash
05:49:14 *** sbluhm has quit IRC
06:21:58 *** Aussie_matt has joined #gnucash
06:37:32 *** sbluhm has joined #gnucash
06:37:32 *** ChanServ sets mode: +v sbluhm
07:52:38 *** Mechtilde has quit IRC
08:10:31 *** sbluhm has quit IRC
09:25:08 *** Mechtilde has joined #gnucash
09:32:20 *** Aussie_matt has quit IRC
09:40:09 *** sbluhm has joined #gnucash
09:40:09 *** ChanServ sets mode: +v sbluhm
09:53:57 *** David has joined #gnucash
09:57:24 *** sbluhm has quit IRC
10:03:50 *** sbluhm has joined #gnucash
10:03:50 *** ChanServ sets mode: +v sbluhm
10:43:35 *** sbluhm has quit IRC
10:45:10 *** jcarl43 has joined #gnucash
10:45:10 *** ChanServ sets mode: +v jcarl43
10:53:45 *** bigon has joined #gnucash
10:53:45 *** ChanServ sets mode: +v bigon
10:54:09 <bigon> hello, is it known that the gnucash.org is not working anymore due to DNSSEC? https://dnsviz.net/d/gnucash.org/dnssec/
10:58:37 *** field^Mop has joined #gnucash
11:06:59 *** sbluhm has joined #gnucash
11:11:39 *** ArtGravity has joined #gnucash
11:11:39 *** ChanServ sets mode: +v ArtGravity
11:30:37 *** field^Mop has quit IRC
11:43:38 *** chris has quit IRC
11:48:13 *** sbluhm has quit IRC
11:48:46 *** guak has joined #gnucash
11:51:09 *** mydogsnameisrudy has joined #gnucash
11:55:42 *** mydogsnameisrudy has quit IRC
12:02:01 *** sbluhm has joined #gnucash
12:02:01 *** ChanServ sets mode: +v sbluhm
12:09:51 *** Mechtilde has quit IRC
12:12:40 *** angel has joined #gnucash
12:32:18 *** Mechtilde has joined #gnucash
12:53:01 *** sbluhm has quit IRC
12:54:43 <jralls> bigon, works fine for me, but I know DNS-sec has been driving warlord nuts for more than a year.
12:57:41 <jralls> warlord, looks like dnsviz.net's issue is that the signature on the RRSIG expired 14 March.
13:04:10 *** fell has quit IRC
13:05:02 *** fell has joined #gnucash
13:05:02 *** ChanServ sets mode: +o fell
13:21:05 *** angel has quit IRC
13:21:30 *** angel has joined #gnucash
13:23:43 *** sbluhm has joined #gnucash
13:23:43 *** ChanServ sets mode: +v sbluhm
13:24:53 *** angel has quit IRC
13:35:26 *** Bram_Lagerweij has joined #gnucash
13:37:36 *** ChanServ sets mode: +v Bram_Lagerweij
13:39:26 <Bram_Lagerweij> Hi everyone, I'm struggling to make my own report using the scheme language and the gnucash api. Am I here at the correct adress for questions?
13:42:53 <jralls> Depends. If your questions are about the GnuCash API, sure. If they're about learning Scheme, no.
13:45:23 *** David has quit IRC
13:45:29 *** David has joined #gnucash
13:47:17 *** User_ has quit IRC
13:50:43 *** sbluhm has quit IRC
13:54:25 *** sbluhm has joined #gnucash
13:54:25 *** ChanServ sets mode: +v sbluhm
13:55:31 <Bram_Lagerweij> Scheme itself is oké, although I can't say that I find it easy, it feels as if it is a scripting language inspired by assembly syntax. Anyway the big problems I have are indeed related to the API.
13:56:16 <jralls> OK. Scheme is actually worse that a scripting language inspired by assembly. It's a scripting language inspired by LISP.
13:56:29 <jralls> Anyway, what's your API question?
13:57:53 <Bram_Lagerweij> jralls: I'm a beginner with GNUCash itself, but me and my family members are using it to:
13:57:53 <Bram_Lagerweij> a) Keep track of income and expenses from our accounts
13:57:53 <Bram_Lagerweij> b) Keep track of our shared account
13:57:53 <Bram_Lagerweij> c) Calculate how much everyone has to contribute to the shared account at the end of the month
13:58:21 <jralls> OK.
13:59:05 <Bram_Lagerweij> This contribution is based upon a function depending on your monthly income and the amount of money on your accounts, all respectively to the total income and assets.
13:59:25 <Bram_Lagerweij> I can do the math (which I have working in excel an a python script already).
13:59:52 <Bram_Lagerweij> The biggest problem that I have is obtaining information from the accounts.
14:01:30 <jralls> xaccAccountGetBalanceAsOfDate() doesn't do it for you? BTW, you don't have to use Scheme unless you want to run the report from the GnuCash GUI. You can use the python bindings.
14:02:33 <Bram_Lagerweij> Dam, I was scrolling through various forum posts, but didn't find that command yet. It sound exactly what I'm looking for.
14:03:19 <jralls> Forum posts aren't a great way to learn an API. ;-) Have you looked at https://code.gnucash.org/docs/MAINT?
14:04:06 <jralls> Mind, it's not a command, it's a function. You need to have set up a session and loaded your data file to use it.
14:04:54 <Bram_Lagerweij> OOOHH <3
14:04:54 <Bram_Lagerweij> Most of what I learned came from https://wiki.gnucash.org/wiki/Custom_Reports
14:04:54 <Bram_Lagerweij> This looks like a c/c++ function, how do I call that
14:06:08 <bigon> jralls: I cannot access the website due to this here
14:07:18 <jralls> It is indeed a C function. It's wrapped for use from either Python or Scheme with SWIG. The python form is pretty much the same as the C form; from scheme you'd say (xaccAccountGetBalanceAsOfDate account date).
14:08:02 <jralls> Where account and date are variable names.
14:09:12 <jralls> bigon, OK. I guess you have your DNS locked down more tightly than I do. Only warlord can do anything about it.
14:12:57 <Bram_Lagerweij> Ohh this makes sense, I'll bookmark the docs.
14:12:57 <Bram_Lagerweij> I'll have to use `xaccAccountGetBalanceAsOfDateInCurrency (Account *account, time64 date, gnc_commodity *report_commodity, gboolean include_children)`
14:12:57 <Bram_Lagerweij> Which in scheme would look like:
14:12:57 <Bram_Lagerweij> ```
14:12:57 <Bram_Lagerweij> (xaccAccountGetBalanceAsOfDateInCurrency
14:12:57 <Bram_Lagerweij> account (pointer to account location)
14:12:57 <Bram_Lagerweij> date (as time64)
14:12:57 <Bram_Lagerweij> commodity (I want to use €)
14:12:57 <Bram_Lagerweij> include_children (a boolean option is unclear to me)
14:12:58 <Bram_Lagerweij> ```
14:12:59 <Bram_Lagerweij> Yeah, and date is in the time64 format, and account a pointer.
14:14:52 <jralls> booleans in scheme are #t and #f. You only need to use the InCurrency functions if you want the balance in a currency different from the account's currency. That would be unusual for your use-case.
14:20:56 <Bram_Lagerweij> I work for an international company which causes me to have a foreign account :-(
14:20:56 <Bram_Lagerweij> I'm aware of the #f and #t but don't understand what the option does
14:32:09 <jralls> If true it will recurse through all of the account's children and include their balances in the result.
14:34:01 <Bram_Lagerweij> woh, you guy's did the hard work, I made the account selector in such a way that you would have to indicate all accounts linked to a person. If I understand this correctly I could bundle them into one 'parent' account and simply call the balance from there. That's nice.
14:37:06 <jralls> Maybe per major category, e.g. Expenses:Alice, Expenses:Bob, Expenses:Chuck and then mirror the various expense types for each person.
14:40:34 <Bram_Lagerweij> +1
14:40:43 *** gjanssens has quit IRC
14:52:41 <bigon> When importing; is it possible to debug how the transactions are matched between accounts?
14:53:54 <bigon> (I don't see the indicator showing the quality of the matching)
14:56:00 *** gnomey has quit IRC
14:57:01 <jralls> bigon, try starting gnucash from the command line with --log gnc.import.main-matcher=debug. That will put some messages with matching info in your tracefile (you can redirect the output somewhere else with --logto=path or to the terminal with --logto=stderr). If that's not enough then the next step is gdb or lldb.
15:05:42 *** gnomey has joined #gnucash
15:06:45 <bigon> there is no matching with ofx files?
15:07:18 <Bram_Lagerweij> I'm using the following to select an account
15:07:18 <Bram_Lagerweij> ```
15:07:18 <Bram_Lagerweij> (add-option (gnc:make-account-list-option
15:07:18 <Bram_Lagerweij> (N_ "Tab")
15:07:18 <Bram_Lagerweij> (N_ "Rekening")
15:07:18 <Bram_Lagerweij> "c"
15:07:18 <Bram_Lagerweij> (N_ "Jou rekenning.")
15:07:18 <Bram_Lagerweij> (lambda () '())
15:07:18 <Bram_Lagerweij> #f
15:07:18 <Bram_Lagerweij> #f))
15:07:19 <Bram_Lagerweij> ```
15:07:20 <Bram_Lagerweij> Which seems to return a list (as I need to use a (map ) function to obtain the account name and alike. However I have the last option on false, which means that I can only select a single account.
15:07:23 <Bram_Lagerweij> How to obtain only a single pointer to an account instead of a list of pointers?
15:07:37 <jralls> bigon, yes, there's matching with ofx files.
15:07:50 <bigon> I get no output
15:09:49 <jralls> Bram_Lagerweij gnc:make-account-sel-option.
15:10:46 <jralls> bigon do you get the match dialog?
15:11:02 <Bram_Lagerweij> jralls: Where do I find an overview of all these 'options'? I cannot find them on https://code.gnucash.org/docs/MAINT/index.html
15:13:38 <jralls> There's unfortunately no documentation of anything written purely in scheme, you have to read the source code. There's a description of most of the option functions in gnucash/report/reports/example/hello-world.scm and more info in the implementation file, libgnuacsh/app-utils/options.scm.
15:16:12 <bigon> jralls: indeed, I get it when double clicking on the transaction
15:16:40 <bigon> but I was more thinking to debug the dialog with the green/yellow/red transactions
15:17:21 *** David has quit IRC
15:17:26 *** David has joined #gnucash
15:18:47 <bigon> (i think I might have found a bug, if the ofx files have no bank account number, the account 1st import with lock all the subsequent import to the 1st account)
15:18:54 <jralls> The dialog with the green/yellow/red transactions is the match dialog. Do I understand correctly that you get extra logging output when you doubl-click on one of the transactions in the match dialog but not while the match dialog is being built?
15:19:07 <bigon> yes
15:21:43 <jralls> try telling gnucash --log gnc.import=debug and see if you get anything more.
15:24:26 <jralls> I think if the ofx file has no account number GnuCash should either reject it outright or put up an account picker to get the account you're importing into. But if there's no number it might associate having no number with that account for all future imports with no number.
15:25:05 <jralls> OTOH I also think that the OFX spec requires an account number so maybe GnuCash should just refuse to import it.
15:28:14 *** Mechtilde has quit IRC
15:28:44 *** Mechtilde has joined #gnucash
15:31:30 <bigon> (I can open a bug for that when I can reach the site)
15:45:43 *** User_ has joined #gnucash
15:57:37 <Bram_Lagerweij> I'm very close, I just need to convert a number to a string for printing purposes. For this I use '(number->string 988.24)' where 988.24 is the amount on the bank account. Saldly this prints as 24706/25 which is true, but not exactly the format I want. How do I control this.
15:58:55 *** sbluhm has quit IRC
16:04:36 *** Mechtilde has quit IRC
16:07:53 <jralls> Bram_Lagerweij xaccPrintAmount. See https://github.com/Gnucash/gnucash/blob/maint/gnucash/report/reports/example/hello-world.scm#L412
16:23:15 <Bram_Lagerweij> jralls: I'll keep the hello world at hand. I'm really happy to slowly get the hang of this. Af first everything was confusing, now only most of the things are.
16:23:15 <Bram_Lagerweij> Today I managed to simply read and show the balance of all required accounts. Next week I'll manage reading income and spendings as well. (I hope :-) )
16:23:34 <Bram_Lagerweij> Thanks everyone
16:23:36 *** Bram_Lagerweij has quit IRC
16:30:35 *** mikee has quit IRC
16:31:16 *** mikee has joined #gnucash
17:36:48 *** User_ has quit IRC
17:46:15 *** field^Mop has joined #gnucash
19:10:21 *** jcarl43 has quit IRC
19:11:14 *** field^Mop has quit IRC
19:19:06 *** Aussie_matt has joined #gnucash
19:22:25 *** chris has joined #gnucash
19:22:25 *** ChanServ sets mode: +v chris
19:22:25 *** gncbot sets mode: +o chris
20:12:46 *** jw4 has quit IRC
20:13:27 *** jw4 has joined #gnucash
20:26:18 <warlord> jralls, that would be a Linas issue.. I have no control over DNSSec.
20:28:34 <warlord> jralls, email sent
20:28:43 *** guak has quit IRC
21:19:30 *** jervin1 has joined #gnucash
21:49:05 *** jervin1 has quit IRC
21:57:47 *** ArtGravity has quit IRC
23:04:44 *** jervin has quit IRC