On Fri, Aug 23, 2013 at 11:17 AM, Ralph J.Mayer <rma...@nerd-residenz.de> wrote:
Hi,
is there a way to sort a ledger file by date?
(the file not the output)
cat file | sort does obviously not work since every entry is three lines
Any pointers?
--
Viele Grüße / Kind Regards / Cordiali Saluti / Met vriendelijke groet
Ralph J.Mayer
--
---
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+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
bucket out2013/1/1 Fooin $0.01
$ ledger -f x.led register13-Jan-01 Foo in $0.01 $0.01out $-0.01 0
$ ledger -f x.led print2013/01/01 Fooin $0.01
On Sun, Aug 25, 2013 at 11:32 AM, Ralph J.Mayer <rma...@nerd-residenz.de> wrote:
> If you use comments, automated expressions, etc., then the answer is no.
> Ledger 2.x had a "write" command for doing this, but I never re-implemented it
> for Ledger 3.0.
Turns out hledger has print implemented.
--
Viele Grüße / Kind Regards / Cordiali Saluti / Met vriendelijke groet
Ralph J.Mayer
On Mon, Aug 26, 2013 at 11:33 AM, Craig Earls <ende...@gmail.com> wrote:
OK. I am willing to work on an external script for this ( probably using leder print to do the hard work)If any is interested in this sort of tool please me know how you personally would lik to handle non-cactus entries.There are many options, here are a few I can think of:1. Comments, virtuals and autos that occurr before the first real xact will be left at the head of the file.2. File level comments are tied to the xact immediately following and will sort as such. There might be other smarter ways to handle this.3. File level commands that occur in the body of the file serve as separators and all xacts that occur after that command will stay after that command regardless of date. Should file level comments be the same?Optionally I can make the toolDo a check. A simple ledger bal on the new file should be identical.Any other ideas? I would probably do this in python unless there is a more convenient scripting tool (bash is right out. Don't ask!)Craig--
Craig
On Mon, Aug 26, 2013 at 8:49 AM, Simon Michael <si...@joyful.com> wrote: