> Can you give a quick example?  Have you tried "--sort account"? 
>

Let's say I have Assets:Debit card and Assets:Cash and then some Income:Job 
and Expenses:Many accounts here. I'd like to get assets listed the last in 
the balance report, without relying on alphabet if possible.

--sort account looks like default behavior in this respect.

But it's not a big deal. I've started to figure out the format strings, so 
I'll make them stand out in some other way.
 

> > Another question is on the register: is there a way to make Ledger print 
> > metadata from tags? Haven't noticed it covered. 
>  

Try --prepend tag("Foo"). 
>
>
[hoodoo@x230 ledger]$ ledger --strict -f main.ledger reg --prepend tag foo
Error: Illegal option --prepend

[hoodoo@x230 ledger]$ ledger -v 
    0ms  [INFO]  Ledger starting
Ledger 3.1.0-20141005, the command-line accounting tool

Copyright (c) 2003-2014, John Wiegley.  All rights reserved.

This program is made available under the terms of the BSD Public License.
See LICENSE file included with the distribution for details and disclaimer.
Error: No journal file was specified (please use -f)
    2ms  [INFO]  Ledger ended

[hoodoo@x230 ledger]$ yum info ledger
Installed Packages
Name        : ledger
Arch        : x86_64
Version     : 3.1
Release     : 1.fc21
Size        : 23 M
Repo        : installed
>From repo   : fedora

Searching for 'prepend' in the man page, I've got this: 

     --meta EXPR
              In the register report, prepend the transaction with the 
value of the given TAG.

It sort of does the trick, but it only allows to add one tag. Speaking of 
man pages, the one which ships with Fedora package lacks the FORMATS 
section. I've found the information in PDF anyway.

So, as I've said, I've figured out the format string, a powerful tool 
indeed, and I'm now playing with the register form. Here's what does what I 
want:

%(has_tag("nm") ? tag("nm") : " ")

That way metadata gets printed if available and the template does not break.

John 
>

-- 

--- 
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.

Reply via email to