Commit Graph

89 Commits

Author SHA1 Message Date
facde4f533 container: fetch: gemini: remove non-alpha char (currency) hack
Now supported within flow impl.
2025-08-08 12:25:18 -07:00
d270d56366 client/container: ethereum-based: support Etherscan V2, add more L2 chains
- Implements support for unified API via Etherscan V2 (ethereum-based)
  * All ethereum-based L2s are now accessed via single API endpoint
    - Chains are now available via chain ID
  * Updates API key requirement for `fetch` ethereum-based subaccounts
    - The API key's value must now be prepended with "etherscan"
      * Previously was prepended per-chain ("ethereum" or "polygon")
    - The API key is now *required* (can be generated at etherscan.io)
      * Resolves fatal error in Etherscan::parse_response()
      * Impl will now handle if:
        - Config's API key/value is malformed
        - Etherscan API key was not given
        - Etherscan response is fatal

- Adds support for more L2s
  * Arbitrum (One)
  * Optimism
  * Base

- Adds more L2s to existing accounts
  * Coinbase Wallet
  * Ledger Live
  * MetaMask

- Updates documentation
  * Update default generated `fetch` config
  * Update `fetch` usage help
  * Update README
2025-08-04 15:07:10 -07:00
84ec085b8a container: src: finance: change visidata default dir
The container environment's $DOCKER_FINANCE_CONTAINER_CONF is
bind-mounted and, by default, points to ~/.config/docker-finance.d

The parent dir (~/.config) is subsequently owned by root (Docker-ism).
Ergo, with visidata v3.2, visidata cannot create its default dir:

    "PermissionError: [Errno 13] Permission denied: for visidata config"

This commit fixes that by setting visidata's default dir to use the
calling profile's docker-finance.d (where profile customization occurs).

Also included is some related refactoring.
2025-06-25 12:07:51 -07:00
88d254d752 container: src: completion: add more hledger commands 2025-05-27 15:16:43 -07:00
98adf3d87d container: fetch: prices: crypto: mobula: isolate given year
- Will now only parse given year (or 'all', if given).

  * No longer parses all subsequent years after given year
    (unless 'all' is given).

- Now prints most recent daily average for given year instead of most
  recent daily average for current year.
2025-03-24 12:36:37 -07:00
21967e711d container: lib_taxes: remove unused arg expansion, appease the linter
shellcheck will complain about the need for expansions but the
asked-for expansions will not actually be used (thus the TODO).
2025-01-31 19:23:18 -08:00
08c1de5d9d container: lib_taxes: optimize record printing, add checks and logging
- When applicable, as the stream progresses, exit each successive gawk
  iteration when no applicable records are present (no taxable events
  found for the given tag in the given year).

  Previously, when no records were found, a reports file was produced
  with either a single header-only row or junk data that resulted from
  the assumption there would be real data.

  A preexisting hack prevented the junk data from being written after
  production but this commit will resolve that hack by preventing the
  printing of junk data while also preventing the production of a
  header-only file.

- Print warnings when no taxable events are found for the given year.

- Add checks:
  * Only verify patched files if the patched files are not empty.
  * Empty variable checks.
2025-01-31 19:23:18 -08:00
36c0c93390 container: lib_taxes: reorder obfs columns
Sorted raw values take legibility precedence over sorted obfs keys.
2025-01-08 23:55:05 -08:00
3f7e8569fe container: fetch: coinbase: reinstate sort (remove pessimization)
Without this sort, transactions will not actually be written...
2025-01-08 20:51:33 -08:00
95c7212a3d container: fetch: coinbase: remove sort (optimize)
Received transactions are already sorted.
2025-01-07 20:44:48 -08:00
80039297a3 container: fetch: coinbase: fix/update pagination
- Don't break before advancing 'starting_after' cursor
  * Only save given year instead of breaking when not given year

- The 'next_starting_after' cursor now exists within 'info' object
2025-01-07 18:03:13 -08:00
9034346426 container: fetch: remove bittrex 2025-01-04 01:16:05 -08:00
c7ba59cfa1 container: lib_fetch: remove bittrex 2025-01-04 01:16:05 -08:00
f7cf8ca960 container: fetch: remove coinbase-pro 2025-01-04 01:16:05 -08:00
ae3caef110 container: lib_fetch: remove coinbase-pro 2025-01-04 01:16:04 -08:00
58e860dd94 container: fetch: remove celsius 2025-01-04 01:16:02 -08:00
d8a1b4cff1 container: lib_fetch: remove celsius 2025-01-04 01:15:59 -08:00
2b3b09dafa container: lib_taxes: add support for IRS Rev. Proc. 2024-28
- Creates per-wallet / per-account compliance for IRS Rev. Proc. 2024-28

  * Obfuscated keymap now creates a unique indentifier per-wallet /
    per-account where all trades, spends and income are now clearly
    tied to their respective wallets / accounts.

- Removes support for anonymized ("universal pool") reports.
2025-01-02 20:30:32 -08:00
ed57dc0749 client/container: use 'dfi' as global basename
Aligned with installation, will make usage help clearer.
2024-12-24 01:46:20 -08:00
a29426b910 container: finance: lib_hledger: remove -w from hledger-ui
Workaround for "hledger-ui: user error (Error: couldn't start native file manager: fdType: unsupported operation (unknown file type))"
2024-12-12 23:38:05 -08:00
c8611edacb client/container: src: completion: plugins enhancements
- Re-enables space after completion for plugin arguments
- Ignores internal/implementation files when completing
  * Files must be within an 'internal'/'impl' directory
2024-10-09 21:13:36 -07:00
ceaca332dd container: src: fetch: gemini: add debug logging 2024-10-08 19:05:40 -07:00
249ebe03d6 container: lib_edit: add hledger 'add' command 2024-10-01 19:38:35 -07:00
01197a2818 client/container: implement debug log-levels
DOCKER_FINANCE_DEBUG will now support the following:

0 = no debug output
1 = `print_debug` (bash/PHP)
2 = level 1 + `set -xv` (bash)
2024-09-26 18:38:36 -07:00
8a1f653127 Merge pull request #146 into master
fd23a93 container: src: lib_edit: add 'subscript' to case (Aaron Fiore)
2024-09-24 18:30:35 -07:00
5acbbfb799 container: src: lib_hledger: remove hledger version test
No longer needed because 1.40 is the minimum version provided by the
current build (courtesty of repo 'Dockerfiles/remote/hledger-suite').
2024-09-24 18:12:47 -07:00
da8488ebb0 container: src: lib_hledger: fork hledger-web, log print
Gives more convenient shell control for end-user.
2024-09-24 18:06:04 -07:00
8a8395e844 container: src: lib_hledger: pass hledger-{ui,web} args
These are currently within the subscript but should be a part of the
baseline command.
2024-09-24 18:06:04 -07:00
fd23a93b0b container: src: lib_edit: add 'subscript' to case
'shell' is the equivalent of 'subscript' (but 'subscript' was missing).
2024-09-24 00:31:01 -07:00
ea392ec360 container: remove ledger in place of hledger
As said before; `lib_ledger` was meant to be a general abstraction to
any underlying CLI ledger.

But, between C++ `ledger` and Ledger Hardware Wallet, this abstraction
has become too confusing and counterproductive.

Since `hledger` will be the underlying implementation for the forseeable
future, all doubt should now be removed.
2024-09-23 18:09:40 -07:00
1101fc81b4 container: rename lib_ledger to lib_hledger
As said before; `lib_ledger` was meant to be a general abstraction to
any underlying CLI ledger.

But, between C++ `ledger` and Ledger Hardware Wallet, this abstraction
has become too confusing and counterproductive.

