commit 4545acbd4dc898e90056761dc63695d0926675bb
parent 63dfb056354f9971e95e71e2e6d2bce2272b15a1
Author: William Casarin <jb55@jb55.com>
Date: Mon, 24 May 2021 15:54:10 -0700
btc-txs: update
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/bin/btc-txs b/bin/btc-txs
@@ -1,2 +1,6 @@
#!/usr/bin/env bash
-exec btc-txs-raw | ct | $PAGER
+set -eou pipefail
+btc-txs-raw |
+ datefmt --after $(date +%s -d 2009-01-01) --before $(date +%s -d 2030-01-01) '%F' |
+ ct |
+ less -S +G
diff --git a/bin/btc-txs-raw b/bin/btc-txs-raw
@@ -5,7 +5,11 @@ WALLETS=${WALLETS:-$(bcli listwallets | jq -r '.[]' | paste -sd" " )}
(for wallet in $WALLETS
do
bcli -rpcwallet="$wallet" "$@" listtransactions '*' 2000 \
- | jq -rc '.[] | {label: .label, address: .address, category: .category, amount: .amount, blocktime: .blocktime, hash: .hash}'
+ | jq -rc '.[] | {wallet: "'$wallet'", label: .label, address: .address, category: .category, amount: .amount, blocktime: .blocktime, confirmations: .confirmations, txid: .txid, vout: .vout}'
done) \
- | jq -src 'sort_by(.blocktime) | .[] | [.label,.address,.category,.amount,.blocktime,.hash] | @tsv'
+ | jq -src 'sort_by(.blocktime) | .[] | [.wallet,.label,.address,.category,.amount,.blocktime,.confirmations,.txid,.vout] | @tsv'
+
+ #| jq -src '.[] | [.label,.address,.category,.amount,.blocktime,.confirmations,.txid,.vout] | @tsv'
+
+