further custom reports

44 views
Skip to first unread message

Christopher Lam

unread,
Oct 5, 2016, 10:04:56 AM10/5/16
to piecash
Dear Seb
I wonder if you have thought about linking jinja2 with piecash to produce easy reports?
If not I'll do my own links.
Chris

Sébastien de Menten

unread,
Oct 5, 2016, 2:56:23 PM10/5/16
to Christopher Lam, piecash
Hello Chris,

In the piecash docs, you see a rather simple use of jinja2 with piecash (http://piecash.readthedocs.io/en/latest/tutorial/examples.html#filtered-transaction-reports).
I think mixing jinja2 and piecash is a "match made in heaven" (specially compared to the scheme reporting in gnucash). I haven't explored further than the simple example in the doc as I do not have specific needs for reporting. 

Using piecash+jinja2 could ease the generation of :
- invoices (via latex or other type setting),
- export to other formats (xml, ledger http://www.ledger-cli.org/, QIF, ...)

If you also know pandas, you get easy:
- time series analysis (prices, account balances, ...) 
- export of time series to json, csv, xlsx, ...
- plotting 

These benefits are probably difficult to replicate in C++ and so maybe difficult to get in the future in gnucash itself...

seb

--
You received this message because you are subscribed to the Google Groups "piecash" group.
To unsubscribe from this group and stop receiving emails from it, send an email to piecash+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/piecash/cbdf1185-218a-42d8-ab08-e99a82aaf838%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher Lam

unread,
Oct 6, 2016, 7:08:55 AM10/6/16
to piecash
Thank you... so helpful.  Small typo in your jinja2 example script today Oct 2016. As you can tell I'm not a regular programmer.

-        {{ spl.value.__abs__() }} {% if spl.value < 0 %} --> {% else %} <-- {% endif %} {{ spl.account.fullname() }} : {{ spl.memo }}
+        {{ spl.value.__abs__() }} {% if spl.value < 0 %} --> {% else %} <-- {% endif %} {{ spl.account.fullname }} : {{ spl.memo }}

spl.account.fullname is not callable

Christopher Lam

unread,
Oct 6, 2016, 11:37:51 AM10/6/16
to piecash
PS still so grateful for piecash!
I have a feeling that custom reporting via pandas and jinja2 is the way forward, I will continue work on it in my spare time!
Reply all
Reply to author
Forward
0 new messages