This repository has been archived on 2021-09-26. You can view files and clone it, but cannot push or open issues or pull requests.
Electroncash-export/ec-export.sh

9 lines
574 B
Bash
Executable File

#!/bin/bash
# ec-export.sh <wallet-file> <start-date> <end-date>
echo transaction_hash,label,confirmations,value,fee,timestamp,fiat_value_EUR,fiat_balance_EUR,fiat_fee_EUR,input_addresses,output_addresses
electron-cash history -w "$1" --show_fiat --use_net |
jq -r 'map({txid,"label",confirmations,value,fee,timestamp,fiat_value,fiat_balance,fiat_fee}) | (first | keys_unsorted) as $keys | map([to_entries[] | .value]) as $rows | $keys,$rows[] | @csv' |
gawk -vFPAT='[^,]*|"[^"]*"' -v OFS="," '{ $6 = strftime("%Y-%m-%d %H:%M",$6); if($6>="'$2'" && $6<="'$3'") {print}}'