I had some similar issues using the ledger print command. It discards some 
data such as comments outside of transactions as well as balance 
assertions. To solve this problem, I wrote a script in Python to sort 
transactions by date without touching the formatting or data. If you think 
Python could work for you, let me know and I'll try to upload it to Github.

On Friday, December 6, 2019 at 6:19:16 AM UTC-5, Christian Pinedo Zamalloa 
wrote:
>
> Hi! 
> I would like to know if you have any shell, awk... script to sort the 
> order of ledger transactions by date. 
>
> Initially I tried to sort transactions per date by using "ledger 
> print", however I suffered some issues with the output generated by 
> "ledger print" command: 
> - some lot data disappears 
> - lot dates are translated to a format not valid (it seems to be 
> solved in this commit 
>
> https://github.com/ledger/ledger/commit/95237941b66931978953fadb390e1b442ed63175
>  
> ) 
>
> I am a vim user, so I don't use the emacs' mode for ledger. 
>
> Regards! 
>
> -- 
> Christian Pinedo Zamalloa (zako) 
> PGP keyID: 0xdb577d4ee6ffbd55 
> PGP Fgprt: A895 7C11 84F6 30B4 4938  32A4 9306 DFD0 CDE4 B542 
>

-- 

--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/6fa2e284-8ede-41ca-b51e-aaad0126d0f9%40googlegroups.com.

Reply via email to