From f157720fa3f525d6dd233330a8b791f9b8b1a84a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 19 Oct 2023 11:17:26 +0100 Subject: [PATCH] ;bin:justfile: rename forecast.journal, forecast-import refinement --- bin/justfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/justfile b/bin/justfile index d38dfacd9..99ef1fde4 100755 --- a/bin/justfile +++ b/bin/justfile @@ -94,9 +94,14 @@ household: # import any new forecast transactions; add --dry to preview @forecast-import *ARGS: - echo "forecasting transactions" - hledger import future.journal --forecast=15daysago..15days --auto -I {{ ARGS }} 2>>import.log || echo "Failed, check import.log" - + #!/usr/bin/env bash + echo "importing transactions from forecast rules" + hledger import forecast.journal --forecast=15daysago..15days --auto -I {{ ARGS }} 2>>import.log || echo "Failed, check import.log" + if [[ "$ARGS" != *"--dry"* ]]; then + echo "(remove any near-future transactions included for preview)" + echo "resetting .latest.forecast.journal to today's date" + date +%Y-%m-%d >.latest.forecast.journal + fi # get and import all the above; add --dry to preview @import *ARGS: