Automating/scheduling reports in GnuCash?

Anonymous Remailer (austria) mixmaster at remailer.privacy.at
Tue Feb 19 13:58:17 EST 2013


Buddha Buck <blaisepascal at gmail.com> writes:

> Is there a way to schedule or automate the creation of reports for GnuCash?
>
> Like, say I wanted to print to PDF a Customer Report for all my
> customers each month, so I could email them a monthly statement.
>
> I just got through doing that for my current set of 26 customers; I'd
> hate to think of doing that by hand when/if I get scores more.

You can do it with 3rd party tools - and it's easy if you use linux and
are familiar with the LaTeX typesetting tool (difficult otherwise).

1) Make sure your GC file is saved /without/ compression (by default,
compression is used).

2) Install "Ledger CLI".  This is a commandline tool that can extract
transactions from a gnucash file based on regular expressions.  Think of
it as a grep for gnucash.

3) Write a shell script that will run ledger.  Form the ledger command
so that CSV files are created.  Then the script should output the latex
code (or use a template).  There is a latex package called "datatool"
which imports CSV files and produces a table.  Once the latex generates
okay, compile it to PDF.  You could have cron kickoff the script on a
monthly basis.

If the latex-pdf approach is overkill, you can alternatively use ledger
with nroff, and generate text tables.


More information about the gnucash-user mailing list