Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
72ee9b9607
|
|||
|
76505b6a5e
|
|||
|
c6703ad706
|
|||
|
4417122fee
|
|||
|
6bd16952a6
|
|||
|
35d239588d
|
|||
|
745984766d
|
|||
|
38b2633e6c
|
|||
|
e3598fce8c
|
17
CHANGELOG.md
17
CHANGELOG.md
@@ -18,9 +18,24 @@
|
|||||||
|
|
||||||
# Changelog (`docker-finance`)
|
# Changelog (`docker-finance`)
|
||||||
|
|
||||||
|
## 1.4.1 - 2026-03-18
|
||||||
|
|
||||||
|
This patch release fixes broken `import` for Trezor Suite v25.9.1+ by adding new FS support and backward compatibility.
|
||||||
|
|
||||||
|
### 1.4.1 - Fixes
|
||||||
|
|
||||||
|
- Add bash quotes when testing column(s) of given header and add custom delim support (lib_preprocess) ([#326](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/326))
|
||||||
|
|
||||||
|
- Add Trezor Suite v25.9.1+ FS support and backward compatibility ([#327](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/327))
|
||||||
|
* For devs (to generate new FS mockup), with `finance` image, run: `gen type=flow account=trezor dev=on confirm=no profile=<profile/subprofile>`
|
||||||
|
|
||||||
|
### 1.4.1 - Contributors
|
||||||
|
|
||||||
|
- Aaron Fiore
|
||||||
|
|
||||||
## 1.4.0 - 2026-03-16
|
## 1.4.0 - 2026-03-16
|
||||||
|
|
||||||
This release brings a minor `dfi` fix (`fetch`), a new `dfi` feature (custom compose merge file functionality), `dfi` enhancements (base image and end-user), and patch releases for `hledger-flow` and a ROOT.cern (`root`).
|
This release brings a minor `dfi` fix (`fetch`), a new `dfi` feature (custom compose merge file functionality), `dfi` enhancements (base image and end-user), and patch releases for `hledger-flow` and ROOT.cern (`root`).
|
||||||
|
|
||||||
### 1.4.0 - Fixes
|
### 1.4.0 - Fixes
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Release version (tag format)
|
# Release version (tag format)
|
||||||
version: "v1.4.0"
|
version: "v1.4.1"
|
||||||
|
|
||||||
# Container dependencies (used by `version` command)
|
# Container dependencies (used by `version` command)
|
||||||
# NOTE: this must stay inline with Dockerfiles
|
# NOTE: this must stay inline with Dockerfiles
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Timestamp,Date,Time,Type,Transaction ID,Fee,Fee unit,Address,Label,Amount,Amount unit,Fiat (USD),Other
|
||||||
|
1773852733,3/18/2026,9:52:13 AM GMT-7,SENT,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX123,0.00001234,BTC,bc1qXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX123,New FS tx,0.00012345,BTC,"8.81",
|
||||||
|
@@ -36,16 +36,35 @@ source "${DOCKER_FINANCE_CONTAINER_REPO}/src/hledger-flow/lib/lib_preprocess.bas
|
|||||||
|
|
||||||
[ -z "$global_in_filename" ] && exit 1
|
[ -z "$global_in_filename" ] && exit 1
|
||||||
|
|
||||||
|
function reseat_fs()
|
||||||
|
{
|
||||||
|
[ -z $1 ] && exit 1
|
||||||
|
local -r _fs="$1"
|
||||||
|
local -r _header="Timestamp${_fs}Date${_fs}Time${_fs}Type${_fs}Transaction ID${_fs}Fee${_fs}Fee unit${_fs}Address${_fs}Label${_fs}Amount${_fs}Amount unit${_fs}Fiat (USD)${_fs}Other"
|
||||||
|
echo "$_header"
|
||||||
|
}
|
||||||
|
|
||||||
function parse()
|
function parse()
|
||||||
{
|
{
|
||||||
lib_preprocess::assert_header "Timestamp;Date;Time;Type;Transaction ID;Fee;Fee unit;Address;Label;Amount;Amount unit;Fiat (USD);Other"
|
local _gawk=("gawk")
|
||||||
|
local _fs _header
|
||||||
|
|
||||||
|
_header="$(reseat_fs ";")"
|
||||||
|
if lib_preprocess::test_header "$_header"; then
|
||||||
|
_fs="FS=;"
|
||||||
|
else
|
||||||
|
# Since v25.9.1
|
||||||
|
_header="$(reseat_fs ",")"
|
||||||
|
lib_preprocess::assert_header "$_header"
|
||||||
|
_gawk+=("--csv")
|
||||||
|
fi
|
||||||
|
|
||||||
# Get subaccount(s) from filename
|
# Get subaccount(s) from filename
|
||||||
local _subaccount
|
local _subaccount
|
||||||
_subaccount="$(echo $global_in_filename | cut -d'_' -f1)"
|
_subaccount="$(echo $global_in_filename | cut -d'_' -f1)"
|
||||||
|
|
||||||
# NOTE: subaccount (account label) is entered within the app
|
# NOTE: subaccount (account label) is entered within the app
|
||||||
gawk \
|
"${_gawk[@]}" \
|
||||||
-v global_year="$global_year" \
|
-v global_year="$global_year" \
|
||||||
-v global_subaccount="$global_subaccount" \
|
-v global_subaccount="$global_subaccount" \
|
||||||
-v subaccount="$_subaccount" \
|
-v subaccount="$_subaccount" \
|
||||||
@@ -64,7 +83,7 @@ function parse()
|
|||||||
# skip # Date (N/A)
|
# skip # Date (N/A)
|
||||||
# skip # Time (N/A)
|
# skip # Time (N/A)
|
||||||
|
|
||||||
# Type # TODO: are there more types?
|
# Type (TODO: are there more types?)
|
||||||
direction=($4 ~ /^RECV$/ ? "IN" : "OUT")
|
direction=($4 ~ /^RECV$/ ? "IN" : "OUT")
|
||||||
printf $4 OFS
|
printf $4 OFS
|
||||||
|
|
||||||
@@ -80,7 +99,19 @@ function parse()
|
|||||||
|
|
||||||
printf("%.8f", $10); printf OFS # Amount # TODO: more than 8 places for Ethereum, etc.?
|
printf("%.8f", $10); printf OFS # Amount # TODO: more than 8 places for Ethereum, etc.?
|
||||||
printf "\"" $11 "\"" OFS # Amount unit
|
printf "\"" $11 "\"" OFS # Amount unit
|
||||||
printf "\"" $12 "\"" OFS # Fiat (USD)
|
|
||||||
|
# Fiat (USD)
|
||||||
|
# NOTE: is already quoted since v25.9.1
|
||||||
|
fiat=$12
|
||||||
|
if (fiat ~ /^"/)
|
||||||
|
{
|
||||||
|
printf fiat OFS
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf "\"" fiat "\"" OFS
|
||||||
|
}
|
||||||
|
|
||||||
printf "\"" $13 "\"" OFS # Other
|
printf "\"" $13 "\"" OFS # Other
|
||||||
|
|
||||||
printf direction OFS
|
printf direction OFS
|
||||||
@@ -88,7 +119,7 @@ function parse()
|
|||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
}' FS=\; OFS=, "$global_in_path" >"$global_out_path"
|
}' "$_fs" OFS=, "$global_in_path" >"$global_out_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# docker-finance | modern accounting for the power-user
|
# docker-finance | modern accounting for the power-user
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
# Copyright (C) 2021-2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -64,9 +64,16 @@ echo -e " \e[32m│ └─\e[37;2m ${global_in_filename}\e[0m"
|
|||||||
function lib_preprocess::test_header()
|
function lib_preprocess::test_header()
|
||||||
{
|
{
|
||||||
local _column="$1"
|
local _column="$1"
|
||||||
|
|
||||||
local _header
|
local _header
|
||||||
_header="$(lib_preprocess::__sanitize_header $2)"
|
_header="$(lib_preprocess::__sanitize_header $2)"
|
||||||
[[ "$_header" =~ (^${_column}$|^${_column},|,${_column},|,${_column}$) ]] && return 0 || return 2
|
|
||||||
|
local _delim="$3"
|
||||||
|
[ -z "$_delim" ] && _delim=","
|
||||||
|
|
||||||
|
# TODO: consolidate regexp
|
||||||
|
[[ "$_header" =~ (^"${_column}"$|^"${_column}${_delim}"|"${_delim}${_column}${_delim}"|"${_delim}${_column}"$) ]] \
|
||||||
|
&& return 0 || return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Assert header in given CSV header
|
# Assert header in given CSV header
|
||||||
|
|||||||
Reference in New Issue
Block a user