[GNC] csv export via terminal in Ubuntu

John Ralls jralls at ceridwen.us
Wed Feb 13 20:26:16 EST 2019



> On Feb 12, 2019, at 1:34 AM, saihttam via gnucash-user <gnucash-user at gnucash.org> wrote:
> 
> Hello everybody,
> I'm looking for a way to start the csv export via terminal command. Are
> there solutions to work around the GUI? Or is it possible to convert all
> accounts and bookings directly from a .gnucash file to a .csv file per
> terminal?
> 
> Thanks in advance

The only thing thing you can do without starting the GUI is to retrieve prices, and the import-export code isn't swigged to enable access via Scheme or Python. The simplest way to get a CSV import outside of GnuCash's GUI would be to use a SQL backend and write a SQL query that formats the data you want as a CSV. You could also use XML tools (XSLT, XPATH, or XQuery) on an XML file, or you could write a C/C++ program and link the necessary GnuCash libraries.

Regards,
John Ralls


More information about the gnucash-user mailing list