Discussion:
Converting Automated Transactions from Ledger to Hledger
Brandon Olivares
2018-07-30 00:02:05 UTC
Permalink
I've been checking out ledger, largely because it seems there are more options to communicate with programmatically (like the API).

But I have some automated transactions that I'm not sure how to translate over from Ledger. Here's the one that's giving me the most difficulty:

= (/^Expenses:/ or tag OnBudget) and not tag OffBudget and expr amount>0
[Budget:Unbudgeted] -1.0
[Budget:Balance] 1.0

It seems I can do at least:

= ^Expenses not:tag:OffBudget amt:>0

But if I include tag:OnBudget, nothing will be returned (the OnBudget transactions don't necessarily start with Expenses).

Will this have to be two separate automated transactions?

Thanks,
Brandon
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Michael
2018-07-30 06:55:34 UTC
Permalink
Welcome. Yes, alas, because our support for boolean queries is limited:
http://hledger.org/manual.html#queries <http://hledger.org/manual.html#queries>.

Here's the open issue:
https://github.com/simonmichael/hledger/issues/20 <https://github.com/simonmichael/hledger/issues/20> . If anyone wants to work on this, megaparse includes support which should make it relatively easy.
Post by Brandon Olivares
I've been checking out ledger, largely because it seems there are more options to communicate with programmatically (like the API).
= (/^Expenses:/ or tag OnBudget) and not tag OffBudget and expr amount>0
[Budget:Unbudgeted] -1.0
[Budget:Balance] 1.0
= ^Expenses not:tag:OffBudget amt:>0
But if I include tag:OnBudget, nothing will be returned (the OnBudget transactions don't necessarily start with Expenses).
Will this have to be two separate automated transactions?
Thanks,
Brandon
--
You received this message because you are subscribed to the Google Groups "hledger" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...