27 Commits

Author SHA1 Message Date
72ee9b9607 Merge pull request #328 into master
All checks were successful
docker-finance / all (push) Successful in 25m55s
76505b6a CHANGELOG: add 1.4.1 (Aaron Fiore)
c6703ad7 client: manifest: bump version to v1.4.1 (Aaron Fiore)
2026-03-18 12:25:21 -07:00
76505b6a5e CHANGELOG: add 1.4.1 2026-03-18 12:23:29 -07:00
c6703ad706 client: manifest: bump version to v1.4.1 2026-03-18 10:43:51 -07:00
4417122fee Merge pull request #327 into master
All checks were successful
docker-finance / all (push) Successful in 31m57s
6bd16952 container: hledger-flow: trezor: template: add new FS mockup (Aaron Fiore)
35d23958 container: hledger-flow: trezor: add v25.9.1+ FS / backward compat (Aaron Fiore)
2026-03-18 10:33:26 -07:00
6bd16952a6 container: hledger-flow: trezor: template: add new FS mockup 2026-03-18 10:02:39 -07:00
35d239588d container: hledger-flow: trezor: add v25.9.1+ FS / backward compat 2026-03-18 09:44:34 -07:00
745984766d Merge pull request #326 into master
All checks were successful
docker-finance / all (push) Successful in 39m44s
38b2633e container: hledger-flow: lib_preprocess: add custom delim when testing (Aaron Fiore)
e3598fce container: hledger-flow: lib_preprocess: bash quote given column(s) (Aaron Fiore)
2026-03-18 09:43:16 -07:00
38b2633e6c container: hledger-flow: lib_preprocess: add custom delim when testing
given header column(s).
2026-03-18 09:39:47 -07:00
e3598fce8c container: hledger-flow: lib_preprocess: bash quote given column(s)
when testing header.
2026-03-17 16:41:53 -07:00
484d01aa7a Merge pull request #323 into master
All checks were successful
docker-finance / all (push) Successful in 27m44s
057b07ba CHANGELOG: add 1.4.0 (Aaron Fiore)
997cf1d4 client: manifest: bump version to v1.4.0 (Aaron Fiore)
2026-03-16 13:46:59 -07:00
057b07ba7d CHANGELOG: add 1.4.0 2026-03-16 13:45:58 -07:00
997cf1d46c client: manifest: bump version to v1.4.0 2026-03-16 12:50:47 -07:00
558032e297 Merge pull request #325 into master
Some checks failed
docker-finance / all (push) Has been cancelled
2edffac8 container: lib_hledger: add TODO re: hledger-flow v0.16.3+ (Aaron Fiore)
2026-03-16 12:48:39 -07:00
2edffac838 container: lib_hledger: add TODO re: hledger-flow v0.16.3+ 2026-03-16 12:41:08 -07:00
a1ac219db8 Merge pull request #324 into master
All checks were successful
docker-finance / all (push) Successful in 33m41s
8c830668 client: Dockerfiles: remote: hledger-suite: bump hledger-flow to v0.16.3 (Aaron Fiore)
2026-03-16 11:57:50 -07:00
8c83066826 client: Dockerfiles: remote: hledger-suite: bump hledger-flow to v0.16.3 2026-03-16 10:21:45 -07:00
e9e46fbc05 Merge pull request #322 into master
All checks were successful
docker-finance / all (push) Successful in 25m39s
5d1f6c78 client: conf.d: fetch: mobula: comment out "ethereum:0xbcca60bb61934080951369a648fb03df4f96263c/aUSDC" (Aaron Fiore)
2026-03-13 16:35:57 -07:00
5d1f6c7841 client: conf.d: fetch: mobula: comment out "ethereum:0xbcca60bb61934080951369a648fb03df4f96263c/aUSDC"
for the sake of CI (see TODO note).
2026-03-13 16:33:09 -07:00
4fc5fec02e Merge pull request #321 into master
Some checks failed
docker-finance / all (push) Has been cancelled
983313c0 container: finance: fetch: prices: improve handling of non-200 responses (Aaron Fiore)
2026-03-13 16:30:30 -07:00
983313c028 container: finance: fetch: prices: improve handling of non-200 responses 2026-03-13 16:15:19 -07:00
202d65f43e Merge pull request #320 into master
Some checks failed
docker-finance / all (push) Has been cancelled
5142415a container: finance: fetch: prices: fix User-Agent (Aaron Fiore)
2026-03-13 16:04:32 -07:00
5142415a8e container: finance: fetch: prices: fix User-Agent
Removes whitespace and version tag format for "product-version".
2026-03-13 15:33:31 -07:00
409edab84e Merge pull request #319 into master
Some checks failed
docker-finance / all (push) Failing after 14m19s
9bd61fc9 client: Dockerfiles: remote: dev-tools: enable man page support (Aaron Fiore)
2026-03-13 14:04:13 -07:00
9bd61fc963 client: Dockerfiles: remote: dev-tools: enable man page support 2026-03-13 13:42:49 -07:00
2c3e622331 Merge pull request #318 into master
All checks were successful
docker-finance / all (push) Successful in 29m52s
7a905e1b repo: gitea: workflows: dfi: config: don't run tags (Aaron Fiore)
2026-03-13 12:40:01 -07:00
7a905e1b0d repo: gitea: workflows: dfi: config: don't run tags 2026-03-13 12:24:08 -07:00
d6e6339847 Merge pull request #317 into master
All checks were successful
docker-finance / all (push) Successful in 30m50s
594ca7ef client: Dockerfiles: remote: root: bump to 6.38.04-1 (Aaron Fiore)
2026-03-13 11:15:53 -07:00
12 changed files with 140 additions and 18 deletions

