Commit Graph

223 Commits

Author SHA1 Message Date
0266157abe client/container: usage help updates 2025-10-28 12:13:10 -07:00
da40a93ae1 container: lib_taxes: don't attempt to patch non-existent taxable events
An optimization and printing cleanup (attempts to patch won't break)
2025-10-28 12:09:57 -07:00
960e51fe0a container: lib_taxes: fix printing for 'all' years 2025-10-28 12:09:57 -07:00
e9960461b7 container: lib_taxes: fix arg parsing for 'all' years
Impl was not able to process 'all' years because global_arg_year was set
2025-10-28 12:09:57 -07:00
aaf3c21b7d container: hledger-flow: ethereum-based: compound: add internal swapping
when supplying/withdrawing.
2025-10-15 10:32:32 -07:00
e3f50ddb72 container: hledger-flow: vultr: add credits support
- Fixes direction to allow for credits issued by Vultr for N instances
- Updates documentation, adds where to put invoices to catch Sales Tax
2025-10-09 12:41:31 -07:00
aac3f780f9 Merge pull request #223 into master
5fb1d6f container: lib_reports: bump Copyright year (Aaron Fiore)
2025-10-03 14:17:50 -07:00
5fb1d6f2b0 container: lib_reports: bump Copyright year 2025-10-03 14:16:13 -07:00
3383b5c73f container: migrate from xsv to xan
`xsv` is no longer maintained and the author recommends `xan` instead.

Fortunately, `xan` is very suitable for our use-case; is very efficient,
and produces no differences in our expected output.
2025-10-03 14:09:34 -07:00
2f293ed566 container: lib_taxes: run linter 2025-10-02 17:19:21 -07:00
66c34a4b1c container: lib_taxes: optimize writes by forking
- Decreases real time in multicore container environments.
  * Given the nature of the writer, there should be no race conditions.
2025-10-02 17:09:48 -07:00
bf3a4e36e6 container: lib_reports: optimize writes by forking
- Decreases real time in multicore container environments.
  * Given the nature of the writer, there should be no race conditions.
2025-10-02 17:09:17 -07:00
3a35e45ffa container: hledger-flow: add explicit amount4 to applicable rules
For rule consistency. Does not affect balances or other functionality.
2025-09-19 12:55:47 -07:00
d83d9835da container: root: macro: Hash: change output to CSV format
The output can now be used with container's CSV tools.
2025-09-19 10:48:01 -07:00
c604ca8e39 container: root: macro: Random: change output to CSV format
The output can now be used with container's CSV tools.
2025-09-19 10:18:36 -07:00
c68a6680ef container: finance: completion: add 'help' to plugins 2025-09-04 15:08:20 -07:00
c3364511b0 container: finance: lib_plugins: update usage help
- Clarify usage, add examples, note plugin support type
  * finance's `plugins` only supports shell-based plugins
    - To use `root` plugins, use `root` command (see `root help`)
2025-09-04 15:08:20 -07:00
745a16e086 container: finance: completion: add root 2025-09-04 15:08:20 -07:00
33486665a9 container: root: rootlogon.C: remove default help()
Help will automatically load when starting an interactive instance.
2025-09-04 15:08:19 -07:00
ed163448f9 container: finance: add lib_root impl (macro/plugin support)
- dfi's `root` now supports shell loading (and running) of
  macros/plugins:

  * An interactive ROOT.cern instance is no longer *always* needed:

    - For macros (non-server); a 'one-off' instance will start, load the
      given macro, run the macro and then the instance will exit.

      * Server(s) will maintain an interactive instance.

    - For plugins; an interactive instance will start, load the given
      plugin, and then leave the user to make their calls manually.

  * All repo macros and repo/custom plugins are available.

- By default, an interactive instance will start when no dfi `root`
  arguments are given.

See `root help` for details.
2025-09-04 15:08:19 -07:00
2ec14fa1e1 container: hledger-flow: paypal-business: add expenses description subaccount
- If expense description exists, add description as subaccount
  * This is consistent with all other legacy finance rules
    - Typically, legacy institutions provide a column for category type.
      Since PayPal doesn't provide that data, using the description will
      provide the needed information for granular (full view) reporting.

- Removes old TODO that is no longer applicable
  * End-user will need to use custom rules, if needed
2025-09-02 13:23:35 -07:00
ef3b255bac container: hledger-flow: paypal: add expenses description subaccount
- If expense description exists, add description as subaccount
  * This is consistent with all other legacy finance rules
    - Typically, legacy institutions provide a column for category type.
      Since PayPal doesn't provide that data, using the description will
      provide the needed information for granular (full view) reporting.
2025-09-02 13:22:56 -07:00
b1ed20a4c8 container: hledger-flow: finish uniform fiat subaccounts
- For consistency across *all* hledger-flow accounts/rules.
- For future-proofing legacy finance (as related to #163).
2025-08-29 13:09:54 -07:00
178c197320 container: lib_fetch: fix wording to reflect impl 2025-08-26 14:06:46 -07:00
abac2a37d6 container: c++: run linter 2025-08-19 13:57:31 -07:00
1ce08021f8 container: c++: dfi namespace refactor
Align with project alias, save the eyes and hands.
2025-08-19 13:54:18 -07:00
491d77553f container: php: dfi namespace refactor
Align with project alias, save the eyes and hands.
2025-08-19 13:53:50 -07:00
903560ccc3 container: php: refactor for linter
- Removes deprecations (since PHP 8.4)
- Resolves linter errors
2025-08-19 11:09:05 -07:00
07b710567d container: fetch: refactor for php
- Refactors locations for internal `fetch` impl and deps (composer)
  * A softer hardcoding without the need for a new autoloader
  * A restructured solution to silence the linter (phpstan)

NOTE: variables are prepended with *_PHP_* as to not bring confusion
with any other `dfi` dependencies or the `dfi` `root` module (C++).
2025-08-18 14:37:29 -07:00
671362b445 container: finance: fetch: prices: format non-alpha currencies
Formats non-alpha character currencies for hledger's prices journal
(e.g., "1INCH", "USDC.e", etc.)
2025-08-08 13:58:38 -07:00
812d9cc7ce container: hledger-flow: remove potential % interpretation (printf)
Removes potential interpretation of percent signs in various types of
descriptions/notes/labels (otherwise, import may break).

Resolves "fatal: not enough arguments to satisfy format string" under
certain conditions.
2025-08-08 12:56:14 -07:00
cc2e4a736f container: hledger-flow: btcpayserver: update mockups
Reflects latest "Legacy Invoice Export" and "Wallets" exports.
2025-08-08 12:33:24 -07:00
5920d87f86 container: hledger-flow: btcpayserver: support "Legacy Invoice Export" plugin, update "Wallets" impl
BTCPay Server v2.2.0 has a new "Invoices" export format that is more
complex than the prior "Legacy Invoice Export" format.

To help facilitate the transition to the new format, upstream has
provided a plugin for backwards compatibility. However, this plugin
happens to provide additional columns that must be supported.

Additionaly, the "Wallets" format also has new columns with fee
information, so the impl now supports tx fees (prior, fees required
manual input).

The "Wallets" impl also now defaults to a refund expense account for
outgoing txs and adds tax rules & documentation for rationale.
2025-08-08 12:33:24 -07:00
731f9206f8 container: lib_taxes: remove non-alpha char (currency) hack
Now supported within flow impl.
2025-08-08 12:25:18 -07:00
facde4f533 container: fetch: gemini: remove non-alpha char (currency) hack
Now supported within flow impl.
2025-08-08 12:25:18 -07:00
b51b94d8a3 container: hledger-flow: support non-alpha chars (currency)
Removes old hack for currencies with non-alpha characters.
2025-08-08 12:25:18 -07:00
418ed80a8c container: hledger-flow: ethereum-based: support non-alpha chars (currency)
- Fixes broken import of any tx that contains non-alpha character(s) in
  its currency (digits, etc.)
  * Currencies may now contain any character(s) supported by hledger
2025-08-04 15:27:33 -07:00
0ce9302e50 container: hledger-flow: ethereum-based: rules (spam): add arbitrum/base/optimism, update polygon 2025-08-04 15:07:42 -07:00
cc024b838e container: hledger-flow: metamask: mockups: add arbitrum/base/optimism, update polygon 2025-08-04 15:07:10 -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
f8226cdccb container: hledger-flow: paypal-business: update mockup
Use generic business name to avoid possibility of infringement.
2025-07-03 14:21:11 -07:00
4718fcd0c4 container: hledger-flow: paypal: update fiat mockup
Reflects latest header and impl changes.
2025-07-03 14:13:31 -07:00
6fc4a1527d container: hledger-flow: paypal: support latest fiat header
- Breaking changes due to additional columns (not backwards-compatible).
- Adds 'fees' subaccount and new tags from the additional columns.
2025-07-03 14:09:23 -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
4add7c234c hledger-flow: ethereum-based: add to Ethereum spam rules 2025-03-19 17:48:42 -07:00
99c7075742 hledger-flow: btcpayserver: add local timezone support 2025-03-05 03:26:23 -08:00
338053e0db hledger-flow: btcpayserver: add taxed_as INCOME tag
All 'IN' direction is INCOME by default.
2025-03-05 02:44:11 -08:00
0a2d16098c hledger-flow: ethereum-based: add DeFi swapper tag
Adds the protocol or platform that conducts the swap.
2025-02-07 21:54:43 -08:00