Accessibility of Ledger Reports

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Accessibility of Ledger Reports

Sam Hartman-3

Hi.
An issue came up processing a debconf budget amendment.
Our community uses ledger a lot for dealing with financial issues.

Unfortunately, I find that its reports are not very accessible at least
by default.
The issue I'm most running into is that the reports use internal
indentation within a line.  That is, to draw an account tree ledger
indents the column containing the account name depending on its level in
the tree.

Certainly for the screen readers I use, and I think for most of the ones
in Debian, that's hard to approach.  I found that I can view the file in
Emacs with whitespace mode enabled, and that's my best bet so far.

i'm also told that there is a --flat option that displays the entire
account tree.  I suspect that's really annoying for others.

Indentation in the first column of a line is very easy to deal with for
any screen reader that a Python programmer would use.

I'm hoping we can brainstorm somethinfg that works reasonably well for
me and for the rest of the community, so I'm bringing up the issue here.

Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Louis-Philippe Véronneau-3
On 19-06-10 10 h 44, Sam Hartman wrote:

>
> Hi.
> An issue came up processing a debconf budget amendment.
> Our community uses ledger a lot for dealing with financial issues.
>
> Unfortunately, I find that its reports are not very accessible at least
> by default.
> The issue I'm most running into is that the reports use internal
> indentation within a line.  That is, to draw an account tree ledger
> indents the column containing the account name depending on its level in
> the tree.
>
> Certainly for the screen readers I use, and I think for most of the ones
> in Debian, that's hard to approach.  I found that I can view the file in
> Emacs with whitespace mode enabled, and that's my best bet so far.
>
> i'm also told that there is a --flat option that displays the entire
> account tree.  I suspect that's really annoying for others.
>
> Indentation in the first column of a line is very easy to deal with for
> any screen reader that a Python programmer would use.
>
> I'm hoping we can brainstorm somethinfg that works reasonably well for
> me and for the rest of the community, so I'm bringing up the issue here.
>
Heya,

So this would be the output of the DebConf19 budget using the --flat option:

        USD 1,291.76  assets:SPI
       USD 75,500.00  expenses:bursaries:bursaries
       USD 10,000.00  expenses:bursaries:diversity
        USD 1,031.41  expenses:graphic materials:banner
          USD 206.28  expenses:graphic materials:paper
          USD 257.85  expenses:graphic materials:poster
        USD 1,000.00  expenses:incidentals
          USD 386.78  expenses:insurance
          USD 335.21  expenses:local team:food
          USD 257.85  expenses:local team:transportation
        USD 1,289.26  expenses:party:cheese and wine
          USD 515.70  expenses:party:conference dinner:bus
          USD 515.70  expenses:party:conference dinner:drink
        USD 9,282.66  expenses:party:conference dinner:food
          USD 800.00  expenses:roomboard:accommodation:access point
       USD 34,191.12  expenses:roomboard:accommodation:bedrooms
          USD 464.13  expenses:roomboard:accommodation:cleaning
          USD 206.28  expenses:roomboard:accommodation:internet link
          USD 128.93  expenses:roomboard:accommodation:vegan food
       USD 10,314.06  expenses:roomboard:food:catering
          USD 128.93  expenses:roomboard:food:coffee and tea
        USD 1,440.87  expenses:swag:backpack
        USD 1,804.96  expenses:swag:drink cup
          USD 536.33  expenses:swag:lanyard
        USD 2,127.28  expenses:swag:t-shirt
        USD 1,408.98  expenses:venue:staff
           USD 79.93  expenses:video:cable hdmi
        USD 1,005.62  expenses:video:fiber
        USD 6,800.00  expenses:video:general
        USD 7,446.75  expenses:video:projector
        USD 4,641.33  expenses:video:sound equipament
          USD -25.79  incomes:donation
      USD -10,000.00  incomes:expected_sponsors:gold
       USD -5,000.00  incomes:expected_sponsors:silver
      USD -20,000.00  incomes:registration
      USD -11,414.88  incomes:sponsors:bronze
      USD -10,000.00  incomes:sponsors:gold
      USD -60,000.00  incomes:sponsors:platinum
      USD -54,024.81  incomes:sponsors:silver
       USD -4,930.50  incomes:sponsors:supporter
--------------------
                   0

Is that more accessible? From what I understand from your email, the
beginning indentation isn't a problem. If it is, we can script something
to get rid of it too.

I personally feel like the --flat output is harder to grok, but I've
also been using ledger for a while. I know several people who had
trouble understanding the "non --flat" output too, so I'm not sure it's
actually worse.

--
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
  ⢿⡄⠘⠷⠚⠋   [hidden email] / veronneau.org
  ⠈⠳⣄


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Sam Hartman-3
>>>>> "Louis-Philippe" == Louis-Philippe Véronneau <[hidden email]> writes:

    Louis-Philippe> Is that more accessible? From what I understand from
    Louis-Philippe> your email, the beginning indentation isn't a
    Louis-Philippe> problem. If it is, we can script something to get
    Louis-Philippe> rid of it too.

Yeah, --flat is definitely easier for me.
Is there any way to have the account name as the first column?
That would probably also work well.

Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Martin Michlmayr
* Sam Hartman <[hidden email]> [2019-06-10 14:06]:
> Is there any way to have the account name as the first column?
> That would probably also work well.

That's not a built in feature.  You can change the format via
--balance-format but the format string is quite long.

