*WARNING*: lightning support is a WIP due to an unresolved electrum
lightning history bug (see docker-finance #227).
This commit is needed for backwards compatibility, as the new electrum
format will break import - even if lightning is never used.
`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.
- 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`)
- 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.
- 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
- 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.
- 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++).
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.
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.
- 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
- 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
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.
- 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.