From f099fb558e467d42a75067fd24b595b771ba3433 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 9 Dec 2019 14:46:02 -0800 Subject: [PATCH] ;doc: csv: mention entr for rapid feedback [ci skip] --- hledger-lib/hledger_csv.m4.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hledger-lib/hledger_csv.m4.md b/hledger-lib/hledger_csv.m4.md index 188d62279..8667680a6 100644 --- a/hledger-lib/hledger_csv.m4.md +++ b/hledger-lib/hledger_csv.m4.md @@ -616,6 +616,17 @@ include categorisation.rules # TIPS +## Rapid feedback + +It's a good idea to get rapid feedback while creating/troubleshooting CSV rules. +Here's a good way, using entr from http://eradman.com/entrproject : +```shell +$ ls foo.csv* | entr bash -c 'echo ----; hledger -f foo.csv print desc:SOMEDESC' +``` +A desc: query (eg) is used to select just one, or a few, transactions of interest. +"bash -c" is used to run multiple commands, so we can echo a separator each time +the command re-runs, making it easier to read the output. + ## Valid CSV hledger accepts CSV conforming to [RFC 4180](https://tools.ietf.org/html/rfc4180).