-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
.latest.-
with imports from stdin
#2315
Comments
Detection of new transactions is import's key feature, so it's natural for it to always write a .latest file (except in --dry-run mode). I agree that makes It sounds like you don't need import here; wouldn't |
Yes, I think piping the output of I have now converted my existing finance spreadsheet into a set of journals I can maintain going forwards (I have been convinced PTA is the future!), but I'm probably still scratching the surface -- slowly working my way through more of the docs as I tinker 🙂 I suppose the latest file for stdin is only a problem if you have multiple pipelines that need partial importing, and at that point it might be better wrapping it in a script to create intermediate CSV files anyway. |
When reading, you can specify the rules file: A similar option could be provided for specifying the latest file: I'm not sure it's needed, but it would be consistent. |
Importing via stdin (i.e.
hledger import ... csv:-
) creates a.latest.-
file with that run's latest date, which means any other piped imports are subjected to that minimum date. This was a bit of a surprise as I'd expect the latest date not to be tracked here.I'm using stdin as a way to reformat a series of different CSV files (e.g.
sed ... $f.csv | hledger import ... csv:-
), and I'd expect in general the source of a stdin import to vary between runs, so to me it would make more sense to suppress the.latest.-
file by default when piping import data in, or else to have an option to prevent its creation / ignore it when present.The
import
command help text talks about manipulating the latest files when needed, so I guess there's an expectation here that I'd remove them myself each time -- it just feels a little counter-intuitive.The text was updated successfully, but these errors were encountered: