68 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
594ca7efbf client: Dockerfiles: remote: root: bump to 6.38.04-1 2026-03-13 11:14:11 -07:00
709e7ba55d Merge pull request #316 into master
Some checks failed
docker-finance / all (push) Has been cancelled
89998354 container: php: fetch: blockchains: run linter, update comments (Aaron Fiore)
2026-03-13 11:11:24 -07:00
899983545c container: php: fetch: blockchains: run linter, update comments 2026-03-13 11:10:38 -07:00
6d736c4c4d Merge pull request #315 into master
Some checks failed
docker-finance / all (push) Has been cancelled
ac74afb2 client: lib_gen: fix (update) usage help for "all client related" (Aaron Fiore)
2026-03-13 11:09:22 -07:00
ac74afb299 client: lib_gen: fix (update) usage help for "all client related" 2026-03-11 14:56:29 -07:00
a38fbca502 Merge pull request #314 into master
All checks were successful
docker-finance / all (push) Successful in 34m38s
38c61a51 client: archlinux: re-install system base dependencies (Aaron Fiore)
38e8e373 client: manifest: archlinux: remove `less` from base (Aaron Fiore)
2026-03-11 14:50:15 -07:00
38c61a516b client: archlinux: re-install system base dependencies
in order to capture their respective man pages.
2026-03-11 14:15:14 -07:00
38e8e37397 client: manifest: archlinux: remove less from base
as it is now in "related".
2026-03-11 14:09:44 -07:00
ba2cbf34f5 Merge pull request #313 into master
Some checks failed
docker-finance / all (push) Has been cancelled
7d5050ab client: manifest: archlinux: add man-db package (Aaron Fiore)
48505366 client: archlinux: add man page support to base image (Aaron Fiore)
2026-03-11 13:30:33 -07:00
7d5050ab86 client: manifest: archlinux: add man-db package 2026-03-11 13:13:45 -07:00
4850536629 client: archlinux: add man page support to base image 2026-03-11 13:13:45 -07:00
a6b98ad8d9 Merge pull request #312 into master
All checks were successful
docker-finance / all (push) Successful in 36m57s
07a10817 repo: gitea: workflows: dfi: update edit of build file (Aaron Fiore)
070a6646 client: manifest: archlinux: finance: add "related" category (Aaron Fiore)
dbbe4246 client: archlinux: move `calc` package to base image (Aaron Fiore)
270e6e7e client: archlinux: add 'Related "useful" packages' section (Aaron Fiore)
2026-03-11 11:58:01 -07:00
07a1081751 repo: gitea: workflows: dfi: update edit of build file 2026-03-11 11:50:44 -07:00
070a66460c client: manifest: archlinux: finance: add "related" category
Describes packages/commands that are "related" but not dependencies.
2026-03-11 11:50:44 -07:00
dbbe42466c client: archlinux: move calc package to base image
as it is a 'Related "useful" package'.
2026-03-11 11:50:44 -07:00
270e6e7e62 client: archlinux: add 'Related "useful" packages' section
(for consistenly useful packages that aren't dependencies)
and move `less` from "Base dependencies" to this section.
2026-03-11 11:50:35 -07:00
a690bd1348 Merge pull request #311 into master
Some checks failed
docker-finance / all (push) Failing after 6m57s
26b90fe1 client: lib_docker: `shell`: remove explicit workdir, use default (Aaron Fiore)
2026-03-11 11:46:32 -07:00
26b90fe167 client: lib_docker: shell: remove explicit workdir, use default
Defaults to the WORKDIR in the finalized Dockerfile produced by `build`.
2026-03-11 11:44:04 -07:00
a2168e397e Merge pull request #310 into master
Some checks failed
docker-finance / all (push) Has been cancelled
1721ecd1 container: lib_taxes: print locations of output (Aaron Fiore)
81e97efd container: lib_reports: print locations of output (Aaron Fiore)
2026-03-11 11:42:09 -07:00
1721ecd1f5 container: lib_taxes: print locations of output 2026-03-10 15:29:18 -07:00
81e97efd0a container: lib_reports: print locations of output
And clarify URI perspective.
2026-03-10 15:29:18 -07:00
8479411327 Merge pull request #309 into master
All checks were successful
docker-finance / all (push) Successful in 33m41s
ef6dac4f repo: gitea: workflows: dfi: add tests for custom compose merge file (Aaron Fiore)
7111df14 client: add custom compose merge file functionality (Aaron Fiore)
2026-03-04 12:08:25 -08:00
ef6dac4f47 repo: gitea: workflows: dfi: add tests for custom compose merge file 2026-03-04 10:53:37 -08:00
7111df14d3 client: add custom compose merge file functionality
Like custom build functionality (custom Dockerfile), adds support for
custom docker-compose.yml functionality:
  * Adds default custom compose file
  * Adds to run-time environment
  * Adds to `gen` and `edit`
2026-03-04 10:53:36 -08:00
d6100d209c Merge pull request #308 into master
All checks were successful
docker-finance / all (push) Successful in 37m43s
1402084a CHANGELOG: add 1.3.0 (Aaron Fiore)
e9137da2 client: manifest: bump version to v1.3.0 (Aaron Fiore)
2026-02-27 13:10:31 -08:00
1402084a7c CHANGELOG: add 1.3.0 2026-02-26 14:58:35 -08:00
e9137da2b8 client: manifest: bump version to v1.3.0 2026-02-26 14:33:15 -08:00
95da584c45 Merge pull request #307 into master
All checks were successful
docker-finance / all (push) Successful in 26m44s
fc4bfe1a client: Dockerfiles: remote: root: bump to 6.38.02-1 (Aaron Fiore)
2026-02-26 14:31:14 -08:00
fc4bfe1a0c client: Dockerfiles: remote: root: bump to 6.38.02-1 2026-02-26 13:38:45 -08:00
41fc0a64db Merge pull request #306 into master
All checks were successful
docker-finance / all (push) Successful in 34m22s
12d9d31d client: docker: completion: add help to `plugins` (Aaron Fiore)
17692e61 client: docker: lib_plugins: update usage help (Aaron Fiore)
0e40b89b container: finance: lib_plugins: update usage help (Aaron Fiore)
2026-02-26 10:40:57 -08:00
12d9d31d2f client: docker: completion: add help to plugins 2026-02-26 10:38:28 -08:00
17692e61fc client: docker: lib_plugins: update usage help 2026-02-26 10:38:28 -08:00
0e40b89be8 container: finance: lib_plugins: update usage help 2026-02-25 11:43:04 -08:00
ea5b3b8d84 Merge pull request #305 into master
All checks were successful
docker-finance / all (push) Successful in 36m15s
a69d0b20 client: plugins: tor: decrease bootstrap wait time (Aaron Fiore)
2026-02-25 10:13:47 -08:00
a69d0b20dd client: plugins: tor: decrease bootstrap wait time
Now that retries are implemented, this can be reduced.

NOTE: while it's possible to add controller support, this works for now.
2026-02-24 13:56:38 -08:00
77185e6b09 Merge pull request #304 into master
All checks were successful
docker-finance / all (push) Successful in 33m5s
2b975345 client: Dockerfiles: remote: root: bump to 6.38.00-4 (Aaron Fiore)
2026-02-23 12:13:06 -08:00
2b9753459e client: Dockerfiles: remote: root: bump to 6.38.00-4 2026-02-23 11:01:07 -08:00
413f5805a5 Merge pull request #303 into master
All checks were successful
docker-finance / all (push) Successful in 48m58s
eca2f75f client: fix base path location deduction when sourced (Aaron Fiore)
2026-02-19 11:26:24 -08:00
eca2f75f74 client: fix base path location deduction when sourced
- Since these files are only ever sourced, deduction must be relative to
  `BASH_SOURCE` (or else realpath will break)

- Fixes client-side `plugins` completion
  * realpath breakage was introduced in #301
2026-02-19 11:10:39 -08:00
f7ca987da3 Merge pull request #302 into master
All checks were successful
docker-finance / all (push) Successful in 40m20s
96964b43 container: root: plugin: common: fix docs (custom plugin location) (Aaron Fiore)
2026-02-19 10:33:58 -08:00
96964b4372 container: root: plugin: common: fix docs (custom plugin location)
`DOCKER_FINANCE_CLIENT_PLUGINS` is bind-mounted to
`DOCKER_FINANCE_CONTAINER_PLUGINS` and docs must reflect container view.
2026-02-18 16:41:35 -08:00
31 changed files with 495 additions and 88 deletions

View File

@@ -85,7 +85,7 @@ function client::install()
function client::finance::gen()
{
local -r _tags=("micro" "tiny" "slim" "default")
local -r _types=("env" "build" "superscript" "env,build,superscript")
local -r _types=("env" "build" "compose" "superscript" "env,build,compose,superscript")
for _tag in "${_tags[@]}"; do
for _type in "${_types[@]}"; do
@@ -112,10 +112,16 @@ function client::finance::edit()
types+=("env")
types+=("shell" "superscript")
types+=("build" "dockerfile")
types+=("compose")
types+=("env,shell,build")
types+=("env,superscript,dockerfile")
types+=("env,superscript,dockerfile,compose")
declare -r types
# The expected default path for default finance image
local _path
_path="${HOME:?}/docker-finance/conf.d/client/$(uname -s)-$(uname -m)/archlinux/default"
declare -r _path
for _tag in "${tags[@]}"; do
for _type in "${types[@]}"; do
local _edit="dfi archlinux/${USER}:${_tag} edit"
@@ -127,12 +133,25 @@ function client::finance::edit()
# Valid
"${ci_shell[@]}" "$_edit type=${_type} & wait ; kill -9 %1"
done
# Build: uncomment all optional packages and plugin dependencies
if [[ "$_tag" == "default" ]]; then
local _file
_file="${HOME:?}/docker-finance/conf.d/client/$(uname -s)-$(uname -m)/archlinux/default/Dockerfiles/${USER:?}@$(uname -n)"
# Build: uncomment all optional packages and plugin dependencies from custom build file
_file="${_path}/Dockerfiles/${USER:?}@$(uname -n)"
[ ! -f "$_file" ] && exit 1
sed -i '18,56s/#//' "$_file"
sed -i '18,51s/#//' "$_file"
# Build: uncomment custom compose merge file
_file+=".yml"
[ ! -f "$_file" ] && exit 1
sed -i '8,13s/#//' "$_file"
# env: add variables used in custom compose merge file
_file="${_path}/env/${USER:?}@$(uname -n)"
[ ! -f "$_file" ] && exit 1
echo "DOCKER_FINANCE_CLIENT_TESTING=/tmp/testing" >>$_file
echo "DOCKER_FINANCE_CONTAINER_TESTING=/tmp/testing" >>$_file
fi
done
}
@@ -722,7 +741,7 @@ function container::finance::root()
function client::dev-tools::gen()
{
local -r _tags=("micro" "tiny" "slim" "default")
local -r _types=("env" "build" "superscript" "env,build,superscript")
local -r _types=("env" "build" "compose" "superscript" "env,build,compose,superscript")
# TODO: 'default' should only be supported
for _tag in "${_tags[@]}"; do
@@ -747,7 +766,8 @@ function client::dev-tools::edit()
_types+=("env")
_types+=("shell" "superscript")
_types+=("build" "dockerfile")
_types+=("env,shell,build")
_types+=("compose")
_types+=("env,shell,build,compose")
_types+=("env,superscript,dockerfile")
declare -r _types

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,122 @@
# 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).
Also included are dfi-docs updates: [how to get started](https://gitea.evergreencrypto.co/EvergreenCrypto/dfi-docs/src/branch/master/markdown/How-do-I-get-started.md), categorical [plugins](https://gitea.evergreencrypto.co/EvergreenCrypto/dfi-docs/src/branch/master/markdown/How-do-I-use-it.md#plugins) and a new demo of the [Bitcoin plugin](https://gitea.evergreencrypto.co/EvergreenCrypto/dfi-docs/src/branch/master/markdown/How-do-I-use-it.md#plugins-bitcoin).
### 1.3.0 - Fixes
- Fix `root` plugin code documentation (custom plugin location) ([#302](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/302))
### 1.3.0 - Enhancements
- 🚨**Breaking** Change layout of default client/container paths (environment, bind-mounts) ([#301](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/301)) ([#303](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/303))
* Defaults are now consolidated under a single parent directory
* Basenames are now simply-named to avoid verbosity and confusion
* For smoothest transition:
1. Create a parent umbrella directory called `./docker-finance`
2. Rename (or symlink) your `docker-finance` repository (`DOCKER_FINANCE_CLIENT_REPO`) to `./docker-finance/repo`
3. Rename (or symlink) your `docker-finance.d` directory (`DOCKER_FINANCE_CLIENT_CONF`) to `./docker-finance/conf.d`
4. Rename (or symlink) your `finance-flow` directory (`DOCKER_FINANCE_CLIENT_FLOW`) to `./docker-finance/flow`
- Within your `./docker-finance/flow/profiles` directory, rename all subprofile `docker-finance.d` directories to `conf.d`
6. Rename (or symlink) your custom `plugins` directory (`DOCKER_FINANCE_CLIENT_PLUGINS`) to `./docker-finance/plugins`
7. Rename (or symlink) your `share.d` directory (`DOCKER_FINANCE_CLIENT_SHARED`) to `./docker-finance/share.d`
8. Manually update all `./docker-finance/conf.d` environment files for all platforms/tags to reflect the new client-side locations:
- e.g.; `$EDITOR ./docker-finance/conf.d/client/Linux-x86_64/archlinux/default/env/$(whoami)@$(uname -n)`
9. Manually update your `superscript.bash`; changing `docker-finance.d` to `conf.d` where applicable:
- e.g.; `sed -i 's:/docker-finance.d/:/conf.d/:g' ./docker-finance/conf.d/container/shell/superscript.bash`
10. Manually remove the docker-finance `source` completion line from `~/.bashrc` (or `~/.bash_aliases`)
11. Re-run install:
- i.e.; `./docker-finance/repo/client/install.bash && source ~/.bashrc`
12. *Optional* Re-run `gen type=env` to produce the new container-side bind-mount locations:
- i.e.; `dfi archlinux/${USER}:default gen type=env confirm=no`
13. 🥳 Your new defaults can now be changed and paths moved/renamed as you please: simply update your environment file in `conf.d`:
- i.e.; `dfi archlinux/${USER}:default edit type=env`
- ⚠ If changing the expected repository location, you'll need to manually update the `conf.d` environment file as well as your aliases/source (`~/.bashrc`)
- Allow undesirable characters in variable-text columns for respective hledger-flow accounts, related refactoring ([#297](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/297))
- Add `root` interpreter common exit function and test case, refactor CI workflow ([#298](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/298))
- Silence client's `exec` noise, when not debugging ([#299](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/299))
- Pull tags from remote in client Bitcoin plugin ([#300](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/300))
- Decrease bootstrap wait time for client Tor plugin ([#305](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/305))
- Improve usage help for client/container `plugins` commmand, add help to client `plugins` completion ([#306](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/306))
### 1.3.0 - Updates
- Update all repo-related domain links to gitea.evergreencrypto.co ([#296](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/296))
* You can still find this repository mirrored to gitea.com
- Bump `root` to 6.38.02-1 ([#304](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/304)) ([#307](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/307))
### 1.3.0 - Contributors
- Aaron Fiore
## 1.2.0 - 2026-02-06
This point release focuses on providing a new CI system using [Gitea Actions](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/actions).

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

@@ -33,15 +33,39 @@ COPY --from=hledger-suite /usr/local/bin/hledger-flow /usr/local/bin/hledger-flo
RUN pacman -Syu --noconfirm --disable-download-timeout
# Apply man page support, as it's unsupported in upstream image (by default)
# NOTE: must be applied here before installing any other packages (that have man pages)
RUN sed -i '/NoExtract = usr\/share\/man\/\* usr\/share\/info\/\*/d' /etc/pacman.conf
# System packages
# NOTE: although these are already default-installed in the upstream image,
# they're re-installed here in order to capture their respective man pages.
RUN pacman -Syu \
bash \
coreutils \
gawk \
sed \
--noconfirm --disable-download-timeout
# Base packages
RUN pacman -Syu \
bc \
csvkit \
less \
vim \
xan \
yq \
--noconfirm --disable-download-timeout
#
# Related "useful" packages (not dependencies)
#
RUN pacman -Syu \
calc \
less \
man-db \
--noconfirm --disable-download-timeout
#
# Entrypoint
#

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

@@ -27,7 +27,7 @@ RUN sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD
USER builder
WORKDIR /home/builder
RUN git clone --depth=1 https://gitlab.archlinux.org/archlinux/packaging/packages/root -b 6.38.00-3
RUN git clone --depth=1 https://gitlab.archlinux.org/archlinux/packaging/packages/root -b 6.38.04-1
WORKDIR /home/builder/root

View File

@@ -0,0 +1,32 @@
# docker-finance | modern accounting for the power-user
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# docker-finance @DOCKER_FINANCE_VERSION@
## This is a custom compose file that will be *merged* with the base compose file
## See https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/ for details
## An example of adding a custom volume and environment variables
## NOTE: *MUST* also add these variables to the env file (`edit type=env`)
#services:
# docker-finance:
# volumes:
# - ${DOCKER_FINANCE_CLIENT_TESTING}:${DOCKER_FINANCE_CONTAINER_TESTING}
# environment:
# - DOCKER_FINANCE_CONTAINER_TESTING=${DOCKER_FINANCE_CONTAINER_TESTING}
# vim: sw=2 sts=2 si ai et

View File

@@ -36,11 +36,6 @@ RUN pacman -Syu --noconfirm
## Optional (examples)
##
## Finance-related
#RUN pacman -Syu \
# calc \
# --noconfirm --disable-download-timeout
## Text editors
#RUN pacman -Syu \
# emacs-nox \

View File

@@ -0,0 +1,32 @@
# docker-finance | modern accounting for the power-user
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# docker-finance @DOCKER_FINANCE_VERSION@
## This is a custom compose file that will be *merged* with the base compose file
## See https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/ for details
## An example of adding a custom volume and environment variables
## NOTE: *MUST* also add these variables to the env file (`edit type=env`)
#services:
# docker-finance:
# volumes:
# - ${DOCKER_FINANCE_CLIENT_TESTING}:${DOCKER_FINANCE_CONTAINER_TESTING}
# environment:
# - DOCKER_FINANCE_CONTAINER_TESTING=${DOCKER_FINANCE_CONTAINER_TESTING}
# vim: sw=2 sts=2 si ai et

View File

@@ -0,0 +1,32 @@
# docker-finance | modern accounting for the power-user
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# docker-finance @DOCKER_FINANCE_VERSION@
## This is a custom compose file that will be *merged* with the base compose file
## See https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/ for details
## An example of adding a custom volume and environment variables
## NOTE: *MUST* also add these variables to the env file (`edit type=env`)
#services:
# docker-finance:
# volumes:
# - ${DOCKER_FINANCE_CLIENT_TESTING}:${DOCKER_FINANCE_CONTAINER_TESTING}
# environment:
# - DOCKER_FINANCE_CONTAINER_TESTING=${DOCKER_FINANCE_CONTAINER_TESTING}
# vim: sw=2 sts=2 si ai et

View File

@@ -67,7 +67,7 @@ fi
# Client-specific environment, including bind mounts (client view)
if [ -z "$global_client_base_path" ]; then
global_client_base_path="$(dirname $(realpath -s "$BASH_SOURCE" | rev | cut -d'/' -f6- | rev))"
global_client_base_path="$(realpath -s "${BASH_SOURCE[0]}" | rev | cut -d'/' -f7- | rev)"
fi
if [ -z "$DOCKER_FINANCE_CLIENT_CONF" ]; then

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.2.0"
version: "v1.4.1"
# Container dependencies (used by `version` command)
# NOTE: this must stay inline with Dockerfiles
@@ -38,7 +38,6 @@ container:
packages:
- "bc"
- "csvkit"
- "less"
- "vim"
- "xan"
- "yq"
@@ -48,6 +47,12 @@ container:
- "hledger-iadd --version"
- "hledger-ui --version"
- "hledger-web --version"
related:
packages:
- "calc"
- "less"
- "man-db"
commands:
fetch:
packages:
- "composer"

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 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
@@ -99,7 +99,7 @@ function tor::start()
&& echo 'socks5 $_ip 9050' >>$_proxychains" || lib_utils::die_fatal
# Test Tor connection
local -r _sleep="30s"
local -r _sleep="20s"
lib_utils::print_info "${global_container}: testing connection (bootstrapping ~${_sleep})"
sleep "$_sleep" # Give time to bootstrap

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 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
@@ -131,7 +131,7 @@ function docker-finance::completion()
find "${DOCKER_FINANCE_CLIENT_REPO}"/client/plugins/docker "${_args[@]}" -printf 'repo/%P\n' 2>/dev/null
})
declare -r _plugins
mapfile -t _reply < <(compgen -W "${_plugins[*]}" -- "$_cur")
mapfile -t _reply < <(compgen -W "help ${_plugins[*]}" -- "$_cur")
;;
esac
declare -r _reply

View File

@@ -66,6 +66,8 @@ function lib_docker::__docker()
# Generate docker-compose.yml
#
# NOTE: custom compose file merging happens at runtime
local _path="${global_repo_dockerfiles}/docker-compose.yml"
lib_utils::print_debug "Generating '${_path}'"
@@ -83,12 +85,16 @@ function lib_docker::__docker_compose()
{
[ -z "$global_env_file" ] && lib_utils::die_fatal
[ -z "$global_repo_dockerfiles" ] && lib_utils::die_fatal
[ -z "$global_custom_composefile" ] && lib_utils::die_fatal
[ ! -f "$global_env_file" ] \
&& lib_utils::die_fatal "$global_env_file not found! Run the gen command!"
&& lib_utils::die_fatal "$global_env_file not found! Run the \`gen\` command!"
[ ! -f "$global_custom_composefile" ] \
&& lib_utils::die_fatal "$global_custom_composefile not found! Run \`gen type${global_arg_delim_2}compose\`"
pushd "$global_repo_dockerfiles" 1>/dev/null || return $?
docker compose -f docker-compose.yml --env-file "$global_env_file" "$@" || return $?
docker compose -f docker-compose.yml -f "$global_custom_composefile" --env-file "$global_env_file" "$@" || return $?
popd 1>/dev/null || return $?
}
@@ -505,7 +511,7 @@ function lib_docker::__shell()
[ -z "$global_container" ] && lib_utils::die_fatal
lib_utils::print_debug "Spawning shell in container '${global_container}'"
docker exec -it --user "$global_arg_user" --workdir / "$global_container" /bin/bash
docker exec -it --user "$global_arg_user" "$global_container" /bin/bash
}
function lib_docker::__exec()
@@ -546,7 +552,7 @@ function lib_docker::__parse_args_edit()
Configuration type:
type${global_arg_delim_2}<env|{shell|superscript}|{build|dockerfile}>
type${global_arg_delim_2}<env | {shell | superscript} | {build | dockerfile} | compose>
\e[32mExamples:\e[0m
@@ -556,11 +562,11 @@ function lib_docker::__parse_args_edit()
\e[37;2m# Edit client/container shell (superscript) \e[0m
$ $global_usage type${global_arg_delim_2}shell
\e[37;2m# Edit client's custom Dockerfile (appended to final Dockerfile) \e[0m
$ $global_usage type${global_arg_delim_2}build
\e[37;2m# Edit client's custom Dockerfile (appended to final Dockerfile) and custom docker-compose.yml \e[0m
$ $global_usage type${global_arg_delim_2}build${global_arg_delim_3}compose
\e[37;2m# Previous commands with alternate wordings\e[0m
$ $global_usage type${global_arg_delim_2}superscript${global_arg_delim_3}dockerfile${global_arg_delim_3}env
$ $global_usage type${global_arg_delim_2}superscript${global_arg_delim_3}dockerfile${global_arg_delim_3}env${global_arg_delim_3}compose
"
if [ $# -ne 1 ]; then
@@ -593,7 +599,7 @@ function lib_docker::__parse_args_edit()
read -ra _read <<<"$_arg_type"
for _type in "${_read[@]}"; do
if [[ ! "$_type" =~ ^env$|^shell$|^superscript$|^build$|^dockerfile$ ]]; then
if [[ ! "$_type" =~ ^env$|^shell$|^superscript$|^build$|^dockerfile$|^compose$ ]]; then
lib_utils::die_usage "$_usage"
fi
done
@@ -638,6 +644,11 @@ function lib_docker::__edit()
_paths+=("$global_custom_dockerfile")
;;
compose)
[ -z "$global_custom_composefile" ] && lib_utils::die_fatal
_paths+=("$global_custom_composefile")
;;
esac
done

View File

@@ -90,7 +90,7 @@ function lib_env::env()
# Environment location
# NOTE: keep aligned with gen.bash
local _env_dir
_env_dir="$(dirname $(realpath -s "$BASH_SOURCE" | rev | cut -d'/' -f6- | rev))/conf.d/${global_tag_dir}/env"
_env_dir="$(realpath -s "${BASH_SOURCE[0]}" | rev | cut -d'/' -f7- | rev)/conf.d/${global_tag_dir}/env"
local _env_file="${_env_dir}/${global_conf_filename}"
# shellcheck source=/dev/null
@@ -208,6 +208,12 @@ function lib_env::__set_client_globals()
&& lib_utils::die_fatal "Missing default custom Dockerfile '${global_repo_custom_dockerfile}'"
lib_utils::print_debug "global_repo_custom_dockerfile=${global_repo_custom_dockerfile}"
# Base custom end-user .in docker-compose.yml
declare -g global_repo_custom_composefile="${global_repo_conf_dir}/client/Dockerfiles/${global_platform_image}/docker-compose.yml.${global_platform}.in"
[ ! -f "$global_repo_custom_composefile" ] \
&& lib_utils::die_fatal "Missing default custom docker-compose.yml '${global_repo_custom_composefile}'"
lib_utils::print_debug "global_repo_custom_composefile=${global_repo_custom_composefile}"
#
# Client-side env
#
@@ -226,12 +232,18 @@ function lib_env::__set_client_globals()
global_env_file="${_client_env_dir}/${global_conf_filename}"
lib_utils::print_debug "global_env_file=${global_env_file}"
# Custom Dockerfile (if available)
# Custom docker files (docker related) location
local _client_dockerfile_dir="${DOCKER_FINANCE_CLIENT_CONF}/${global_tag_dir}/Dockerfiles"
[ ! -d "$_client_dockerfile_dir" ] && mkdir -p "$_client_dockerfile_dir"
# Custom Dockerfile
global_custom_dockerfile="${_client_dockerfile_dir}/${global_conf_filename}"
lib_utils::print_debug "global_custom_dockerfile=${global_custom_dockerfile}"
# Custom docker-compose.yml
global_custom_composefile="${_client_dockerfile_dir}/${global_conf_filename}.yml"
lib_utils::print_debug "global_custom_composefile=${global_custom_composefile}"
# NOTE:
#
# Client env tag format is avoided because:

View File

@@ -64,7 +64,7 @@ function lib_gen::__parse_args()
Category type:
type${global_arg_delim_2}<env | build | flow | superscript>
type${global_arg_delim_2}<env | build | compose | flow | superscript>
Flow (only):
@@ -111,21 +111,21 @@ function lib_gen::__parse_args()
\e[37;2m# Generate only the Docker environment\e[0m
$ $global_usage type${global_arg_delim_2}env
\e[37;2m# Generate custom Dockerfile and joint client/container superscript\e[0m
$ $global_usage type${global_arg_delim_2}build${global_arg_delim_3}superscript
\e[37;2m# Generate custom Dockerfile, docker-compose.yml and joint client/container superscript\e[0m
$ $global_usage type${global_arg_delim_2}build${global_arg_delim_3}compose${global_arg_delim_3}superscript
\e[37;2m# Generate all client related data\e[0m
$ $global_usage type${global_arg_delim_2}env${global_arg_delim_3}build${global_arg_delim_3}superscript
$ $global_usage type${global_arg_delim_2}env${global_arg_delim_3}build${global_arg_delim_3}compose${global_arg_delim_3}superscript
\e[37;2m#\e[0m
\e[37;2m# Flow: Profile -> Configs / Accounts\e[0m
\e[37;2m#\e[0m
\e[37;2m# Generate all client related and all flow related for profile/subprofile called 'parent/child'\e[0m
$ $global_usage type${global_arg_delim_2}env${global_arg_delim_3}build${global_arg_delim_3}superscript${global_arg_delim_3}flow profile${global_arg_delim_2}parent${global_arg_delim_1}child
$ $global_usage type${global_arg_delim_2}env${global_arg_delim_3}build${global_arg_delim_3}compose${global_arg_delim_3}superscript${global_arg_delim_3}flow profile${global_arg_delim_2}parent${global_arg_delim_1}child
\e[37;2m# Same command as above but without confirmations and with developer mockups\e[0m
$ $global_usage type${global_arg_delim_2}env${global_arg_delim_3}build${global_arg_delim_3}superscript${global_arg_delim_3}flow profile${global_arg_delim_2}parent${global_arg_delim_1}child confirm${global_arg_delim_2}false dev${global_arg_delim_2}true
$ $global_usage type${global_arg_delim_2}env${global_arg_delim_3}build${global_arg_delim_3}compose${global_arg_delim_3}superscript${global_arg_delim_3}flow profile${global_arg_delim_2}parent${global_arg_delim_1}child confirm${global_arg_delim_2}false dev${global_arg_delim_2}true
\e[37;2m# Generate only the given configurations for 'parent/child'\e[0m
$ $global_usage type${global_arg_delim_2}flow profile${global_arg_delim_2}parent${global_arg_delim_1}child config${global_arg_delim_2}fetch${global_arg_delim_3}hledger${global_arg_delim_3}meta${global_arg_delim_3}subscript
@@ -279,7 +279,7 @@ function lib_gen::__parse_args()
if [ ! -z "$_arg_type" ]; then
read -ra _read <<<"$_arg_type"
for _arg in "${_read[@]}"; do
if [[ ! "$_arg" =~ ^env$|^build$|^flow$|^superscript$ ]]; then
if [[ ! "$_arg" =~ ^env$|^build$|^compose$|^flow$|^superscript$ ]]; then
lib_utils::die_usage "$_usage"
fi
done
@@ -440,6 +440,9 @@ function lib_gen::__gen_client()
fi
# Filter to de-clutter output file (license cleanup)
local -r _filter="1,17d"
#
# Custom (optional) Dockerfile
#
@@ -467,9 +470,6 @@ function lib_gen::__gen_client()
lib_utils::print_debug "$global_custom_dockerfile"
fi
# Filter to de-clutter output file (license cleanup)
local -r _filter="1,17d"
sed \
-e "$_filter" \
-e "s:@DOCKER_FINANCE_VERSION@:${global_client_version}:g" \
@@ -479,6 +479,42 @@ function lib_gen::__gen_client()
lib_gen::__gen_edit "$global_custom_dockerfile"
fi
#
# Custom (optional) docker-compose.yml
#
if [[ -z "${global_arg_type[*]}" || "${global_arg_type[*]}" =~ compose ]]; then
[ -z "$global_custom_composefile" ] && lib_utils::die_fatal
[ -z "$global_repo_custom_composefile" ] && lib_utils::die_fatal
# Backup existing custom compose file
if [ -f "$global_custom_composefile" ]; then
lib_utils::print_custom " \e[32m│\e[0m\n"
lib_utils::print_custom " \e[32m├─\e[34;1m Custom docker-compose.yml found, backup then generate new one? [Y/n] \e[0m"
[ -z "$global_arg_confirm" ] && lib_utils::print_custom "\n" || read -p "" _read
local _confirm="${_read:-y}"
if [[ "$_confirm" == [yY] || -z "$global_arg_confirm" ]]; then
cp -a "$global_custom_composefile" "${global_custom_composefile}_${global_suffix}" || lib_utils::die_fatal
fi
else
lib_utils::print_custom " \e[32m│\e[0m\n"
lib_utils::print_custom " \e[32m├─\e[34;1m Generating new custom docker-compose.yml\e[0m\n"
lib_utils::print_debug "$global_repo_custom_composefile"
lib_utils::print_debug "$global_custom_composefile"
fi
sed \
-e "$_filter" \
-e "s:@DOCKER_FINANCE_VERSION@:${global_client_version}:g" \
"$global_repo_custom_composefile" >"$global_custom_composefile" || lib_utils::die_fatal
lib_utils::print_custom " \e[32m│ └─\e[34m Edit file now? [Y/n] \e[0m"
lib_gen::__gen_edit "$global_custom_composefile"
fi
#
# Generate client-side `plugins` layout (custom)
#

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 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
@@ -71,14 +71,32 @@ function lib_plugins::__parse_args()
\e[32mUsage:\e[0m
$ $global_usage <repo${global_arg_delim_1}plugin | custom${global_arg_delim_1}plugin> [args]
$ $global_usage <help | [TAB COMPLETION]> [args]
\e[32mArguments:\e[0m
[None | help]: show this usage help
[TAB COMPLETION]: run given shell plugin
custom = custom plugins in custom plugin location
repo = repository plugins in repository location
[args]: arguments to plugin
\e[32mExamples:\e[0m
\e[37;2m# Execute a repository plugin in '${_repo}'\e[0m
\e[37;2m# See this usage help\e[0m
$ $global_usage help
\e[37;2m# The output of tab completion\e[0m
$ $global_usage \\\t\\\t
custom/example.bash help repo/bitcoin.bash repo/example.bash repo/tor.bash
\e[37;2m# Execute a repository shell plugin in '${_repo}'\e[0m
$ $global_usage repo${global_arg_delim_1}example.bash \"I'm in repo\"
\e[37;2m# Execute a custom plugin in '${_custom}'\e[0m
\e[37;2m# Execute a custom shell plugin in '${_custom}'\e[0m
$ $global_usage custom${global_arg_delim_1}example.bash \"I'm in custom\"
"

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
@@ -77,9 +77,11 @@ namespace dfi\blockchains
$metadata->set_year($this->get_env()->get_env('API_FETCH_YEAR'));
// Reconstruct subaccount directory for out directory
// API_OUT_DIR format: hledger-flow/profiles/parent_profile/child_profile/import/child_profile/account/subaccount/1-in/year
// API_OUT_DIR format: flow/profiles/parent_profile/child_profile/import/child_profile/account/subaccount/1-in/year
$path = explode('/', $this->get_env()->get_env('API_OUT_DIR'));
$path = array_filter($path, function ($element) { return $element !== '';}); // Clear out extra / that get turned into nulls
$path = array_filter($path, function ($element) {
return $element !== '';
}); // Clear out extra '/' that get turned into nulls
$head_end = $path;
$tail_end = $path;

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

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 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
@@ -71,7 +71,7 @@ function lib_plugins::__parse_args()
\e[32mUsage:\e[0m
$ $global_usage [help | [TAB COMPLETION]] [args]
$ $global_usage <help | [TAB COMPLETION]> [args]
\e[32mArguments:\e[0m
@@ -91,8 +91,8 @@ function lib_plugins::__parse_args()
\e[37;2m# The output of tab completion\e[0m
$ $global_usage \\\t\\\t
custom/billing/invoice.bash help repo/timew_to_timeclock.bash
custom/billing/manage.bash repo/example.bash
custom/billing/invoice.bash custom/example.bash repo/example.bash
custom/billing/manage.bash help repo/timew_to_timeclock.bash
\e[37;2m# Execute a repository shell plugin in '${_repo}'\e[0m
$ $global_usage repo${global_arg_delim_1}example.bash \"I'm in repo\"

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
@@ -365,10 +365,16 @@ function lib_reports::__reports()
"$_index" \
""
lib_utils::print_custom "\n Now, open your browser to:\n"
[ -z "$DOCKER_FINANCE_CLIENT_FLOW" ] && lib_utils::die_fatal
local -r _client_out_dir="${DOCKER_FINANCE_CLIENT_FLOW}/profiles/${global_parent_profile}/${global_child_profile}/reports/${_year}"
[ -z "${DOCKER_FINANCE_CLIENT_FLOW}" ] && lib_utils::die_fatal
lib_utils::print_custom "\n file://${DOCKER_FINANCE_CLIENT_FLOW}/profiles/${global_parent_profile}/${global_child_profile}/reports/${_year}/${_index}.html\n\n"
lib_utils::print_custom "\n Reports are located:\n\n"
lib_utils::print_custom "\tclient (host): ${_client_out_dir}/\n\n"
lib_utils::print_custom "\tcontainer: ${_out_dir}/\n"
lib_utils::print_custom "\n On your client (host), open your browser to:\n\n"
lib_utils::print_custom "\tfile://${_client_out_dir}/${_index}.html\n\n"
lib_utils::print_info "Done!"
}

View File

@@ -1119,7 +1119,13 @@ function lib_taxes::__taxes_write()
local -r _return=$?
if [ $_return -eq 0 ]; then
lib_utils::print_custom "\n"
[ -z "$DOCKER_FINANCE_CLIENT_FLOW" ] && lib_utils::die_fatal
lib_utils::print_custom "\n Taxes are located:\n\n"
lib_utils::print_custom "\tclient (host): ${DOCKER_FINANCE_CLIENT_FLOW}/profiles/${global_parent_profile}/${global_child_profile}/taxes/${global_arg_year}/\n\n"
lib_utils::print_custom "\tcontainer: ${_tax_root_dir}/\n\n"
lib_utils::print_info "Done!"
fi

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

View File

@@ -141,7 +141,7 @@ class Plugin final
//!
//! Will load:
//!
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's loader (plugin-implementation defined).
//!
@@ -178,12 +178,12 @@ void load(const common::PluginPath& path, const common::PluginArgs& args)
//! Will load:
//!
//! &emsp; `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//! &emsp; `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//!
//! And pass plugin-implementation defined auto-loader arguments:
//!
//! &emsp; `using foo = int; foo f;` for `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -228,7 +228,7 @@ void load(
//!
//! Will load:
//!
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's loader (plugin-implementation defined).
//!
@@ -260,7 +260,7 @@ void load(const std::string& path, const std::string& arg = {})
//! Will load both:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc\n
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -306,7 +306,7 @@ void load(const std::initializer_list<std::string>& paths)
//!
//! Will unload:
//!
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's unloader (plugin-implementation defined).
//!
@@ -343,12 +343,12 @@ void unload(const common::PluginPath& path, const common::PluginArgs& args)
//! Will unload:
//!
//! &emsp; `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//! &emsp; `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//!
//! And pass plugin-implementation defined auto-unloader arguments:
//!
//! &emsp; `using foo = int; foo f;` for `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -393,7 +393,7 @@ void unload(
//!
//! Will unload:
//!
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's unloader (plugin-implementation defined).
//!
@@ -425,7 +425,7 @@ void unload(const std::string& path, const std::string& arg = {})
//! Will unload both:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc\n
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -497,12 +497,12 @@ void reload(const common::PluginPath& path, const common::PluginArgs& args)
//! Will reload:
//!
//! &emsp; `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//! &emsp; `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//!
//! And pass plugin-implementation defined auto-loader arguments:
//!
//! &emsp; `using foo = int; foo f;` for `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -547,7 +547,7 @@ void reload(
//!
//! Will reload:
//!
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's auto-unloader (plugin-implementation defined).
//!
@@ -581,7 +581,7 @@ void reload(
//! Will reload both:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc\n
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n