Value expressions: str(O)

8 views
Skip to first unread message

Vladimir Parfinenko

unread,
Jul 4, 2021, 10:39:27 PMJul 4
to Ledger
Hi all,

I'm trying to customize balance output for my needs and found that O and str(O) give different results:

$ cat my.ledger 

2021-7-1 Foo

    expenses:food  $37 @@ €40

    assets

2021-7-2 Bar

    expenses:food  $37 @@ €42

    assets


$ ledger -f my.ledger balance expenses -T 'O'

                 $74  expenses:food


$ ledger -f my.ledger balance expenses -T 'str(O)'

$37 {€1.081081} [2021-07-01]

$37 {€1.135135} [2021-07-02]  expenses:food


My goal is to prepend some more information before total amount (e.g. "! " + O). Is it possible without outputting commodities rates?

--

Vladimir Parfinenko


Reply all
Reply to author
Forward
0 new messages