2023-08-04 GnuCash IRC logs

00:54:15 *** cproo12 has quit IRC
01:01:19 *** NoobAlice has quit IRC
01:29:49 *** fell has quit IRC
01:31:07 *** fell has joined #gnucash
01:31:07 *** ChanServ sets mode: +o fell
05:36:44 *** chris has joined #gnucash
05:36:44 *** ChanServ sets mode: +v chris
05:36:48 *** gncbot sets mode: +o chris
06:55:38 *** chris has quit IRC
07:47:45 *** gandalf1 has joined #gnucash
07:48:12 *** gandalf has quit IRC
07:48:12 *** gandalf1 is now known as gandalf
08:32:25 *** chris has joined #gnucash
08:32:25 *** ChanServ sets mode: +v chris
08:32:30 *** gncbot sets mode: +o chris
08:37:09 *** jwhite has joined #gnucash
09:02:55 *** ColinRobinson has joined #gnucash
09:09:21 *** ColinRobinson has quit IRC
09:29:18 *** chris has quit IRC
10:13:45 *** chris has joined #gnucash
10:13:45 *** ChanServ sets mode: +v chris
10:13:50 *** gncbot sets mode: +o chris
10:49:54 *** NoobAlice has joined #gnucash
10:49:55 *** ChanServ sets mode: +v NoobAlice
11:50:28 *** palerider has joined #gnucash
11:50:36 *** palerider has left #gnucash
12:14:40 *** chris has quit IRC
13:00:25 *** raeburn has quit IRC
13:32:07 *** ArtGravity has joined #gnucash
13:32:07 *** ChanServ sets mode: +v ArtGravity
14:48:39 *** raeburn has joined #gnucash
14:48:39 *** ChanServ sets mode: +v raeburn
15:36:00 *** raeburn has quit IRC
15:38:18 *** raeburn has joined #gnucash
15:38:19 *** ChanServ sets mode: +v raeburn
15:39:57 *** ArtGravity has quit IRC
16:26:28 *** gandalf has quit IRC
16:35:48 *** ChanServ sets mode: +v jwhite
16:36:00 <jwhite> Looks as though xaccTransRecordPrice is not a perfect fit; it expects an account (see https://github.com/Gnucash/gnucash/blob/stable/libgnucash/engine/Transaction.c#L2979), and qif pricing data just has the security, no account. Is a new function a reasonable choice, and if so, where best to hang it? Is Transaction.c okay?
16:38:57 *** sunyibo has joined #gnucash
16:38:57 *** ChanServ sets mode: +v sunyibo
16:50:57 *** raeburn has quit IRC
17:00:27 *** ArtGravity has joined #gnucash
17:00:27 *** ChanServ sets mode: +v ArtGravity
17:03:07 <jralls> jwhite, the importer must have the account in order to create the split for the price.
17:04:37 <jwhite> the qif format does not associate an account with the data, just the security. And doesn't the gnucash price database only use security, not account?
17:08:34 <jralls> You're looking at it the wrong way. You're passing the account to the transaction so that it knows which split's price to record. At this point you're done with the QIF entry's info. Yes, the pricedb holds only the security and the price and that info is already present in the split.
17:09:11 *** sunyibo has quit IRC
17:15:21 <jwhite> Yeah, I'm not understanding :-/. I've modified qif-to-gnc.scm to build up a gnc-xtn which contains a single split with the price information. It feels to me as though what I would now need to do is look up an account to associate with the gnc-xtn. I can imagine that might work, but it would require there to be an account that holds the security, which feels somewhat unsatisfying to me. further wacks with clue bats welcome.
17:19:00 <jralls> I think you're working on the wrong side of the matcher. Unless you're importing into the stock account (very unusual) the initial split is to the cash account and its price is 1, that is the amount and value are both in the transaction currency.
17:21:57 <jralls> A couple of pages later the assistant creates the "other" splits for the transactions with Imbalance-XXX as the account, where XXX is the transaction currency. The list is passed through the matcher that looks for similar descriptions and assigns proposed accounts to the ones it finds, then presents the list to the user.
17:24:11 <jwhite> Just for clarity, I'm not working on transactions; all of my transactions import correctly, and have correct pricing at the time and date of the transaction. Quicken also supplies a lot of historic price information, and that's what I'm working on. That is, implementing the code here: https://github.com/Gnucash/gnucash/blob/ce6bdc2c2dbbaabf387deff8cc51530082bd25e3/gnucash/import-export/qif-imp/qif-file.scm#L231
17:25:05 <jwhite> (which is probably just evidence that I am still not understanding your point, sorry :-/)
17:25:18 <jralls> The user goes through the list and assigns accounts for all of the transactions that are still on Imbalance-XXX and any where the matcher picked the wrong one. After that you can call xaccTransactionRecordPrice.
17:28:14 <jralls> > I'm not working on transactions | Um, you said you were working on https://bugs.gnucash.org/show_bug.cgi?id=791819. That's about recording the transaction's price in the pricedb, not about importing stand-alone prices.
17:28:49 <jwhite> aha, I misunderstood that bug.
17:31:09 <jwhite> In fact, I wonder if that bug is still valid; I am finding that I do have transaction prices after an import, but only from the transaction, not the historical price data.
17:31:42 <jralls> To import stand-alone prices you need to somehow match the commodity and currency in the QIF with their GnuCash equivalents, create a GncPrice, and insert it into the pricedb.
17:32:55 <jwhite> k. sorry for the misdirection, that was a failure to closely read that bug on my part.
17:39:51 <jralls> Yes, that bug is fixed: qif-to-gnc.scm calls xaccTransRecordPrice on line 448.
17:43:04 <jwhite> does your earlier comment suggest that a libgnucash/engine/Price.c would be constructive?
17:43:56 <jralls> I hope not. The price stuff is in libgnucash/engine/gnc-pricedb.cpp + headers.
17:46:13 <jralls> We already have a CSV price importer, see https://github.com/Gnucash/gnucash/blob/stable/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp. You can convert that to scheme and modify it as necessary to insert prices from a QIF.
17:46:41 <jwhite> yeah, I've been looking at that as part of trying to understand.
17:47:28 <jwhite> Would it be better to just use the scm to collate a list of prices, and the modify the qif-imp/assistant-qif-import.c to insert into the pricedb, similar to the way csv-imp does it?
17:49:48 <jralls> Yes, that would work. Everything should be wrapped so it doesn't matter that much whether you call the pricedb functions from C or Scheme. Whatever is easier.
17:59:59 <jwhite> mm. seems like the qif importer really has the scm as the driver of the actual import, so maybe it goes there. Just need to figure out how to call engine/gnc-pricedb.c from the scm. Nicely, just found libengine/doc (missed that on my first pass :-/), so now I now what xacc stands for :-).
18:01:00 <jralls> Don't use libgncengine/doc, a lot of it is obsolete. Use https://code.gnucash.org/docs/MASTER.
18:01:43 <jwhite> k.
18:03:04 <jralls> Pretty much everything in engine is wrapped for Scheme using https://swig.org. You can use the C docs, just change underscores to hyphens, e.g. gnc_price_create() becomes (gnc-price-create).
18:04:09 <jralls> Actually that's gnc_price_create(book) and (gnc-price-create book).
18:04:46 <jwhite> okay, stupid question #742: where is the git tree for the docs (just want to be able to grep the tree)?
18:05:46 <jralls> The API docs are generated from comments in the code using https://www.doxygen.nl/index.html.
18:09:51 <jralls> There's also a search box on the right end of the menubar of the docs page.
18:10:39 <warlord> .
18:11:06 <jwhite> yah. I picked a psychotic case: I wanted to know what xacc meant, and the old design stuff has that; the newer stuff mentions it, but grep didn't pick that up.
18:12:42 <jralls> Oh, well for ancient history libgnucash/docs is useful. ;-)
18:13:41 <jralls> warlord, since you're here, think you can put an hour into either fixing the docs scripts to use stable?
18:14:05 <jralls> Or maybe get them into a repo accessible from gitolite so that I can?
18:24:06 <warlord> jralls, ah, right, that fell off my radar during my PTO.
18:24:31 <jralls> PTO is when you're supposed to be working on GnuCash! ;-)
18:24:47 <warlord> I was out of the country and mostly sitting on a beach without connectivity.
18:25:44 <warlord> so what are the new names for "master" and "maint"
18:25:44 <jralls> So? As long as you have a copy of code on your laptop you can squirt the changes when you get coffee in the morning. ;-)
18:26:29 <warlord> maint -> stable
18:26:35 <warlord> What's master's new name?
18:26:52 <jralls> maint -> stable. There is no master equivalent ATM for lack of anything to put into it. It will be 'future' when we create it.
18:27:40 <warlord> Okay.
18:28:49 <warlord> I've updated build-docs. I didn't change the output target names, just the branch names.
18:29:36 <warlord> Did the branch-names change on gnucash-docs?
18:32:49 <jralls> Yes, maint->stable, no future yet.
18:33:28 <jralls> Does that mean that stable's Doxygen output will go to MAINT? That will be a bit confusing.
18:34:31 <warlord> for now, yes. Changing THAT would be more work right now.
18:34:59 <warlord> gnucash-docs updated too.
18:35:05 <warlord> I'll look to fixing the name shorlt.
18:35:07 <warlord> shortly.
18:36:12 <jralls> There's two other changes in gnucash-docs: gnucash-help is now gnucash-manual, and instead of gnucash-(guide|manual)/(C|de|it|ja|pt) it's C/gnucash-(guide|manual) etc.
18:36:13 <warlord> Oh, fixing the name was easier than I thought.. :)
18:36:24 <warlord> UGH.
18:37:24 <warlord> why was that changed?
18:37:59 <jralls> The layout change was driven by Yelp changes. The scheme we were using was deprecated a long time ago.
18:39:20 <jralls> I don't remember the reason for help->manual. ISTR it was something fell and cwheli decided would be a Good Thing.
18:40:36 <warlord> those changes will take longer to fix.. and it means existing URLs will break.
18:41:57 <jralls> It looks to me that the layout change is already OK. https://code.gnucash.org/docs/C/ has gnucash-guide and gnucash-help.
18:42:38 <warlord> i cope the docs from share/doc after building.
18:43:26 <warlord> # and copy the output
18:43:26 <warlord> (cd share/doc; tar -cf - */gnucash-{help,guide}{,.pdf,.epub,.mobi} | ( cd $destdir ; tar -xf - ))
18:43:26 <warlord> # and make sure there are index.html links in the help directories
18:43:26 <warlord> for helpdir in $destdir/*/gnucash-help ; do
18:43:26 <warlord> [ ! -r $helpdir/index.html ] && ln -s help.html $helpdir/index.html ;
18:43:27 <warlord> done
18:44:02 <warlord> s/cope/copy
18:45:39 <jralls> Oh, I forgot about the helpdir index.html. That's taken care of as part of the Yelp update.
18:45:54 <fell> Help became a CMake internal target, IIRC.
18:46:29 <fell> Gjanssens has the details.
18:46:47 <jralls> BTW, I set up a github workflow that publishes to e.g. https://gnucash.github.io/gnucash-docs/C/gnucash-manual/. I need to add index.html to the higher-level directories.
18:48:43 <warlord> ok
18:49:53 <fell> Isn:'t there a server directive to display parent and sub dirs?
18:50:12 <jralls> Yes, but not accessible in github-pages.
20:03:03 *** ArtGravity has quit IRC
20:36:29 *** chris has joined #gnucash
20:36:29 *** ChanServ sets mode: +v chris
20:36:34 *** gncbot sets mode: +o chris
21:08:57 *** chris has quit IRC
22:58:56 *** chris has joined #gnucash
22:58:56 *** ChanServ sets mode: +v chris
22:59:00 *** gncbot sets mode: +o chris
23:37:03 *** chris has quit IRC