View File

@@ -23,6 +23,8 @@ run-name: ${{ gitea.actor }} ${{ gitea.event_name }} ${{ gitea.ref }} ${{ gitea.
on:
push:
branches:
- '**'
paths:
- 'client/**'
- 'container/**'

View File

@@ -18,6 +18,68 @@
# 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
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
- Fix User-Agent when `fetch`ing prices ([#320](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/320))
### 1.4.0 - Features
- 🚨**Breaking**: Add custom compose merge file functionality ([#309](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/309)) ([#315](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/315))
* Like custom Dockerfile functionality, adds support for custom docker-compose.yml
* ⚠️ Run `gen type=compose` at least once for your respective existing image (e.g., `dfi archlinux/${USER}:default gen type=compose`)
### 1.4.0 - Enhancements
- Print locations of output for `reports` and `taxes` ([#310](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/310))
- Remove defaulting to `/` when using `shell` ([#311](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/311))
- Add 'Related "useful" packages' section to base `finance` (`archlinux`) image ([#312](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/312))
* For consistently useful packages that aren't dependencies
* Moves `calc` package from optional to this section
- If you previously uncommented the `calc` package in the custom build, run `gen type=build` to pickup the latest custom file or manually remove with `edit type=build` (otherwise, you'll simply re-install the package).
- Add man page support to base `finance` (`archlinux`) and `dev-tools` images ([#313](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/313)) ([#314](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/314)) ([#319](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/319))
- Don't run tags with Gitea CI Workflow ([#318](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/318))
- Improve handling of non-200 responses when `fetch`ing prices ([#321](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/321))
### 1.4.0 - Updates
- Bump `root` to 6.38.04-1 ([#317](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/317))
- Bump `hledger-flow` to v0.16.3 ([#324](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/324)) ([#325](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/325))
### 1.4.0 - Refactoring
- Run PHP linter, update fetch (blockchains) comments ([#316](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/316))
- Comment out `"ethereum:0xbcca60bb61934080951369a648fb03df4f96263c/aUSDC"` in default generated `fetch` config ([#322](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/322))
### 1.4.0 - Contributors
- Aaron Fiore
## 1.3.0 - 2026-02-27
This release focuses on `dfi` code/usage enhancements, a ROOT.cern (`root`) patch release and **breaking** changes to the `dfi` client-side default layout (filesystem).

View File

@@ -1,6 +1,6 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 2021-2024,2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# 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
@@ -22,6 +22,10 @@ RUN apt-get update -y
# Add builder user (for `composer` and non-root building)
RUN useradd -m -s /bin/bash -r builder
# Enable man page support
RUN apt-get install man unminimize -y
RUN yes | unminimize
#
# 'dev-tools' linters
#

View File

@@ -27,7 +27,7 @@ RUN apt-get upgrade -y
FROM haskell-build AS hledger-flow
WORKDIR /usr/local/src
RUN git clone --depth=1 https://github.com/apauley/hledger-flow -b v0.16.2
RUN git clone --depth=1 https://github.com/apauley/hledger-flow -b v0.16.3
WORKDIR /usr/local/src/hledger-flow
RUN stack setup

View File

@@ -115,7 +115,7 @@ version: @DOCKER_FINANCE_VERSION@
- "arbitrum:0xff970a61a04b1ca14834a43f5de4533ebddb5cc8/USDC.e"
# Aave V2 USDC
- "ethereum:0xbcca60bb61934080951369a648fb03df4f96263c/aUSDC"
#- "ethereum:0xbcca60bb61934080951369a648fb03df4f96263c/aUSDC" # TODO: 2026-03-13: upstream has started to return 'Time range too large for period "5m". Would generate 10272 candles, max is 10000. Use a larger period or smaller time range.' which appears to be a server-side(?) problem. Commenting out here for now in order to not break CI.
#- "polygon:0x625e7708f30ca75bfd92586e17077590c60eb4cd/aUSDC"
# Gemini USD

View File

@@ -20,7 +20,7 @@
#
# Release version (tag format)
version: "v1.3.0"
version: "v1.4.1"
# Container dependencies (used by `version` command)
# NOTE: this must stay inline with Dockerfiles

View File

@@ -153,8 +153,9 @@ namespace dfi\prices\internal
*/
protected function request_impl(string $url, array $header): mixed
{
$version = preg_replace('/^v/', '', $this->get_env()->get_env('API_VERSION'));
$headers = array(
'User-Agent: docker-finance /' . $this->get_env()->get_env('API_VERSION'),
'User-Agent: docker-finance/' . $version,
'Accept: application/json',
'Content-Type: application/json',
);
@@ -360,16 +361,17 @@ namespace dfi\prices\internal
$code = $e->getCode();
$message = $e->getMessage();
$print = "server sent error '{$message}' with code '{$code}' for '{$asset['id']}'"
. " - retrying in '{$timer}' seconds";
$print = "server sent error '{$message}' with code '{$code}' for '{$asset['id']}'";
switch ($code) {
// CoinGecko's unrecoverable error (paid plan needed)
case 10012:
case 400:
utils\CLI::throw_fatal($print);
break;
case 10012: // CoinGecko's unrecoverable error (paid plan needed)
utils\CLI::throw_fatal($print);
break;
default:
utils\CLI::print_warning($print);
utils\CLI::print_warning($print . " - retrying in '{$timer}' seconds");
break;
}

View File

@@ -2,7 +2,7 @@
// 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
// it under the terms of the GNU General Public License as published by
@@ -182,6 +182,14 @@ namespace dfi\prices\internal\prices\crypto
}
$response = $this->request_impl($url, $header);
if (array_key_exists('statusCode', $response)) {
switch ($response['statusCode']) {
case 200:
break;
default:
throw new \Exception($response['message'], $response['statusCode']);
}
}
if (array_key_exists('error', $response)) {
throw new \Exception($response['error']);
}

View File

@@ -142,6 +142,10 @@ function lib_hledger::__hledger-import()
{
lib_hledger::__parse_hledger-import "$@"
# TODO: v0.16.3+: add `--new-files-only` only if hledger-flow adds support for
# tracking changes to rules and preprocess files. The tracking *must* apply to
# all repo files and any/all custom files. Currently, only *modified* time of
# source files compared to *modified* time of target files are tracked.
time hledger-flow import \
"$(dirname $global_child_profile_journal)" \
--start-year "$global_arg_year"

View File

@@ -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",
1 Timestamp Date Time Type Transaction ID Fee Fee unit Address Label Amount Amount unit Fiat (USD) Other
2 1773852733 3/18/2026 9:52:13 AM GMT-7 SENT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX123 0.00001234 BTC bc1qXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX123 New FS tx 0.00012345 BTC 8.81

View File

@@ -36,16 +36,35 @@ source "${DOCKER_FINANCE_CONTAINER_REPO}/src/hledger-flow/lib/lib_preprocess.bas
[ -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()
{
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
local _subaccount
_subaccount="$(echo $global_in_filename | cut -d'_' -f1)"
# NOTE: subaccount (account label) is entered within the app
gawk \
"${_gawk[@]}" \
-v global_year="$global_year" \
-v global_subaccount="$global_subaccount" \
-v subaccount="$_subaccount" \
@@ -64,7 +83,7 @@ function parse()
# skip # Date (N/A)
# skip # Time (N/A)
# Type # TODO: are there more types?
# Type (TODO: are there more types?)
direction=($4 ~ /^RECV$/ ? "IN" : "OUT")
printf $4 OFS
@@ -80,7 +99,19 @@ function parse()
printf("%.8f", $10); printf OFS # Amount # TODO: more than 8 places for Ethereum, etc.?
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 direction OFS
@@ -88,7 +119,7 @@ function parse()
printf "\n"
}' FS=\; OFS=, "$global_in_path" >"$global_out_path"
}' "$_fs" OFS=, "$global_in_path" >"$global_out_path"
}
function main()

View File

@@ -2,7 +2,7 @@
# 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
# 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()
{
local _column="$1"
local _header
_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