Re: Unused Accounts
Since there wasn't a built-in option to do this, I came up with the following: grep "^account" accounts.txt | cut -c 9- | xargs -I{} bash -c "grep -q \"{}\" *.ldg || echo \"{}\"" Thanks JL On Thursday, January 26, 2023 at 8:57:40 PM UTC-6 Martin Michlmayr wrote: > * Martin Michlmayr [2023-01-27 10:14]: > > The only way I can think of is: > > grep "^account" d | sed -e "s/^account *//" | sort | uniq > 1 > ledger -f d bal --empty --flat -F "%a\n" | sort | uniq > 2 > comm -3 1 2 > rm -f 1 2 > > -- > Martin Michlmayr > https://www.cyrius.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 ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/f9c20c4c-a140-4f52-b052-b758a493a62en%40googlegroups.com.
Re: Unused Accounts
This worked for me; grep "^account" accounts.txt | cut -c 9- | xargs -I{} bash -c "grep -q \"{}\" *.ldg || echo \"{}\"" Thanks JL On Thursday, January 26, 2023 at 8:57:40 PM UTC-6 Martin Michlmayr wrote: > * Martin Michlmayr [2023-01-27 10:14]: > > The only way I can think of is: > > grep "^account" d | sed -e "s/^account *//" | sort | uniq > 1 > ledger -f d bal --empty --flat -F "%a\n" | sort | uniq > 2 > comm -3 1 2 > rm -f 1 2 > > -- > Martin Michlmayr > https://www.cyrius.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 ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/a3ba46f3-6d74-449f-a9e8-3ef9063809f2n%40googlegroups.com.
Re: Unused Accounts
* Martin Michlmayr [2023-01-27 10:14]: > The only way I can think of is: grep "^account" d | sed -e "s/^account *//" | sort | uniq > 1 ledger -f d bal --empty --flat -F "%a\n" | sort | uniq > 2 comm -3 1 2 rm -f 1 2 -- Martin Michlmayr https://www.cyrius.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 ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/Y9M9nEqcFLcULcPG%40jirafa.cyrius.com.
Re: Unused Accounts
* Jasel17212 [2023-01-26 18:11]: > Anyone know of a way to list defined but unused accounts, similar to > hledger's --unused option? I don't think so. Why do you need this? The only way I can think of is: 1) grep for "^account" and find the accounts you defined 2) do "ledger bal --empty" to find all accounts that have been used the difference is unused accounts; they will not show up, even with --empty -- Martin Michlmayr https://www.cyrius.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 ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/Y9Mzov8cL1zX8Zfs%40jirafa.cyrius.com.
Unused Accounts
Anyone know of a way to list defined but unused accounts, similar to hledger's --unused option? -- --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/c8acf3a9-002c-4436-9236-08ceb2db119cn%40googlegroups.com.
Re: Extracting items from a larger transaction
On 2023-01-26, the.so...@gmail.com wrote: > On Thursday, 26 January, 2023 at 9:52:26 pm UTC+5:30 yuri...@gmail.com > wrote: > You can just omit the amount in a single posting. It will be > calculated so that the whole transaction balances. > > In this case, that would look like this: > > 2023-01-01 Department Store > Expenses:Clothing$8.99 ; T-Shirt > Expenses:Household $11.99 ; Light Bulbs > Expenses:Coffee $3.99 > Expenses:Entertainment $7.99 ; Book > Expenses:Groceries > Liabilities:Credit$-100.00 > Ah-ha! Thank you, I should have tried that! Tavis. -- _o)$ lynx lock.cmpxchg8b.com /\\ _o) _o) $ finger tav...@sdf.org _\_V _( ) _( ) @taviso -- --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/tqudvd%24l7j%241%40ciao.gmane.io.
Re: Extracting items from a larger transaction
On Thursday, 26 January, 2023 at 9:52:26 pm UTC+5:30 yuri...@gmail.com wrote: You can just omit the amount in a single posting. It will be calculated so that the whole transaction balances. In this case, that would look like this: 2023-01-01 Department Store Expenses:Clothing$8.99 ; T-Shirt Expenses:Household $11.99 ; Light Bulbs Expenses:Coffee $3.99 Expenses:Entertainment $7.99 ; Book Expenses:Groceries Liabilities:Credit$-100.00 -- --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/0b513379-1903-4215-82cb-161f7adea31en%40googlegroups.com.
Re: Extracting items from a larger transaction
On Thu, 26 Jan 2023 at 23:12, Tavis Ormandy wrote: > Hello, I'm trying to start tracking my expenses with ledger, but I have > a question about the best way to split transactions. > > Is there a variable I can reference that evaluates to the sum of > postings so far? > > 2023/01/01 Department Store > Expenses:Clothing $8.99 ; T-Shirt > Expenses:Household $11.99; Light Bulbs > Expenses:Coffee$3.99 > Expenses:Entertainment $7.99 ; Book > Expenses:Groceries ($100 - $8.99 - $11.99 - $3.99 - $7.99) ; Ugly :( > Liabilities:Credit$-100 You can just omit the amount in a single posting. It will be calculated so that the whole transaction balances. (Also be aware that you need at least two spaces between the account name and amount.) 2023/01/01 Department Store Expenses:Clothing$8.99 ; T-Shirt Expenses:Household $11.99 ; Light Bulbs Expenses:Coffee $3.99 Expenses:Entertainment $7.99 ; Book Expenses:Groceries Liabilities:Credit$-100 -- --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAP_d_8U_Y1BXgJFjkhZ7fEWB6LrCmp3G1-8O9QD5_LjZBErZKA%40mail.gmail.com.
Re: Assertion failure in unistring
On 2023-01-25, Martin Michlmayr wrote: > * Tavis Ormandy [2023-01-25 06:56]: >> Hello! I've been hitting an assertion when experimenting with register >> formats: > > Can you please report this at https://github.com/ledger/ledger/issues > Done, thanks Martin! https://github.com/ledger/ledger/issues/2174 Tavis. -- _o)$ lynx lock.cmpxchg8b.com /\\ _o) _o) $ finger tav...@sdf.org _\_V _( ) _( ) @taviso -- --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/tqu8rf%2445k%242%40ciao.gmane.io.
Extracting items from a larger transaction
Hello, I'm trying to start tracking my expenses with ledger, but I have a question about the best way to split transactions. Is there a variable I can reference that evaluates to the sum of postings so far? Let's say I spend $100 at a department store, I could write this: 2023/01/01 Department Store Expenses:Clothing $8.99 ; T-Shirt Expenses:Groceries($100 - $8.99); Everything else was food Liabilities:Credit$-100 My concern is that while extracting 1 item isn't so bad, if I have to do several it's quite laborious: 2023/01/01 Department Store Expenses:Clothing $8.99 ; T-Shirt Expenses:Household $11.99; Light Bulbs Expenses:Coffee$3.99 Expenses:Entertainment $7.99 ; Book Expenses:Groceries ($100 - $8.99 - $11.99 - $3.99 - $7.99) ; Ugly :( Liabilities:Credit$-100 If there was a variable like $sum, I could just do ($100 - $sum). Is there anything like that? I don't care about the expense buckets being exact (e.g. ignoring sales tax is okay), so long as the total transaction amount matches my statement. Thank you! Tavis. -- _o)$ lynx lock.cmpxchg8b.com /\\ _o) _o) $ finger tav...@sdf.org _\_V _( ) _( ) @taviso -- --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/tqu8ol%2445k%241%40ciao.gmane.io.