2020-05-29 GnuCash IRC logs
00:14:05 *** jervin has quit IRC
00:15:12 *** jervin has joined #gnucash
00:25:15 *** o01eg has joined #gnucash
00:53:00 *** jervin has quit IRC
01:03:36 *** Mechtilde has joined #gnucash
01:18:00 *** sbluhm has joined #gnucash
01:18:00 *** ChanServ sets mode: +v sbluhm
01:22:50 *** fell has quit IRC
01:23:40 *** fell has joined #gnucash
01:23:40 *** ChanServ sets mode: +o fell
01:36:06 *** omnireq has joined #gnucash
01:37:29 *** sbluhm has quit IRC
01:54:41 *** sbluhm has joined #gnucash
01:54:41 *** ChanServ sets mode: +v sbluhm
02:13:33 *** SimpleIsGood has joined #gnucash
02:18:10 <SimpleIsGood> I've ben using GnuCash for some time as a stand-alone, XML file, but was hoping to start using the mySQL functionality. What steps are needed to save my GnuCash file to a mySQL database? So far I have installed mySQL server on my local machine.
02:20:07 *** suukim has joined #gnucash
02:25:28 *** suukim has quit IRC
02:29:34 *** ChanServ sets mode: +v SimpleIsGood
02:35:18 *** SimpleIsGood has left #gnucash
02:35:26 *** SimpleIsGood has joined #gnucash
02:35:26 *** ChanServ sets mode: +v SimpleIsGood
02:37:44 *** Mechtilde has quit IRC
02:40:53 <SimpleIsGood> I do apologize if this question comes through twice - but I would be very interested in finding out how to save my GnuCash file to mySQL. Currently when I use the Save As dialogue box, I get the error: "The server at URL mysql://root@localhost/gnucash experienced an error or encountered bad or corrupt data." I may need some polinters on setting up the database as well... Thanks!!
02:55:57 *** Hamaryns has joined #gnucash
02:55:57 *** ChanServ sets mode: +v Hamaryns
03:00:47 *** omnireq_ has joined #gnucash
03:01:59 *** omnireq has quit IRC
03:02:04 *** omnireq_ has quit IRC
03:02:14 *** omnireq_ has joined #gnucash
03:29:09 *** suukim has joined #gnucash
03:48:28 *** Mechtilde has joined #gnucash
04:16:25 *** gjanssens has joined #gnucash
04:16:25 *** ChanServ sets mode: +o gjanssens
04:23:46 *** keiffer has joined #gnucash
04:27:28 <gjanssens> .
04:27:28 <gncbot> gjanssens: Sent 11 hours and 13 minutes ago: <jralls> Note on boost::program_options, it seems not to be documented but a look at the sources shows that it signals its errors by throwing so you need try-catch blocks around everything.
04:28:06 <gjanssens> @tell jralls I noticed that indeed yesterday, but didn't mention it yet.
04:28:06 <gncbot> gjanssens: The operation succeeded.
05:10:29 *** Unhammer has quit IRC
05:21:01 *** Hamaryns has quit IRC
05:21:33 *** User_ has joined #gnucash
05:24:05 *** Unhammer has joined #gnucash
05:28:25 *** Hamaryns has joined #gnucash
05:28:25 *** ChanServ sets mode: +v Hamaryns
05:52:31 *** lmat has quit IRC
05:52:36 *** lmat has joined #gnucash
05:57:11 <chris> my cli work seems fine. tested: standard report, saved-report, saved-report export CSV
05:57:13 <chris> oops
06:02:14 <chris> gjanssens: I know you are very short of time, any glaring objections to merging #706? swap new reports with old ones.
06:11:39 <gjanssens> chris: not at all. Go for it.
06:12:43 <chris> ok. here goes :)
06:14:12 <gjanssens> chris: meanwhile my gnucash-cli is structured as I want. I have just pushed to my branch https://github.com/gjanssens/gnucash/tree/gnucash-cli
06:14:48 <gjanssens> While I still have to do cleanups I think it's about ready to rebase your cli code on top of it.
06:15:35 <chris> cool :) I've just pushed change to allow --run-report=saved-reports-only.
06:15:50 <gjanssens> It will require changes: your options should be added in gnucash-cli: Gnucash::GnucashCli::configure_program_options
06:16:11 <chris> #706 will still allow old owner-report / aging / balancesheet etc via --extras
06:16:20 <gjanssens> And then parsing of the options is in Gnucash::GnucashCli::parse_command_line
06:17:08 <gjanssens> The actual execution is in two steps: in Gnucash::GnucashCli::start you can test whether your option is set and if so, call a function in gnucash-commands.cpp with the parameters your function needs.
06:17:11 *** sbluhm has quit IRC
06:17:30 <gjanssens> Only inside gnucash-commands, the scm_boot_guile call should be added.
06:18:35 <gjanssens> As for #706, will you rename the old reports to "bla (deprecated)" or something similar ?
06:19:00 <chris> yes, and untranslated to avoid tranlsator burden
06:19:17 <chris> Old-Report (Legacy)
06:19:28 <gjanssens> Sweet
06:23:23 <chris> will be doing last minute live testing.
06:28:36 *** Jimraehl1 has joined #gnucash
06:33:05 *** Aussie_matt_ has quit IRC
06:45:14 *** Hamaryns has quit IRC
07:14:02 *** Hamaryns has joined #gnucash
07:14:02 *** ChanServ sets mode: +v Hamaryns
07:30:37 *** shaggy has quit IRC
07:31:42 *** shaggy has joined #gnucash
08:12:49 <chris> gjanssens: gnucash-cli isn't installed with ninja install?
08:14:28 <gjanssens> Hmm, perhaps not... I'll look into that
08:44:00 *** Hamaryns has quit IRC
08:57:33 *** Hamaryns has joined #gnucash
08:57:33 *** ChanServ sets mode: +v Hamaryns
09:20:49 <warlord> chris, IMHO I think gnucash-cli should work on any report, not just saved ones. Often some of the default reports are "correct" as-is, even if you cannot set options on the command-line
09:21:48 <chris> in principle I don't mind. but I have fancy error message when user selects a nonexistent report: dumps all available reports. this creates a huge list.
09:25:26 <warlord> How huge> There are what, 2 dozen reports? Haven't you seen multi-page --help output before? I don't see the problem.
09:32:51 <chris> I'll do test run and paste.
09:33:28 <fell> SimpleIsGood, just a security note: Don't run user programs as root!
09:35:34 <warlord> chris, test run | wc -l
09:35:50 <warlord> (feel free to paste a couple lines -- no need to paste 20)
09:36:12 <chris> i'll be in 30mns or so.
09:52:44 <warlord> ok
10:00:29 <chris> warlord: here's paste: https://pastebin.com/raw/fRvSC0is - prefix C means saved-report
10:01:25 <chris> from my pov, overwhelming
10:03:31 <warlord> Would be less overwhelming if you sorted them in alphabetic order.
10:08:42 *** YeOldHinnerk has joined #gnucash
10:08:45 <chris> https://pastebin.com/raw/FXY4uJu4 ?
10:08:55 <YeOldHinnerk> Hi. New question, concerning CSV import.
10:09:24 <YeOldHinnerk> I essentially parsed my credit card bill with powershell to containt three column: Booking date, amount and comment, tab seperated.
10:09:46 <YeOldHinnerk> I would like to import this and have the Bayes algorithm handle matching the accounts.
10:10:00 <YeOldHinnerk> But already at import, the file is not previewed properly.
10:10:26 <chris> warlord: still keen for full list?
10:10:31 <YeOldHinnerk> It seems to just show the first char
10:11:03 <YeOldHinnerk> the correct entry is 30.12.2019 and only a 3 is shown, nothing else from the file.
10:11:13 <YeOldHinnerk> Obviously, I have changed seperator to tab
10:11:36 <YeOldHinnerk> and double checked on encoding, date format and amount format
10:12:03 <YeOldHinnerk> Is GC epxecting the columns in a certain order? SHould it be in quotes?
10:19:15 <YeOldHinnerk> i mean, shoudld ech entry be in quotes?
10:20:16 <YeOldHinnerk> ah, got it. was not utf-8
10:20:19 <YeOldHinnerk> puh
10:20:22 <fell> YeOldHinnerk: I would export a short example account to see an accepted format.
10:21:43 <fell> and the windoows default charset is an acestor of utf-16.
10:25:57 *** omnireq_ has quit IRC
10:33:52 *** Mechtilde has quit IRC
10:58:53 <chris> gjanssens: may not have much time for hacking tomorrow. feel free to test/cleanup your #5!
10:59:35 *** Hamaryns has quit IRC
11:11:29 <gjanssens> chris: what's my #5 ?
11:12:57 <chris> PR #5 on your github
11:15:51 <gjanssens> chris: against what repo that is ? There's not PR #5 for Gnucash/gnucash ...
11:16:03 <fell> did someone else see: FAILED: lib64/guile/2.2/site-ccache/gnucash/reports.go
11:16:09 <fell> on masterß
11:16:14 <fell> ?
11:16:39 <chris> gjanssens: https://github.com/gjanssens/gnucash/pull/5
11:17:17 <gjanssens> ok! I missed you created a PR against my repo...
11:17:24 <gjanssens> I'll see what I can do
11:17:53 <chris> warlord wishes to include *all* reports, so there are decisions pending
11:18:39 <chris> result = https://pastebin.com/raw/FXY4uJu4
11:20:00 <chris> there's https://github.com/gjanssens/gnucash/pull/4/ too...
11:20:23 <fell> Similar like Christian Grubers report on -devel it ends with: no code for module (gnucash reports standard new-aging)
11:24:07 <warlord> chris, sure. I think it's fine.
11:24:39 *** angel has joined #gnucash
11:26:23 <chris> warlord: ok. in any case we'll want to hide the 'in-menu=#f reports.
11:26:36 <warlord> Probably
11:28:07 <chris> these things are never easy :(
11:29:34 <fell> gjanssens, your last commit broke something
11:30:20 *** omnireq has joined #gnucash
11:30:20 *** ChanServ sets mode: +v omnireq
11:30:55 <gjanssens> Oops, indeed. Forgot to add the newly created CMakeLists.txt files
11:31:11 <gjanssens> I'm in the middle of a git bisect. Once that's done, I'll push a fix.
11:37:03 *** jervin has joined #gnucash
11:39:29 *** guak has joined #gnucash
11:40:32 *** ArtGravity has joined #gnucash
11:40:32 *** ChanServ sets mode: +v ArtGravity
11:44:29 *** sbluhm has joined #gnucash
11:44:30 *** ChanServ sets mode: +v sbluhm
11:46:47 *** angel has quit IRC
11:48:38 <chris> warlord: here is the in-menu? list: https://pastebin.com/raw/1RZz3dAA -- 63lines.
11:49:00 *** sbluhm has quit IRC
11:50:40 <warlord> Seems perfectly reasonable to me.
11:50:52 <gjanssens> chris: that's fine for me as well
11:54:58 <chris> gjanssens: ok pushed onto your PR.
11:56:00 <gjanssens> chris: ok, thanks
11:56:43 <chris> with that, nite!
11:56:46 <gjanssens> I'll massage it from there
11:56:50 <gjanssens> Good night!
12:12:16 *** Simon has quit IRC
12:16:43 *** fell has quit IRC
12:17:02 *** fell has joined #gnucash
12:17:03 *** ChanServ sets mode: +o fell
12:17:23 *** Simon has joined #gnucash
12:17:23 *** ChanServ sets mode: +v Simon
12:36:41 *** waeking has quit IRC
12:38:51 *** Simon has quit IRC
12:41:09 *** Simon has joined #gnucash
12:41:09 *** ChanServ sets mode: +v Simon
13:00:08 *** YeOldHinnerk has quit IRC
13:02:05 *** Mechtilde has joined #gnucash
13:27:33 *** sbluhm has joined #gnucash
13:27:33 *** ChanServ sets mode: +v sbluhm
13:33:15 *** waeking has joined #gnucash
13:33:15 *** ChanServ sets mode: +v waeking
14:16:45 *** frakturfreak has joined #gnucash
14:16:45 *** ChanServ sets mode: +v frakturfreak
14:26:16 *** suukim has quit IRC
16:19:26 *** shaggy has left #gnucash
16:20:56 *** SimpleIsGood has quit IRC
16:23:07 *** SimpleIsGood has joined #gnucash
16:23:35 *** keiffer has quit IRC
16:32:47 *** Mechtilde has quit IRC
16:35:41 *** marusich has joined #gnucash
16:35:41 *** ChanServ sets mode: +v marusich
16:42:31 *** sbluhm has quit IRC
17:00:11 *** marusich has quit IRC
17:06:50 <gjanssens> jralls: I have pushed my gnucash-cli branch, including your and chris' PRs
17:07:24 <jralls> gjanssens, OK. Webkit is still grinding away, but I'll pull and test on MacOS now.
17:07:24 <gncbot> jralls: Sent 12 hours and 39 minutes ago: <gjanssens> I noticed that indeed yesterday, but didn't mention it yet.
17:07:28 <gjanssens> I had to tweak chris' in a few spots, but the current result does generate reports, and properly fetches quotes
17:07:49 <jralls> OK. Did you run distcheck on it?
17:07:53 <gjanssens> Yes
17:08:10 <gjanssens> Completed successfully
17:08:16 <gjanssens> There are known issues:
17:08:27 <jralls> Well, yeah, you wouldn't have pushed if it failed.
17:09:00 <gjanssens> - translations don't all work: apparently there's something wrong or missing for boost::locale::translate to find translated strings
17:09:41 <gjanssens> gettext can extract them so our message catalogs are ok, but running the application in another language won't show translated strings when using boost::locale::translate
17:09:44 <jralls> I wondered why you decided to do that instead of using gettext.
17:10:05 <gjanssens> Because it integrates better with iostreams
17:10:13 <gjanssens> It's not a new issue though.
17:10:29 <gjanssens> I already used this in the csv importer and that string doesn't get translated either.
17:10:35 <gjanssens> Not even on maint
17:10:50 <gjanssens> But we can look at this for the next beta
17:11:10 *** laerling has joined #gnucash
17:11:22 <jralls> Does stream << _("mystring") << "\n"; not work?
17:11:58 <gjanssens> - second issue: gnucash-cli currently doesn't load /etc/gnucash/config.scm and GNC_CONFIG_DIR/user-conf.scm
17:12:21 <jralls> That sounds like a featyre.
17:12:22 <gjanssens> That's a minor issue which can probably be fixes with little effort. Just didn't make it for this evening
17:12:28 <gjanssens> :D
17:13:03 <jralls> Seriously, this running external scheme is a big attack vector. We really shouldn't be doing it.
17:13:28 <gjanssens> Let's keep it at that for now. However that means if a user has a self-written report which is loaded via user-conf.scm, that report can't be printed via chris' --run-report option
17:13:36 <gjanssens> Other than that I completely agree
17:14:17 <gjanssens> We need to find another way to include custom reports. Outside of the scope of this work though.
17:14:26 <jralls> Roger.
17:14:53 <gjanssens> - third issue: gnucash sometimes produces critical warnings when exiting.
17:15:14 <jralls> To stdout or to the log?
17:15:19 <gjanssens> I haven't investigated and am not even sure this is due to my work but I thought I'd just mention it
17:15:21 <gjanssens> stdout
17:15:35 <jralls> Huh. What kind of warnings?
17:16:23 <gjanssens> sys:1: Warning: instance with invalid (NULL) class pointer
17:16:25 <gjanssens> sys:1: Warning: g_signal_handler_disconnect: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
17:16:53 <gjanssens> They don't seem to cause any issues. Just didn't have time to debug.
17:16:57 *** jervin has quit IRC
17:17:24 *** jervin has joined #gnucash
17:17:57 <gjanssens> As for translations, yes << _("message") works.
17:18:24 <gjanssens> It gets messier when you have parameterized strings.
17:19:19 <gjanssens> I'll poke at it somewhere next week and if I can't find a proper solution, I'll probably drop the boost::locale::format and boost::locale::translate uses.
17:19:25 <jralls> Ah, right, because of no operator <<. But that mechanism is very translation-resistant and really shouldn't be used for translated strings.
17:20:16 <gjanssens> I'm not sure I understand what you're trying to say
17:21:27 <jralls> I think I misunderstood how the formatted strings are processed. I guess boost::locale::format replaces g_strdup_printf for inserting the parameters rather than using stream operators to do so.
17:21:42 <gjanssens> Exactly
17:22:40 *** User_ has quit IRC
17:23:37 <gjanssens> I did dig into the translation issue a bit and at first sight it looks like we're missing a way to set the path where locale should look for translated messages.
17:23:53 <gjanssens> For C that's done in the bind_gettext_domain call
17:24:09 <gjanssens> For boost::locale this can be passed via a generator
17:24:19 <gjanssens> But for std::locale I have no clue
17:24:46 <jralls> Don't worry about std::locale. It's basically not implemented on MinGW.
17:24:55 <gjanssens> I also don't know if boost::locale will work correctly with a std::locale (which is what we set up via gnc_get_locale)
17:27:16 <gjanssens> Hm, I see in gnc_get_locale you're using std::locale::classic on Windows
17:27:33 <jralls> Yes, that's explained in the comment.
17:27:35 <gjanssens> Will that be set to the proper language to find translations ?
17:28:23 <jralls> We can't use std::locale for actual localization. That's why we use boost::locale with the ICU backend.
17:29:37 <gjanssens> Where is that configured or initialized ? I didn't find that
17:29:48 <jralls> ISTR there's a way to configure boost::locale to use gettext for the message catalog and ICU for everything else. We need to do that if we're going to use boost::locale::translate because ICU uses a different message catalog format.
17:31:14 <jralls> I don't think it is yet. I think I found other problems with boost::locale and gave up on it, but I'll have to go dig to refresh my memory.
17:31:35 <gjanssens> Oh I see. It's spread all over the place. Each source that uses it reinitializes its own boost::locale::generator.
17:31:44 <gjanssens> And from there takes translations.
17:32:08 <jralls> I don't think there's any translating. We use it for formatting dates and numbers.
17:32:28 <gjanssens> I can work from there. Clearly my use of boost::locale::translate in gnucash, gncuash-cli and cvs-import are working with the wrong locale
17:32:43 <jralls> Probably.
17:32:48 <gjanssens> I found an example in file-path-utils.cpp. I think that one works.
17:32:52 <gjanssens> I'll try later.
17:33:04 <gjanssens> Now it's time to take some rest.
17:33:13 <jralls> OK, good night!
17:33:22 <gjanssens> See you later and good luck on the Windows side!
17:33:27 <jralls> Oh, the Mac build completed, no problem.
17:33:36 <gjanssens> Yay !
17:33:45 <gjanssens> Hopefully it runs as well
17:34:13 <jralls> The trick will be getting it to work in the bundle.
17:34:32 <gjanssens> Ah indeed.
17:34:57 * gjanssens makes a note to add it to the Windows installer as well once Windows builds again.
17:35:13 <gjanssens> If not, gnucash-cli on Windows will be for the next beta
17:35:21 <gjanssens> Bye again!
17:35:37 *** gjanssens has quit IRC
17:42:18 *** marusich has joined #gnucash
17:42:18 *** ChanServ sets mode: +v marusich
18:46:37 *** ArtGravity has quit IRC
18:53:24 <chris> gjanssens forgot to merge my cli work :(
18:55:24 *** Unhammer has quit IRC
18:58:03 <jralls> chris, I'm working on it now. I've got it to build and to actually do something, but when I tell it "gnucash-cli --run-report "Balance Sheet" --input-file "actual file" it crashes.
18:58:52 <jralls> https://gist.github.com/jralls/0d481853aee0bfe8d16da4f7c11f2c37
19:01:07 <chris> it's in report-core.scm, does gnucash-commands.cpp load report module?
19:02:09 <jralls> line 141: scm_c_use_module ("gnucash reports");
19:04:18 <chris> maybe show me your branch
19:04:40 <jralls> Doesn't 'gnc:cmdline-run-report' need to be re-exported in reports.scm?
19:05:01 <chris> define-public does define+export together
19:05:17 <chris> to answer this question: maybe...
19:05:46 <jralls> If gnucash-commands directly used report-core, yeah.
19:06:15 <chris> the module/export system is still somewhat opaque for me...
19:10:14 *** omnireq has quit IRC
19:10:57 <jralls> OK, so I changed gnucash-commands to say "gnucash report" and exported gnc:cmdline-run-report in report/report.scm because that's the module that exports report-core.
19:11:27 <jralls> No more crash, it says it can't find "Balance Sheet". Do I tell it the scheme name of the report?
19:12:14 <chris> hmm are you using the one on gjanssens's branch? I think it doesn't find standard reports, saved-reports only. give me a sec.
19:13:31 <jralls> It has instead of saved-reports only, dump in-menu? reports alphabetically
19:13:50 <chris> first few lines should be: https://pastebin.com/raw/tsC1LYtS
19:14:17 <chris> i'd forgotten to update the report->template code
19:15:06 *** Unhammer has joined #gnucash
19:15:06 *** ChanServ sets mode: +v Unhammer
19:15:30 <jralls> No, it's not quite that. Should I replace the current template with that?
19:15:45 <chris> yes
19:17:05 <chris> the pastebin code will convert string->report whereby *any* report-name matches, or it matches *any* report-guid.... but the error-message will dump in-menu? ones only.
19:19:46 <jralls> Still says it can't find "Balance Sheet", and it doesn't list any valid reports.
19:20:01 <chris> ah did you scm_use_module ("gnucash reports") as well?
19:20:47 <jralls> Nope, trying that.
19:24:13 <jralls> Progress, now it compalins "ice-9/boot-9.scm:1303:15: In procedure struct_vtable: Wrong type argument in position", with "In report-core.scm: 784:30 1 (template-export "Balance Sheet" _ "" "" #t)" in the bt.
19:24:21 *** frakturfreak has quit IRC
19:24:52 <jralls> If I give it a bogus name it does nicely list out the reports.
19:25:16 <chris> maybe gjanssens changed the C type of reportname
19:26:01 <chris> no, the 2nd parameter should be the template found
19:26:18 <chris> this means my pastebin still buggy
19:26:39 <chris> if you --run-report=guid I'm sure it'll work
19:28:34 <chris> h*ck... (templat-export ...) should only be called if --export-type=XXX is present
19:28:47 <chris> I know why: gjanssens changed the C code
19:29:17 <chris> it used to be SCM export_type = export_type ? scm_from_utf8_string (args->export_type) : SCM_BOOL_F;
19:29:40 <jralls> Where are you?
19:29:54 <chris> physically still in Oz
19:30:06 <jralls> No, silly, what function?
19:30:10 <chris> :)
19:30:31 <chris> "SCM export_type = export_type ? scm_from_utf8_string (args->export_type) : SCM_BOOL_F;" was in gnucash-commands.cpp / gnucash-bin.c
19:32:11 <jralls> Are you referring to https://github.com/christopherlam/gnucash/commit/c3fd2595dc6469f52532599a303cc864aedf3e7d#diff-6bbb5bc88ddf3c96e9b8b29805a65076R152
19:33:03 <chris> yesyes
19:33:08 <jralls> gjanssens didn't touch that. I got it directly from your repo and cherry-picked it and the follow-on commit onto master.
19:36:25 <chris> maybe I'll redo the whole PR. may have to do at end of day, have lots of jobs today
19:41:23 <jralls> I think I see the problem. You're testing e.g. args->export_type but that's passed a std::string.c_str() which can't be nullptr.
19:41:50 <chris> ah that's why they use str.empty()
19:42:08 <jralls> Yes it is. I'll change the struct to hold the const std::string& so we can do exactly that.
19:51:32 <chris> be away for a while.
19:52:01 <jralls> OK. It still doesn't work. I'll make another gist for you.
19:53:41 <jralls> https://gist.github.com/jralls/d295897b0eb2df30324842648db45bcc
20:07:28 <jralls> I found it, I tested export_type.empty(), wanted !export_type.empty().
20:08:02 <jralls> The report itself doesn't work, of course: This report requires accounts to be selected in the report options.
20:08:13 <jralls> But that's OK. I'll commit and merge.
20:21:23 <chris> \o/
20:21:48 *** guak has quit IRC
20:30:03 <chris> jralls: doesnt find saved-reports.
20:39:50 <chris> jralls: plus, need to doublecheck it's loading datafile properly. price-quotes and run-report specify datafile differently.
20:51:59 *** omnireq has joined #gnucash
22:03:28 *** jralls has quit IRC
22:04:10 *** jralls has joined #gnucash
22:04:11 *** ChanServ sets mode: +o jralls
22:38:15 *** Gerd1 has joined #gnucash
22:38:51 *** Gerd has quit IRC
22:38:51 *** Gerd1 is now known as Gerd