2024-02-06 GnuCash IRC logs
01:50:25 *** fell has quit IRC
01:51:45 *** fell has joined #gnucash
01:51:45 *** ChanServ sets mode: +o fell
02:11:31 *** giuseppef has quit IRC
03:32:49 *** gjanssens has joined #gnucash
03:32:49 *** ChanServ sets mode: +o gjanssens
03:34:20 <manis> Seeing WebKit being mentioned here, I was wondering if using a different method to generate reports other than HTML has ever been pursued?
05:10:59 *** chris has joined #gnucash
05:10:59 *** ChanServ sets mode: +v chris
05:10:59 *** gncbot sets mode: +o chris
06:26:59 *** chris has quit IRC
06:45:22 *** chris has joined #gnucash
06:45:22 *** ChanServ sets mode: +v chris
06:45:23 *** gncbot sets mode: +o chris
07:13:07 *** warlord has quit IRC
07:14:31 *** warlord has joined #gnucash
07:14:31 *** gncbot sets mode: +o warlord
07:38:07 *** warlord has quit IRC
10:01:08 *** warlord has joined #gnucash
10:01:10 *** gncbot sets mode: +o warlord
10:29:40 *** chris has quit IRC
13:52:58 <jralls> manis, I've suggested that many times but so far nobody's bitten.
14:45:09 <manis> jralls: i have bitten, pretty much all my teeth out trying to get anything closely acceptable out of GNUCash reports.
14:45:42 <manis> I've kinda given up and my next attempt will be to extract the data I need from the GNUcash XML and set it with TeX.
14:46:56 <manis> HTML seems like the worst choice for generating print. I couldn't even get it to not insert a page break into the middle of a table row.
14:46:57 <manis> Let alone repeat the thead on every page.
14:47:20 <manis> jralls: what have you been thinking of using technology-wise?
15:13:53 *** palerider has joined #gnucash
15:13:58 *** palerider has left #gnucash
15:29:18 <jralls> manis, I think PDF would be the most straightforward, but it would need a different way of generating graphs.
15:29:51 <manis> jralls, sure, but how do you generate the PDF?
15:29:56 <manis> s/do/would/
15:31:08 <jralls> Ghostscript?
15:31:46 <manis> oh, you would generate PDF directly without any library or intermediate language.
15:32:00 <jralls> Ghostscript is a library.
15:34:28 <jralls> It's actually a full Postscript implementation of which PDF is a subset. There might be more lightweight alternatives, but even with its heft GS is a lot lighter than WebKit!
15:35:04 <warlord> How would we show the report in-line, or is that no longer a requirement?
15:35:21 <manis> warlord, display the generated PDF?
15:35:38 <manis> That would also be great because it would serve as a print preview at the same time.
15:36:13 <manis> jralls, I get that Ghostscript is a Postscript implementation but writing PostScript is not the easiest thing to do. You'd be left with doing all the layout manually, no?
15:39:23 <jralls> More manually than with HTML + CSS I suppose because they have reasonably sensible defaults. PS doesn't have CSS either so we'd need some other way to do stylesheets.
15:42:12 <manis> I have never used them but there are some libraries generating PDF output from HTML or HTML-like input. I've never used them, though.
15:42:27 <manis> And I don't think they use a full web browser in the back.
15:42:46 <manis> But the result would probably be just as typographically-unpleasing as print from the web is.
15:46:30 <warlord> manis, ignore the "PDF" part. Right now GnuCash displays the report to the user. Are you proposing that we drop that functionality and only output direct-to-PDF?
15:47:08 <manis> warlord, no?
15:47:43 <manis> GnuCash generates HTML which is then rendered in GnuCash. GnuCash could also generate a PDF and display that PDF inline in GnuCash.
15:48:33 <manis> Or do you think that is too static because it would not adjust to the user's window size?
15:49:21 <warlord> I don't know -- I'm just looking at feature-functionality and usability.
15:49:32 <warlord> I agree that the table cutoff is really annoying.
15:49:39 <jralls> https://gitlab.gnome.org/GNOME/evince
15:50:19 <jralls> And https://github.com/libharu/libharu to generate the pdf.
15:51:44 <jralls> That still leaves generating the graphs that we currently do with https://www.chartjs.org/, but that's strictly a browser-land thing.
15:52:05 <warlord> Is evince a library that one can embed?
15:52:09 <warlord> (I use the evince app)
15:52:58 <manis> warlord, I think so, yes. I believe Epiphany used it like this in the past.
15:53:11 <manis> But there's also alternatives live poppler which can be embedded.
15:54:07 <manis> jralls, do you know TeX?
15:56:20 <jralls> Not anymore. I did some work with it 20 years or so ago.
15:57:24 <manis> I think it would be an almost perfect fit. It renders tables well and with PGF/TikZ can produce some delicious charts, but I don't know if it the TeX sources could be bundled with GnuCash in a sensible way.
16:06:42 <jralls> Well, there's https://gitlab.gnome.org/swilmet/gnome-latex. Dunno what else it needs, but most TEX implementations I've seen are pretty huge.
16:12:47 <jralls> https://en.wikipedia.org/wiki/PGF/TikZ looks pretty low-level, we'd need a layer (preferably written and maintained by somebody else) to provide a business graph abstraction.
16:29:14 <jralls> Hmm, plus it's in Lua, so yet another interpreter.
16:30:29 <jralls> So TEX might be a wonderful way to generate gorgeous reports, but I think there's a reason that one doesn't see it used much for anything short of a book anymore.
16:36:50 <manis> jralls, gnome-latex is just an editor, PGF/TikZ is huge - some of it is low level but you can get plots with just a dozen of lines, Lua? Only when you use lualatex.
16:39:12 <manis> I did some searching on the internet and there's a ton of PDF libraries. So I think chances are one could fit GnuCash's use case, only need to find the right one.
16:48:12 *** gjanssens has quit IRC
17:43:54 *** giuseppef has joined #gnucash
17:43:54 *** ChanServ sets mode: +v giuseppef
18:27:59 <jralls> manis, so if gnome-latex is just an editor we'd need a TEX stack. Looks like we could get what we need from https://miktex.org/.
18:53:34 <jralls> The catch is that it's not in any Linux distro except Arch. We'd need to extract the bits we need and make them a subproject.
20:00:02 *** raghukamath has quit IRC
20:14:56 *** raghukamath has joined #gnucash
20:14:56 *** ChanServ sets mode: +v raghukamath
21:05:08 *** blr has joined #gnucash
21:05:17 *** ChanServ sets mode: +v blr
21:55:38 *** blr has quit IRC