container: lib_taxes: update bitcoin.tax docs/supported tags

This commit is contained in:
2026-04-02 16:54:09 -07:00
parent b4c7aa7db2
commit f3473beb00

View File

@@ -298,10 +298,17 @@ function lib_taxes::__parse_args()
function lib_taxes::__taxes() function lib_taxes::__taxes()
{ {
#
# Supported tags (locally "global") # Supported tags (locally "global")
local -r _income_tags=("INCOME" "GIFTIN" "MINING" "BORROW") #
local -r _spends_tags=("SPEND" "DONATION" "GIFT" "REPAY")
local -r _trades_tags=("BUY" "SELL" "SWAP" "MATCH" "REBATE" "RAW_TRADE" "PARTIAL_TRADE") local -r _income_tags=("INCOME" "INTEREST" "GIFTIN" "MINING" "BORROW" "DEPOSIT")
local -r _spends_tags=("SPEND" "DONATION" "GIFT" "REPAY" "WITHDRAWAL")
local _trades_tags
_trades_tags+=("BUY" "SELL" "SWAP") # Upstream
_trades_tags+=("MATCH" "REBATE" "RAW_TRADE" "PARTIAL_TRADE") # Unique to `dfi`
declare -r _trades_tags
local _print_year="$global_arg_year" local _print_year="$global_arg_year"
[ -z "$_print_year" ] && _print_year="all" [ -z "$_print_year" ] && _print_year="all"
@@ -355,49 +362,63 @@ function lib_taxes::__taxes_print()
for _arg in "${_arg_tag[@]}"; do for _arg in "${_arg_tag[@]}"; do
case "$_arg" in case "$_arg" in
income) income)
#
# Date (date and time as YYYY-MM-DD HH:mm:ss Z) # Date (date and time as YYYY-MM-DD HH:mm:ss Z)
# Action (INCOME, GIFTIN, MINING or BORROW) # Action (INCOME, INTEREST, GIFTIN, MINING, BORROW or DEPOSIT)
# Account (account or wallet name, e.g. Coinbase or Blockchain) # Account (account or wallet name, e.g. Coinbase or Ledger)
# Symbol (BTC, ETH, LTC, etc) # Symbol (BTC, ETH, USDC, etc)
# Volume (number of coins received) # Volume (amount of crypto received)
# Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR)
# Total (Fair price or value in Currency or your home currency, or blank for market value # Total (Fair price or value in Currency or your home currency, or blank for market value
# Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR)
# TransferAccount (name of sending account for DEPOSIT)
# Memo (optional, name of sender or item sold) # Memo (optional, name of sender or item sold)
# For example, #
# Date,Action,Account,Symbol,Volume # For example:
# 2020-01-01 13:00:00 -0800,INCOME,"Blockchain Wallet",BTC,1 #
# Date,Action,Account,Symbol,Volume
# 2020-01-01 13:00:00 -0800,INCOME,"Blockchain Wallet",BTC,1
#
local _tags=("${_income_tags[@]}") local _tags=("${_income_tags[@]}")
local _is_income=true local _is_income=true
;; ;;
spend | spends) spend | spends)
#
# Date (date and time as YYYY-MM-DD HH:mm:ss Z) # Date (date and time as YYYY-MM-DD HH:mm:ss Z)
# Action (SPEND, DONATION, GIFT or REPAY) # Action (SPEND, DONATION, GIFT, REPAY or WITHDRAWAL)
# Account (name of account or wallet, e.g. Coinbase or Blockchain) # Account (name of account or wallet, e.g. Coinbase or Ledger)
# Symbol (BTC, LTC, ETH, etc) # Symbol (BTC, ETH, USDC, etc)
# Volume (number of coins spent) # Volume (amount of crypto spent or sent)
# Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR)
# Total (Fair price or cost in Currency or your home currency, or blank for market value # Total (Fair price or cost in Currency or your home currency, or blank for market value
# Currency (optional, specify alternative to your default currency, such as USD, GBP or EUR)
# TransferAccount (name of receiving account for WITHDRAWAL)
# Memo (optional, name of recipient or item purchased) # Memo (optional, name of recipient or item purchased)
# For example, #
# Date,Action,Account,Symbol,Volume,Total,Currency # For example:
# 2020-01-01 13:00:00 -0800,SPEND,"Blockchain Wallet",BTC,1, #
# Date,Action,Account,Symbol,Volume,Total,Currency
# 2020-01-01 13:00:00 -0800,SPEND,"Blockchain Wallet",BTC,1,500,USD
#
local _tags=("${_spends_tags[@]}") local _tags=("${_spends_tags[@]}")
local _is_spends=true local _is_spends=true
;; ;;
trade | trades) trade | trades)
#
# Date (date and time as YYYY-MM-DD HH:mm:ss Z) # Date (date and time as YYYY-MM-DD HH:mm:ss Z)
# Action (BUY, SELL or SWAP) # Action (BUY, SELL or SWAP)
# Account (override the exchange or wallet name, e.g. Coinbase)
# Symbol (BTC, LTC, DASH, etc) # Symbol (BTC, LTC, DASH, etc)
# Volume (number of coins traded) # Volume (number of coins traded)
# Currency (specify currency such as USD, GBP, EUR or coins, BTC or LTC) # Currency (specify currency such as USD, GBP, EUR or coins, BTC or LTC)
# Account (override the exchange or wallet name, e.g. Coinbase)
# Total (you can use the total Currency amount or price per coin) # Total (you can use the total Currency amount or price per coin)
# Price (price per coin in Currency or blank for lookup) # Price (price per coin in Currency or blank for lookup)
# FeeCurrency (currency of fee if different than Currency)
# Fee (any additional costs of the trade) # Fee (any additional costs of the trade)
# For example, # FeeCurrency (currency of fee if different than Currency)
# Date,Action,Account,Symbol,Volume,Price,Currency,Fee #
# 2020-01-01 13:00:00 -0800,BUY,Coinbase,BTC,1500,USD,5.50 # For example:
#
# Date,Action,Account,Symbol,Volume,Price,Currency,Fee
# 2020-01-01 13:00:00 -0800,BUY,Coinbase,BTC,1,500,USD,5.50
#
local _tags=("${_trades_tags[@]}") local _tags=("${_trades_tags[@]}")
local _is_trades=true local _is_trades=true
;; ;;