On 2016-04-20 19:43:44 +0000, Manuel Amador (Rudd-O) said:
Hi! I'm looking for a program that will help me chart my net worth and
other such things such as expenses.
The few programs I have found have deplorable installation instructions
("run this program, it will download some mystery meat from the
Internets, then put some files here, then create a configuration file")
and have questionable security practices ("then run this other program,
which starts an HTTP server on your local machine").
Nothing of the sort is necessary if a good desktop application is
written using libraries that are readily available in most Linux
distributions. To wit, my ledgerhelpers helpers are desktop apps, they
require no configuration at all, and they work with your existing setup
(modulo a few format limitations).
Why isn't there anything like that? How hard can it be to load data
from ledger using its Python bindings, then plot it using something like
pygtkchart or kqtquickcharts?
Anyway, just my thoughts.
I don't know whether this might fit what you're looking after, but the
approach I have been using for a while (and which I am satisfied with) is
to let Ledger output the data in tabular format, then feed the output to
some plotting program. With some scripting, this is easily automated.
I use R, but you may as well use whatever app able to read CSV (including
{Libre|Open}Office). As an example, my Ledger bundle for TextMate is able
to plot charts if R is installed
(https://github.com/lifepillar/Ledger.tmbundle).
TextMate is OS X only, though.
To export the data in a way that I may draw nearly any imaginable plot, I
use three formats. One for register/periodic reports, with these fields:
date; year; month; month_num; wday; wday_num; week; mday; amount;
total; payee; account
which is generated with this option (one line):
--format
'%(format_date(date,\"%Y-%m-%d;%Y;%b;%m;%a;%u;%W;%d\"));%(quantity(scrub(display_amount)));%(quantity(scrub(display_total)));%(payee);%(display_account)\n'
One for balance reports, with these fields:
balance; uncleared; account; partial_account
--format '%(quantity(scrub(get_at(display_total,
0))));%(quantity(scrub(get_at(display_total,
1))));%(account);%(partial_account)\n%/'
Finally, one for budget reports, with these fields:
actual; budgeted; remaining; used; account; partial_account
--format '%(quantity(scrub(get_at(display_total,
0))));%(get_at(display_total, 1) ?
quantity(-scrub(get_at(display_total, 1))) :
0.0);%(get_at(display_total, 1) ? (get_at(display_total, 0) ?
quantity(-scrub(get_at(display_total, 1) + get_at(display_total, 0))) :
quantity(-scrub(get_at(display_total, 1)))) :
quantity(-scrub(get_at(display_total, 0))));%(get_at(display_total, 1)
? quantity(100% * (get_at(display_total, 0) ?
scrub(get_at(display_total, 0)) : 0.0) / -scrub(get_at(display_total,
1))) : "na");%(account);%(partial_account)\n%/'
They are horribly complicated, but they get the job done beautifully. I
do not type them all the time, of course: I use a Vim command that
prints a report in any of those formats.
Enjoy,
Life
--
---
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].
For more options, visit https://groups.google.com/d/optout.