Prudent: macOS editor and reporting wrapper around Ledger

162 views
Skip to first unread message

vitoc

unread,
Jun 25, 2018, 9:42:17 AM6/25/18
to Ledger
Hey everyone, 

I'd been working on a macOS editor and reporting wrapper around Ledger for about a year (spare time side-project). I'd just completed it and will appreciate some help from any macOS users out there that can try it and see if it's useful.

I made a website for the tool (called Prudent) here:


The app itself comes with an integrated editor and a calendar-like reporting tool. It's really an effort to make Ledger work for me (taking into account how my aging brain needs more visual stimulus to issue commands to the computer), but I think it might be useful to others with similar thinking structure and needs.  

I have a lot more ideas for features for it and will continue working on it but really want to get it out there to see how far such a tool can go :)

Thanks,

Vito

Pete Keen

unread,
Jun 25, 2018, 9:53:43 AM6/25/18
to Ledger
Hi Vito,

This looks great! I'm having some problems getting it running, though. When I start it up it says it can't find ledger, presumably because I have compiled it with homebrew via boxen so it's in a wacky path (/opt/boxen/homebrew/bin/ledger). Secondly, immediately after startup it says "Problem setting up the license on this instance of Prudent. Please contact us to help resolve this".

So, two questions:

1. Is this open source? It's cool with me if it's not but if it's a commercial product I think we'd appreciate it if you were up front about it.

2. The above two issues seem like bugs. The first can probably be resolved either with a config option to specify the path or auto-detect with `which`. The second I have no idea about :) Maybe a permissions problem?

Thanks,
Pete

--

---
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 ledger-cli+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexandre Rademaker

unread,
Jun 25, 2018, 11:25:47 AM6/25/18
to ledge...@googlegroups.com
Hi Vito,

I liked the tool but I don't want to be forced to save the files before quit. Moreover, I would like to keep using Emacs for editing and using Prudent as a dashboard for navigating in the reports. Is it possible?

Best,

--

vitoc

unread,
Jun 25, 2018, 11:53:57 AM6/25/18
to Ledger
Hi Pete,

Thanks! 

1. It's not open source. Sorry for not being clear about it earlier.

2. The two issues should be fixed now. I'd added your 'boxen' path to the list to try and added 'which' as well (thanks!). On the second issue, as you mentioned, it is probably a permission problem. Is your ~/Library/Application Support/Prudent/Data not writable? The app creates and store it's own private key in a folder there to identify itself for license and usage analytics. The 'fix' for now is to deactivate that :D Maybe there's a better way to do that or not at all :) Anyway, the app does need some kind of local persistence somewhere for meta data, i.e. remembering the last file opened so it shows again when you run the app, etc. Currently, it persists these in it's Application Support folder.

Thanks,

Vito

To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.

Pete Keen

unread,
Jun 25, 2018, 11:59:33 AM6/25/18
to Ledger
There's a 0 byte file at `~/Library/Application Support/Prudent/Data/secret/undefined`. I blew away the `Prudent` directory and it got recreated with the new build, but it's still throwing that error.

To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscribe@googlegroups.com.

vitoc

unread,
Jun 25, 2018, 12:02:13 PM6/25/18
to Ledger
Hi Alexandre,

Thanks for the suggestion on not having to save files, will work on that. I don't think Emacs will be incorporated as an editor option in Prudent. You can however use Emacs and Prudent separately as two applications if that helps, i.e. Prudent as the dashboard for navigating reports only :)

Thanks again for the feedback and for trying the tool, means a lot...

Vito

To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.

vitoc

unread,
Jun 25, 2018, 12:27:24 PM6/25/18
to Ledger
Sorry Pete, I forgot to push the 'deactivating' changes out... If you delete the Prudent directory in Application Support and try again, it should be working... Hopefully!

Thanks,

Vito

Simon Michael

unread,
Jun 27, 2018, 3:01:07 AM6/27/18
to ledge...@googlegroups.com, hle...@googlegroups.com
Hi Vito,

congratulations and thanks for Prudent, which so far seems to be a
freeware, closed source, React-native based, Ledger GUI for mac.

I like the app design (and home page) very much. It's something I was
thinking about when starting hledger: log of transactions goes in,
useful reports come out, the end. An accounting appliance with no
confusing choices.

FYI:

- yesterday it was downloading very slowly. Download worked fine today.

- I commented out some things in my hledger journal to make it
Ledger-compatible. Then I added some account aliases to get
Prudent-compatible account names. I got a few numbers showing up:
Income, Expenses, Profit for may, july, and august only. The journal has
data for all accounts from january to august. Since it's closed source I
couldn't troubleshoot further.

Best!

-Simon


vitoc

unread,
Jun 28, 2018, 11:12:39 AM6/28/18
to Ledger
Hi Simon,

