Might be better to have a link to a repo on the plaintextaccounting.org
site with shellscripts for running complex reports.

On Thu, Jul 28, 2016, 12:31 PM Richard Lawrence <[email protected]> wrote:

> Hi Josh,
>
> Josh Hanson <[email protected]> writes:
>
> > Since I don't have every detail of Ledger's syntax memorized, and there
> are
> > a few standard reports that I run regularly, I have several ledger
> command
> > lines recorded as comments in my journal that I can copy and paste as
> > needed.
> >
> > I'd really like to be able to run those automatically. Here's an easy,
> > straightforward implementation that feels very "ledger-y" to me: add a
> > "report" directive to save named reports in the journal, and a "report"
> > command to run those reports.
> >
> > The syntax for the directive might be:
> > *report <name of report> <ledger command line arguments>*To run the
> report,
> > you'd run at the command line: *ledger report <name of report>*
>
> I like this idea.  It might be especially useful for very complex reports.
>
> I do wonder if ledger itself is the best place to implement it, though.
> You can already mostly achieve what you want with shell aliases.  That's
> what I do.  I have a bunch of lines like this in my .bashrc:
>
> alias ldg="ledger --no-color"
> alias regcc="ldg register --aux-date -S 'date' 'liabilities:Richard:Chase
> CC'"
> alias cash="ldg bal --limit 'account =~ /Savings$|Checking$|Cash$/'"
>
> So the alias command acts as the name for a report.  It doesn't have the
> advantage of recording the report in your journal file, but at least it
> means you don't have to copy and paste!
>
> HTH,
> Richard
>
> --
>
> ---
> 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.
>

-- 

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