forked from EvergreenCrypto/docker-finance
container: migrate from xsv to xan
`xsv` is no longer maintained and the author recommends `xan` instead. Fortunately, `xan` is very suitable for our use-case; is very efficient, and produces no differences in our expected output.
This commit is contained in:
@@ -45,7 +45,7 @@ source "${DOCKER_FINANCE_CONTAINER_REPO}/src/hledger-flow/lib/lib_preprocess.bas
|
||||
function parse_transfers()
|
||||
{
|
||||
# NOTE: header can be variable, ineffective to assert_header
|
||||
# TODO: optimize: do successive test_headers and whichever wins, use that string so `xsv select` is avoided
|
||||
# TODO: optimize: do successive test_headers and whichever wins, use that string so `xan select` is avoided
|
||||
local _header=""
|
||||
|
||||
if lib_preprocess::test_header "info_feeCurrency"; then
|
||||
@@ -59,7 +59,7 @@ function parse_transfers()
|
||||
# Off-chain (withdrawal)
|
||||
lib_preprocess::test_header "info_method" && _header+=",info_method"
|
||||
|
||||
xsv select "$_header" "$global_in_path" \
|
||||
xan select "$_header" "$global_in_path" \
|
||||
| gawk -v global_year="$global_year" -v global_subaccount="$global_subaccount" -M -v PREC=100 \
|
||||
'{
|
||||
if (NR<2)
|
||||
@@ -130,7 +130,7 @@ function parse_transfers()
|
||||
# Off-chain withdrawal
|
||||
lib_preprocess::test_header "info_method" && _header+=",info_method"
|
||||
|
||||
xsv select "$_header" "$global_in_path" \
|
||||
xan select "$_header" "$global_in_path" \
|
||||
| gawk -v global_year="$global_year" -v global_subaccount="$global_subaccount" -M -v PREC=100 \
|
||||
'{
|
||||
if (NR<2)
|
||||
|
||||
Reference in New Issue
Block a user