Since `hledger` will be the underlying implementation for the forseeable
future, all doubt should now be removed.
2024-09-23 18:09:33 -07:00
52270ba0b3 container: rename $global_conf_shell -> $global_conf_subscript
Provides clarity, avoids confusion.
2024-09-23 17:31:11 -07:00
51bf587ceb client/container: rename 'subprofile' script to 'subscript'
- Provides clarity, avoids confusion (subprofile.bash -> subscript.bash)

- Changes filename in superscript source
  * End-user must update with client command `edit type=superscript`

- Changes filename in flow subprofile's docker-finance.d
  * Pre-existing subprofiles must manually rename their subscript file
2024-09-23 17:31:11 -07:00
0b2c76a813 container: finance: add dependency checks for modules
Since modules are included upon build type, if a build doesn't support
a feature then that feature's dependencies will not be available.

This commit will give notice of those missing dependencies.
2024-09-17 20:06:34 -07:00
7c46719ab1 container: finance: lib_fetch: fix Tor plugin (proxychains) check
This ensures that curl will only be executed if the Tor plugin
(proxychains) argument is enabled.
2024-09-16 21:10:49 -07:00
afa2e368f1 container: finance: completion: add hledger commands 2024-09-11 21:17:58 -07:00
cff19f87d9 container: fetch: run linter 2024-09-07 18:59:04 -07:00
520be13464 container: finance: lib_plugins: allow path depth
- Allows plugins to function within subdirectories
- Removes redundant arg checking
2024-09-04 18:16:08 -07:00
29d2921dd8 container: lib_fetch: fix price parsing
- Fix check if price API is not set
- Fix check for invalid asset sequence
- Improve log messages
2024-08-21 20:21:28 -07:00
29cc6f615e container: fetch: price: refactor empty key type
Needed for bash lib_fetch's use of `yq`.
2024-08-17 23:19:57 -07:00
a3b889052b container: lib_fetch: refactor to use yq
Replaces `shyaml` dependency with `yq`.
2024-08-17 23:19:57 -07:00
77a8b21893 container: lib_fetch: implement Tor support
- Adds 'tor' option
- Uses `proxychains-ng`
- Expects docker-finance's Tor plugin
2024-08-15 21:31:54 -07:00
d7caec13e4 client/container: disable shellcheck warning for DOCKER_FINANCE_DEBUG
If it's not set or set to false, then it's expected to be not true.
2024-08-14 20:03:03 -07:00
563ca66d2d container: finance.bash: fix typo for ledger-ui 2024-08-14 19:53:31 -07:00
744181776f container: completion.bash: set xtrace if debug enabled 2024-08-14 19:40:55 -07:00
e9e2ed6d88 container: finance.bash: set xtrace if debug enabled 2024-08-14 19:40:55 -07:00
bf1d9dd212 container: completion: add hledger-vui
The custom visidata UI (not `hledger-ui`).
2024-08-14 19:36:53 -07:00
550110ffd1 container: finance.bash: add hledger-vui to usage help
The custom visidata UI (not `hledger-ui`).
2024-08-14 19:36:53 -07:00
7e75bb542b container: completion: add hledger family
Since inception, the intent was to abstract the "interface" to allow for
a general-purpose CLI accounting ledger. However, there appears to be
confusion about whether the underlying implementation is `ledger`
accounting software or `hledger` accounting software.

So, making it clearer that it's `hledger` accounting software (although,
will continue to keep the `ledger` command for backwards-compatibility).
2024-08-14 19:36:53 -07:00
d06c894acb container: finance.bash: clarify hledger (not ledger)
Since inception, the intent was to abstract the "interface" to allow for
a general-purpose CLI accounting ledger. However, there appears to be
confusion about whether the underlying implementation is `ledger`
accounting software or `hledger` accounting software.

So, making it clearer that it's `hledger` accounting software (although,
will continue to keep the `ledger` command for backwards-compatibility).
2024-08-14 19:36:52 -07:00