-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add payees command #1063
Add payees command #1063
Conversation
fbabcdd
to
202c922
Compare
Great! In current hledger jargon there are descriptions, containing payee and/or note. Would we want one command with options to list any of these ? Or separate commands for clarity ?
|
Good question. I started with |
d859096
to
7346fac
Compare
Thanks for the pointers getting the basic bits working. As discussed in IRC I'm splitting this into three commands, but I'd be happy to take it back in the direction of a single command with flags if that's the consensus. |
f19633a
to
8b31d5b
Compare
2284cbb
to
f4bd3e2
Compare
Looking good. Here's an attempt at making command help more informative:
Descriptions which don't explicitly define a note and payee with a |
|
PS and a larger question, is this whole concept (optionally splitting description into payee and note with a pipe character) reasonable and worth the trouble ? I haven't used it for real yet myself, and haven't heard of anyone using it. |
I'm using it for several things in production and quite like the flexibility. |
On IRC we discussed making |
I saw your edit above. Strictly speaking, neither note or payee are ever empty (unless the whole description is empty). If they aren't marked explicitly with a |
Your more i18n-robust and case-insensitive sorting seems like a nice feature, perhaps to be added to all commands in due course. I believe text-icu requires a corresponding C lib to be installed, so we'll need to find out how it affects installability. Here are some possibly related windows issues. |
The major use case I've been using it for is for the case of a broker vendor that is constantly billing my credit card, but the actual vendor fulfilling me with product is different every time. I specifically want to track both that the transactions are through a broker and the actual vendor. In fact sometimes I buy things from the same vendors directly, not through the broker. An analogous case for some people in the US might be eBay (do people still use that over there?). Anyway in this case the payee might be eBay, but you are also buying from a certain vendor and might want to sort your transactions based on the seller too.
For this (very real world for me, I have my personal finances and on org worked up this way) use case the current behavior of conflating the fields when only one of them is filled in is actually the preferable usage. |
(Also, text-icu is currently unmaintained). [Though it is in stackage, which is something.] |
@simonmichael That doesn't look very positive. I don't know much about the Haskell ecosystem or how big an issue that is — particularly how likely it is to just stop working in conjunction with some other library being used. |
It seems like text-icu is used enough that it's unlikely to stop working (for very long).. and has kept working well enough that no new maintainer has stepped up. I wouldn't rule out depending on it, but only if we can satisfy ourselves that install instructions on the download page can still be fairly short. |
You'll need to add to the documentation what happens if there are multiple |
@the-solipsist That's not particularly relevant to this PR because the added commands don't do any of the parsing or storing of this data internally, they just dump what is there according to hledger's existing parsing behaviour. That being said if a clarification is needed I'm sure something could go in the journal format docs. And based on a quick empirical test it looks like payee is everything up to the first pipe, and note is everything after the first pipe, including later pipes and following content if present. |
You're absolutely right. I'm sorry, I read this comment too quickly, and thought it was documentation/manpage, rather than the |
@simonmichael I added your roughly your suggestion for longer help texts. @the-solipsist I also expanded the journal format documentation just a bit to cover that question. |
@alerque not sure if you saw my chat message - how about moving the text-icu sorting commit to a separate PR ? |
@simonmichael Nope, sorry I'm not actually following along 100% in chat. But sure that sounds reasonable if the ICU addition is what is holding up merging this. I just extracted that commit for now. BTW your commit message syntax is ... kind of opaque to me. Is your convention documented somewhere? |
I missed the latest force push. Thank you! |
This stuff is to fix #1062. Feel free to contribute ;-)