import: message cleanups, mention input files
Only the --dry-run message needs the semicolon, so dry run output can be piped into hledger.
This commit is contained in:
parent
807273d9de
commit
edaf92db5e
@ -41,9 +41,9 @@ importcmd opts@CliOpts{rawopts_=rawopts,inputopts_=iopts} j = do
|
|||||||
Right newj ->
|
Right newj ->
|
||||||
case sortOn tdate $ jtxns newj of
|
case sortOn tdate $ jtxns newj of
|
||||||
[] -> do
|
[] -> do
|
||||||
printf "; no new transactions found.\n\n"
|
printf "no new transactions found in %s.\n\n" inputstr
|
||||||
newts | dryrun -> do
|
newts | dryrun -> do
|
||||||
printf "; would import %d new transactions:\n\n" (length newts)
|
printf "; would import %d new transactions from %s:\n\n" (length newts) inputstr
|
||||||
-- TODO how to force output here ?
|
-- TODO how to force output here ?
|
||||||
-- length (jtxns newj) `seq` print' opts{rawopts_=("explicit",""):rawopts} newj
|
-- length (jtxns newj) `seq` print' opts{rawopts_=("explicit",""):rawopts} newj
|
||||||
mapM_ (putStr . showTransactionUnelided) newts
|
mapM_ (putStr . showTransactionUnelided) newts
|
||||||
@ -51,4 +51,4 @@ importcmd opts@CliOpts{rawopts_=rawopts,inputopts_=iopts} j = do
|
|||||||
printf "marked %s as caught up, skipping %d unimported transactions\n\n" inputstr (length newts)
|
printf "marked %s as caught up, skipping %d unimported transactions\n\n" inputstr (length newts)
|
||||||
newts -> do
|
newts -> do
|
||||||
foldM_ (`journalAddTransaction` opts) j newts -- gets forced somehow.. (how ?)
|
foldM_ (`journalAddTransaction` opts) j newts -- gets forced somehow.. (how ?)
|
||||||
printf "imported %d new transactions\n" (length newts)
|
printf "imported %d new transactions from %s\n" (length newts) inputstr
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user