Easier reports with eguile-gnc
cgdennis at btinternet.com
Mon Apr 6 11:02:17 EDT 2009
A couple of points that I left out of my previous posting.
eguile-gnc.scm works in two phases: it converts the HTML/eguile template
to a Guile script, and then it evaluates the script.
The conversion from template to script could be done at any time (i.e.
it only needs to be done once), and the script could be cached
somewhere, ready to be evaluated every time the report is opened or
reloaded. (But note the comment I made before, that development is
easier if the script is not cached.)
eguile-gnc.scm currently exports a single function that does both phases
-- given the name of a template file, it returns the result of
evaluating the script (which is hopefully a string of HTML).
I can very easily add a couple of extra functions to eguile-gnc.scm if
anyone thinks they are required -- one to do the conversion, and one to
do the evaluation.
Andrew Sackville-West wrote:
> ...and if the intervening
> gnc-document step could be removed, ...
I've got a very simple patch for this, which allows a report to return
HTML as a string, rather than returning a gnc-document.
Chris Dennis cgdennis at btinternet.com
Fordingbridge, Hampshire, UK
More information about the gnucash-devel