I am working on some patches of Metadata for transactions.
Now the comments before the first posting are interpreted correctly as metadata. I don't have the need to use metadata for postings, so it is not implemented. And I am not sure whether metadata for postings are useful.
Now metadata means key-value pairs (String,String). But ledger-cli also supports tags(:TAG:), that is only keys. It is also not implemented for now.
Filter works by specifying "tag key=value" in the patterns. Currently value cannot contains spaces.
I also updated tests/metadata.test to reflect the changes.
> I am working on some patches of Metadata for transactions.
> Now the comments before the first posting are interpreted correctly as metadata. I don't have the need to use metadata for postings, so it is not implemented. And I am not sure whether metadata for postings are useful.
> Now metadata means key-value pairs (String,String). But ledger-cli also supports tags(:TAG:), that is only keys. It is also not implemented for now.
> Filter works by specifying "tag key=value" in the patterns. Currently value cannot contains spaces.
> I also updated tests/metadata.test to reflect the changes.
>>>>> Xinruo Sun <xiaoruo...@gmail.com> writes: > I am working on some patches of Metadata for transactions. Now the comments > before the first posting are interpreted correctly as metadata. I don't have > the need to use metadata for postings, so it is not implemented. And I am > not sure whether metadata for postings are useful.
How could it not be useful? Metadata on postings is pretty much the only way I use metadata in Ledger...
>>>>>> Xinruo Sun <xiaoruo...@gmail.com> writes: >> I am working on some patches of Metadata for transactions. Now the comments >> before the first posting are interpreted correctly as metadata. I don't have >> the need to use metadata for postings, so it is not implemented. And I am >> not sure whether metadata for postings are useful.
> How could it not be useful? Metadata on postings is pretty much the only way > I use metadata in Ledger…
Hey John! :)
Xinruo, what do you use transaction metadata for ? I'm just curious, since I haven't needed metadata yet (but I know a lot of people rely on it.)
I was traveling lately. I want to note how much money I spent for each city I am visiting.
For example,
2012/4/1 hostel for two nights ; loc: Berlin expenses:travel:hotel €40 expenses:cash
I see in the examples of ledger documentation[1] that most metadata comes at the last line, which is attached to the last posting. If I apply it in this example, it is less interesting to attach `expenses:cash' than the other account. So here I could also attach the metadata to the first posting.
Since implementation of metadata on transaction is easier, I went for that. Maybe John could tell us some of his use cases for metadata on postings. :)
On Tue, Apr 10, 2012 at 12:18 AM, Simon Michael <si...@joyful.com> wrote:
> On Apr 8, 2012, at 9:08 PM, John Wiegley wrote: > >>>>>> Xinruo Sun <xiaoruo...@gmail.com> writes: > >> I am working on some patches of Metadata for transactions. Now the > comments > >> before the first posting are interpreted correctly as metadata. I don't > have > >> the need to use metadata for postings, so it is not implemented. And I > am > >> not sure whether metadata for postings are useful.
> > How could it not be useful? Metadata on postings is pretty much the > only way > > I use metadata in Ledger…
> Hey John! :)
> Xinruo, what do you use transaction metadata for ? I'm just curious, since > I haven't needed metadata yet (but I know a lot of people rely on it.)
> -- You received this message because you are subscribed to the Google > Groups hledger group. To post to this group, send email to > hledger@googlegroups.com. To unsubscribe from this group, send email to > hledger+unsubscribe@googlegroups.com. For more options, visit this group > at https://groups.google.com/d/forum/hledger?hl=en
>>>>> Xinruo Sun <xiaoruo...@gmail.com> writes: > I was traveling lately. I want to note how much money I spent for each city > I am visiting. > For example,
> 2012/4/1 hostel for two nights > ; loc: Berlin > expenses:travel:hotel €40 > expenses:cash > Since implementation of metadata on transaction is easier, I went for that. > Maybe John could tell us some of his use cases for metadata on postings. :)
I may have this:
2012/4/1 hostel for two nights ; Location: Berlin expenses:travel:hotel €40 ; Business: Travelodge expenses:cash
I want to associate Location with both postings, but the Business with only the expense it relates to.