Easier custom reporting (maybe Lua)?
jralls at ceridwen.us
Sun Oct 23 10:46:15 EDT 2016
> On Oct 23, 2016, at 3:46 AM, Julien Cornebise <julien.cornebise at gmail.com> wrote:
> Dear Gnucash team
> Is there a simpler way to build custom reports than learning Scheme? E.g.,
> what would it take to add Lua support?
> I'm trying to create various custom reports on my account [to handle joint
> accounts and shared expenses], and find it somewhat complicated -- eg.
> compared with MoneyManagerX, which uses SQL+Lua (
> I love GnuCash's precision and its ecosystem (great forum, great chat,
> great doc), but would be so much happier if I could customise on a week-end
> and contribute back...
The easiest way to generate custom reports is to save to SQLite and then query the database with SQL.
There are also Python bindings to the GnuCash C API which you can use to query data and generate reports, or you can as Sebastian suggests use his PyCash python library to access the data.
But if you want to add reports that are displayed inside of GnuCash then Scheme is at present the only way. We'd like to change that but there's a lot of work that has to happen first and there aren't a lot of people working on it.
We're not at all interested in adding another interpreter to GnuCash; in the very long run we'd like to get rid of the one we have. API bindings are another matter, though. We use SWIG to generate the bindings, so if SWIG supports Lua it shouldn't be too hard to add Lua bindings. That still won't get access to the bits of GnuCash written in Scheme because SWIG only works on C and C++. The development team doesn't have time (or frankly interest) to do the work, but we'd be willing to consider a pull request.
More information about the gnucash-user