Thank you! Stoked to hear! I am a fan of hledger! I was looking at hledger before I thought of giving a quick spin on wrapping ledger round with a GUI Node app... I wanted something on my Launchpad. More than a year on and I am still at it.. And I am still learning and discovering ledger functionalities, better way of getting certain reports... And its probably good for me to look at hledger and beancount too in earnest.

Anyway, I think there may be a couple of reasons why you're not seeing the numbers for some of the months, stemming from the fact that all reports in Prudent uses Ledger's magical market value option (-V) to normalize the commodities to a base rate (I should probably document this):

1) A slightly older version of ledger requires a space for certain transaction. I.e.

2018/01/01 *Opening balances
    Assets:Savings  $3000
    Equity:Opening Balances

2018/01/05
    Assets:Shares  5 APPL@$100
    Assets:Savings

With Ledger 3.0.0-20120510 (the version currently available on https://www.ledger-cli.org/download.html).

$ ledger -V --empty bal Savings Current Liabilities 
                -500
               $3000  Assets:Savings

With Ledger 3.1.1-20160111:

$ ledger -V --empty bal Savings Current Liabilities
               $2500  Assets:Savings

2) If you have transactions with different commodities within an account and the exchange rate between the commodities is not defined.

The Month card values are based on market value (-V) with a  base commodity, so it tries to sum and convert as much as -V. 

So, if you have something like this:

2018/06/27
    Assets  $1000
    Income

2018/06/28
    Assets  €500
    Income
    
Even -V returns multiple prices:

$ ledger -V --empty bal Assets Liabilities
               $1000
                €500  Assets

This is of course the right thing to expect, there is no P line like:

P 2018/06/28 15:50:00 € $1.16

Prudent however, will not show anything without the P line as what I'd initially thought when I started with this is to make it simple and most people when looking at reports prefer the summary to be in a single base commodity (such as the currency of their country of residence). 

But I now realize that I might had over-assumed. It is nice for example to see the number of shares owned instead of total share value in base commodity for example. 

So, I'll work on adding a global toggle to show either only Base Currency (with an indicator for columns with multiple currencies) or show All currencies. 

Summarily, this might be the reason for the empty months! Will get the multi-currency display feature out as soon as possible. 

Thanks,

Vito

p.s. On another note, you can also check if there are any syntax error in "~/Library/Application\ Support/Prudent/Data/logs/error.log". Prudent shows an X indicator on the line with error, one at a time :)

Simon Michael

unread,
Jun 28, 2018, 11:28:55 AM6/28/18
to ledge...@googlegroups.com
Cool, thanks Vito.

I did also like how the journal view indicates the first error (and just
one). (This made me wonder why I don't have this in emacs. I haven't
seen any discussion of flycheck or equivalent in other editors for
journals.)


On 6/28/18 4:12 PM, vitoc wrote:
> Hi Simon,
>
> Thank you! Stoked to hear! I am a fan of hledger! I was looking at hledger
> before I thought of giving a quick spin on wrapping ledger round with a GUI
> Node app... I wanted something on my Launchpad. More than a year on and I
> am still at it.. And I am still learning and discovering ledger
> functionalities, better way of getting certain reports... And its probably
> good for me to look at hledger and beancount too in earnest.
>
> Anyway, I think there may be a couple of reasons why you're not seeing the
> numbers for some of the months, stemming from the fact that all reports in
> Prudent uses Ledger's magical market value option (-V) to normalize the
> commodities to a base rate (I should probably document this):
>
> *1) A slightly older version of ledger requires a space for certain
> transaction. I.e.*
>
> 2018/01/01 *Opening balances
> Assets:Savings $3000
> Equity:Opening Balances
>
> 2018/01/05
> Assets:Shares 5 APPL@$100
> Assets:Savings
>
> *With Ledger 3.0.0-20120510* (the version currently available on
> https://www.ledger-cli.org/download.html).
>
> $ ledger -V --empty bal Savings Current Liabilities
> -500
> $3000 Assets:Savings
>
> *With Ledger 3.1.1-20160111:*
>
> $ ledger -V --empty bal Savings Current Liabilities
> $2500 Assets:Savings
>
> *2) If you have transactions with different commodities within an account
> and the exchange rate between the commodities is not defined.*
> *p.s. On another note, you can also check if there are any syntax error in
> "~/Library/Application\ Support/Prudent/Data/logs/error.log". Prudent shows
> an X indicator on the line with error, one at a time :)*

vitoc

unread,
Jul 4, 2018, 1:00:29 PM7/4/18
to Ledger
Pleasure's mine Simon!

Anyway, I'd released an update with the multi-commodity toggle described earlier. You should get an auto-update when you run Prudent.

Will continue to look into improving other aspects, i.e. download speed, documentation, state persistence, etc. Grateful for any feedback!

Thanks,

Vito
Reply all
Reply to author
Forward
0 new messages