Hi,

I have a fairly long history of transactions in my ledger files and I
would like to generate some pretty reports from this data. Think a one-
page PDF (or HTML) file that opens with a sentence like "this month's
revenue was X, expenses were Y, P% higher than average" and then has
some charts about, say, distribution of expenses, historical data,
comparison with forecast data.

I guess many people on this list have a similar thing running already,
so I would like to hear about recommendations with respect to
toolchain, libraries, etc. that you are using.

Currently I have an emacs org-mode file and use babel to get the ledger
output, as follows:

```
#+TITLE: Financial Report
#+PROPERTY: header-args  :results output  :exports results  :cache true
#+PROPERTY: header-args+ :var F="-f all.ledger" :var MONTH="sep 2019"

#+BEGIN_HTML
<link rel="stylesheet" href="web/graphs.js" />
#+END_HTML

#+BEGIN_SRC sh
PARAMS="${F} --effective -p ${MONTH}"
ledger balance $PARAMS Expenses
#+END_SRC
```

Then the HTML export contains a <pre> block with the ledger output and
my script in `web/graphs.js` parses it and creates some charts.

It somehow works that way, but I don't think it's a very nice pipeline.
It's all very tightly coupled and seems fairly fragile, I need to parse
the output of ledger in JavaScript, the application logic to compute
averages etc. is also in JavaScript, there are a lot of components
involved (which makes it hard to debug), and still it is not simple to
generate a simple sentence like "this month's revenue was X".

If anyone has any suggestions or can point at tools suited for that
purpose, please let me know.

Thanks
Tobias

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/1570941990.6534.38.camel%40web.de.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to