I love ledger, but sometimes I think it encourages insanity!
On Wed, Nov 26, 2014 at 2:57 PM, Sebastien Vauban <[email protected]>
wrote:
> Craig Earls wrote:
> > On Wednesday, November 26, 2014, Sebastien Vauban wrote:
> >
> >> hello,
> >>
> >> In order to display (for example) the cash account every day of the
> >> month, or the income every month of the year, is there a shortcut to do
> >> so directly from Ledger, or do we have to use a shell script such as:
> >>
> >> printf "Month \tIncome\n"
> >> for year in {2012..2013}; do
> >> for month in {01..12}; do
> >> total=$(ledger -f LEDGER.dat -p "$year-$month" bal --depth 1
> >> Income \
> >> | awk '{print $1;}' \
> >> | sed 's%\$%%g')
> >> if [[ $total != "" ]]; then
> >> printf "$year-$month\t$total\n"
> >> fi
> >> done
> >> done
> >
> > You may be able to do this throught the Python interface, but there is no
> > facility for doing that from the command line.
>
> My goal is to make an R plot with my daily amount of cash, so I'll go
> the `system()' call road, then.
>
> Thanks for your quick answer.
>
> Best regards,
> Seb
>
> --
> Sebastien Vauban
>
> --
>
> ---
> 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.
>
--
Craig, Corona De Tucson, AZ
enderw88.wordpress.com
--
---
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.