--
Martin Michlmayr
https://www.cyrius.com/

Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Martin Michlmayr
In reply to this post by Sam Hartman-3
* Sam Hartman <[hidden email]> [2019-06-10 10:44]:
> The issue I'm most running into is that the reports use internal
> indentation within a line.  That is, to draw an account tree ledger
> indents the column containing the account name depending on its
> level in the tree.
...
> i'm also told that there is a --flat option that displays the entire
> account tree.  I suspect that's really annoying for others.

I think --flat is probably the best option.  The downside of --flat is
that it doesn't add up the sub-totals, as a regular balance report
does (although some people find that misleading).

beancount has a 'treeify' command which uses arrows for the tree.
I'm not sure if that's more readable for you?  (Running treeify on
ledger output doesn't work, though.)

The output of treeify looks like this:

|-- Expenses
|   |-- Banking
|   |   |-- AccountFee                             -0.10 USD
|   |   |-- CPFee                                  957.21 USD
|   |   |-- ForeignTransactionFee
|   |   |-- PayPalFee                              2266.61 USD
|   |   |-- PaysimpleFee                           239.75 USD
|   |   `-- TransactionFee                         38.23 USD
|   |-- Development                                345.48 USD

--
Martin Michlmayr
https://www.cyrius.com/

Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Sune Vuorela-2
In reply to this post by Sam Hartman-3
On 2019-06-10, Sam Hartman <[hidden email]> wrote:
> Unfortunately, I find that its reports are not very accessible at least
> by default.
> The issue I'm most running into is that the reports use internal
> indentation within a line.  That is, to draw an account tree ledger
> indents the column containing the account name depending on its level in
> the tree.

Would a GUI with a file manager like tree interface help in any way?

I'm sure someone could do a PoC of that if it might help.

/Sune
 - who might go look in the mirror to find such a someone for a Qt proof
   of concept

Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Sam Hartman-3
>>>>> "Sune" == Sune Vuorela <[hidden email]> writes:

    Sune> On 2019-06-10, Sam Hartman <[hidden email]> wrote:
    >> Unfortunately, I find that its reports are not very accessible at
    >> least by default.  The issue I'm most running into is that the
    >> reports use internal indentation within a line.  That is, to draw
    >> an account tree ledger indents the column containing the account
    >> name depending on its level in the tree.

    Sune> Would a GUI with a file manager like tree interface help in
    Sune> any way?

Well, in general, people are trying to share these reports in email, so
I'm not quite sure how that would work.

But yes, GUIs or web UIs do work fairly well for this. As an example the
odoo web apps analytic chart of accounts and chart of accounts work
similar to what you're talking about and work fairly well from an
accessibility standpoint.
Similarly their analytic balance sheet and balance sheet are layed out
in a manner that is reasonably easy to follow.

Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Stefano Zacchiroli
On Wed, Jun 12, 2019 at 03:36:09PM -0400, Sam Hartman wrote:
> Well, in general, people are trying to share these reports in email, so
> I'm not quite sure how that would work.
>
> But yes, GUIs or web UIs do work fairly well for this.

Can you check if Fava (a web UI for beancount) works well for you? There
is a demo link on the project homepage:

  https://beancount.github.io/fava/

I'm asking because together with Martin we have a very effective bridge
from ledger to beancount, so that might be another viable option to
access Debian-reported ledger reports. (It's, in fact, also my preferred
solution for browsing my family ledger books.)

Cheers

PS if, OTOH, you want to give it a try locally:

  apt install ledger2beancount python3-fava

--
Stefano Zacchiroli . [hidden email] . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director  . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Sune Vuorela-2
In reply to this post by Sam Hartman-3
On 2019-06-12, Sam Hartman <[hidden email]> wrote:
> Well, in general, people are trying to share these reports in email, so
> I'm not quite sure how that would work.

I was just thinking of taking the ledger snippet and presenting it
differently.

Maybe I should see what I can do in a couple of hours during next-ish
week with hardcoded data and if that is promising, extend it to work with
input data from the clipboard.

/Sune

Reply | Threaded
Open this post in threaded view
|

Re: Accessibility of Ledger Reports

Philip Hands
In reply to this post by Stefano Zacchiroli
Stefano Zacchiroli <[hidden email]> writes:

> On Wed, Jun 12, 2019 at 03:36:09PM -0400, Sam Hartman wrote:
>> Well, in general, people are trying to share these reports in email, so
>> I'm not quite sure how that would work.
>>
>> But yes, GUIs or web UIs do work fairly well for this.
>
> Can you check if Fava (a web UI for beancount) works well for you? There
> is a demo link on the project homepage:

I know you were originally asking about reports, rather than something
to look at the data with, but just in case that might help (which seems
to be what the beancounter suggestion implies), you might also want to
look at hledger (a pretty-much drop in replacement for ledger).

hledger has both a web interface, and a curses-style ui for exploring
ledger files.  They are in the hledger-web and hledger-ui packages
respectively.

I've not actually used either of these very much, so cannot give an
opinion about which is better.  I would guess that the hledger-ui thing
would suit you better, but that's could well be based on unfounded
assumptions.

BTW The web UI provokes one's browser to connect to the port that it
opens locally (which might be a bit of a surprise).

There are a few differences in what hledger supports:

  https://github.com/simonmichael/hledger/wiki/FAQ#features

but I don't find it difficult to keep my accounts compatible with both.

Cheers, Phil.
--
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY

signature.asc (847 bytes) Download Attachment