Command line to dump data as plain text files

David Carlson david.carlson.417 at gmail.com
Sun Apr 16 11:05:36 EDT 2017


Cy Lim,

Just in case you want to change you data file after you read it, try to do
it through the regular GnuCash program.  It is very easy to 'break' the
file and make some data unreadable or inconsistent if you use a text
editor, or, in some cases even with a database editor.

David C

On Sun, Apr 16, 2017 at 9:42 AM, John Ralls <jralls at ceridwen.us> wrote:

>
> > On Apr 13, 2017, at 7:52 AM, CY Lim <cheeyee.lim at gmail.com> wrote:
> >
> > Hello all,
> >
> > I cannot seem to find how to use command line to dump data from GnuCash
> > into a single or multiple plain text files (e.g. csv). Any suggestion
> will
> > be helpful.
> >
> > If that cannot be done with command line, I am happy to use API provided
> in
> > C or Python to access the data. Some examples or documentations are
> > appreciated.
> >
> > I want to avoid manual parsing of the files, unless what I need is not
> > doable with the 2 methods above.
>
>
> There is no export facility available from the command line, and only
> limited export (of transactions and splits to csv) from the GUI. You can of
> course get to any data you want from C and to most of it from Python, and
> there's also https://github.com/sdementen/piecash <
> https://github.com/sdementen/piecash>, a third-party framework for
> working with the XML file. But...
>
> GnuCash uses by default a plain text file in XML, though it may be
> compressed with gzip. You can turn off compression in Preferences, on the
> General tab, or you can gunzip the file; GnuCash doesn't care about
> compression at load time. The not-default storage is in SQL with one of
> SQLite3, MySQL, and PostrgresQL. Most people who want to query their
> GnuCash data outside of GnuCash find that to be the easiest way.
>
> Regards,
> John Ralls
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


More information about the gnucash-user mailing list