Re: How to output original source text in a report?

2017-09-20 Thread Michael Toomim
John: > >>>>>> "MT" == Michael Toomim <too...@gmail.com> writes: > > MT> So I want to know when this automatic balancing happens. Is there any way > MT> to distinguish automatically-generated amounts from actually-entered > MT> amount

How to output original source text in a report?

2017-09-13 Thread Michael Toomim
Hi! I'm trying to compute capital gains on some ledger files, so I'm exporting them to CSV for a python script to analyze. I export CSV with this: ledger csv everything.ledger --prepend-format '"%(filename)","%(display_amount)","%(xact.id)","%(lot_price(amount,amount))",' > tmp.csv However,

Re: Can I filter by Transaction, instead of Posting?

2016-03-10 Thread Michael Toomim
John Wiegley: > > >>>>> Michael Toomim <too...@gmail.com > writes: > > > John, using %(lot_price) as you suggested actually results in an Error: > Too > > few arguments to function. > > That's odd that it wants two, which is a bug. It

Re: Can I filter by Transaction, instead of Posting?

2016-03-09 Thread Michael Toomim
On September 14, 2015 John Wiegley wrote: > >>>>> Michael Toomim <too...@gmail.com > writes: > > > Ledger also doesn't natively export lot prices. We need lot prices to > > compute capital gains. They are locked in my ledger files. How to get > the

Re: Can I filter by Transaction, instead of Posting?

2015-09-23 Thread Michael Toomim
On Wednesday, September 23, 2015 at 12:52:05 AM UTC-7, John Wiegley wrote: > > >>>>> Michael Toomim <too...@gmail.com > writes: > > > Now I have to give up on Ledger. I can't store my transactions in it, > > because I can't get them out when I

Re: Can I filter by Transaction, instead of Posting?

2015-09-23 Thread Michael Toomim
On Wednesday, September 23, 2015 at 9:49:50 AM UTC-7, Michael Toomim wrote: > > On Wednesday, September 23, 2015 at 1:05:45 AM UTC-7, unices wrote: >> >> Hello Michael, >> I find the Ledger Python module quite handy for custom needs >> such as exports or r

Re: Can I filter by Transaction, instead of Posting?

2015-09-23 Thread Michael Toomim
> On Sep 23, 2015, at 10:20 AM, John Wiegley <jo...@newartisans.com> wrote: > >>>>>> Michael Toomim <too...@gmail.com> writes: > >> Sure, I gave examples at the beginning of this thread. I want to get a >> transaction out, but the csv

Re: Can I filter by Transaction, instead of Posting?

2015-09-23 Thread Michael Toomim
On Wednesday, September 23, 2015 at 1:05:45 AM UTC-7, unices wrote: > > Hello Michael, > I find the Ledger Python module quite handy for custom needs > such as exports or reports. > > Can you show me an example of your Python attempt and describe > what you were missing from it or what didn't

Re: Can I filter by Transaction, instead of Posting?

2015-09-23 Thread Michael Toomim
I'm sorry for the delayed response! I've been moving homes. > On Sep 14, 2015, at 2:22 AM, Kyle Spaans > wrote: > > Can you show me the format string you used? I'd like to help if I can. I used: ledger csv -f file.ledger --csv-format

Re: Can I filter by Transaction, instead of Posting?

2015-09-14 Thread Michael Toomim
> On Sep 14, 2015, at 4:41 AM, John Wiegley wrote: > > You should be able to use "lot_price" in any value expression to access that > detail. For example, in a format string: %(lot_price). Thanks, John. So this is just missing from the documentation, then. So there are

Re: Can I filter by Transaction, instead of Posting?

2015-09-14 Thread Michael Toomim
Ledger also doesn't natively export lot prices. We need lot prices to compute capital gains. They are locked in my ledger files. How to get them out? It turns out that if you learn ledger's language for output formatting, and learn how to craft a custom --csv-format string, it's possible to

Re: Can I filter by Transaction, instead of Posting?

2015-09-14 Thread Michael Toomim
> On Sep 14, 2015, at 1:27 AM, Kyle Spaans <kyle.spa...@yourgolftravel.com> > wrote: > > On Mon, 14 Sep 2015 at 03:39 Michael Toomim <too...@gmail.com > <mailto:too...@gmail.com>> wrote: > I need a FIFO algorithm to calculate capital gains. Since ledg

Can I filter by Transaction, instead of Posting?

2015-09-13 Thread Michael Toomim
I need a FIFO algorithm to calculate capital gains. Since ledger doesn't support this, I'm writing a python script. However, I'm having trouble getting this data into python. It seems that all the export and filtering functions address postings, but not transactions. Here is what I've tried:

Re: Can I filter by Transaction, instead of Posting?

2015-09-13 Thread Michael Toomim
Oh, one more thing I tried that failed: *3. Creating a custom csv export format string* I thought that perhaps I could add a custom identifier for each transaction into the CSV file, and then my python script could re-group transactions by this custom identifier, and filter them. I thought I

Re: Ledger Invoicing

2015-02-12 Thread Michael Toomim
Cool, I've been thinking that ledger is the perfect format for invoices. You can send one in an email, and it's both human readable, and can be copied and pasted into the machine. -- --- You received this message because you are subscribed to the Google Groups Ledger group. To

Re: Getting python bindings to work?

2014-10-21 Thread Michael Toomim
Wonderful! That works! Thank you! -- --- 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. For more options, visit