summaryrefslogtreecommitdiffstats
path: root/krebs/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-08-02 22:09:23 +0200
committerlassulus <lassulus@lassul.us>2022-08-02 22:09:23 +0200
commit11c23f7e75e1a191b32365711d28357aaeb2cb84 (patch)
treecaa26b46362c0248f1152a6629faed9d03bfb018 /krebs/2configs
parent26e0553a1a13e4ef3d72c04441d20d7d9e682909 (diff)
reaktor2: show ledger status of _from user on add
Diffstat (limited to 'krebs/2configs')
-rw-r--r--krebs/2configs/reaktor2.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 6dda40ea4..233fe2fd7 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -90,6 +90,10 @@ let
amt=$2
unit=$3
printf '%s\n %s %d %s\n %s %d %s\n' "$(date -Id)" "$tonick" "$amt" "$unit" "$_from" "$(expr 0 - "''${amt#+}")" "$unit" >> $state_file
+ ${pkgs.hledger}/bin/hledger -f $state_file bal -N -O csv \
+ | ${pkgs.coreutils}/bin/tail +2 \
+ | ${pkgs.miller}/bin/mlr --icsv --opprint cat \
+ | ${pkgs.gnugrep}/bin/grep "$_from"
'';
};
}