forked from EvergreenCrypto/docker-finance
client: docker-finance.d: subscript: rewrite
- Refactors and sorts
- Consolidates commands
* Shortens hledger-{ui,vui,web}
* Comment out most aliases by default
- Updates to latest impl
- Adds notes and examples
This commit is contained in:
@@ -25,48 +25,54 @@
|
|||||||
|
|
||||||
[ -z "$DOCKER_FINANCE_CONTAINER_CMD" ] && echo "DOCKER_FINANCE_CONTAINER_CMD not set, check installation" >&2
|
[ -z "$DOCKER_FINANCE_CONTAINER_CMD" ] && echo "DOCKER_FINANCE_CONTAINER_CMD not set, check installation" >&2
|
||||||
|
|
||||||
# CLI hledger
|
# See `help` for all available commands and usage
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_hledger='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ hledger'
|
dfi_base_cmd='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@'
|
||||||
|
|
||||||
# Note: command ends in `\` and newline so you can add more arguments as needed
|
#
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_bal='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ hledger bal \
|
# Notes:
|
||||||
|
#
|
||||||
|
# - This file is most useful for single-user or multiple
|
||||||
|
# non-conflicting subprofile names.
|
||||||
|
#
|
||||||
|
# * To avoid naming conflicts, see the example below to create a
|
||||||
|
# parent prepended profile "namespace".
|
||||||
|
#
|
||||||
|
# - See `edit type=hledger` for customizable hledger options that
|
||||||
|
# you'd otherwise apply to all of the subprofile's hledger commands.
|
||||||
|
#
|
||||||
|
|
||||||
|
alias @DOCKER_FINANCE_SUBPROFILE@_bal='$dfi_base_cmd hledger bal \
|
||||||
assets liabilities \
|
assets liabilities \
|
||||||
'
|
'
|
||||||
|
|
||||||
# Terminal UI
|
## Example: the previous command but with a prepended parent profile "namespace"
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_ui='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ hledger-ui'
|
#alias @DOCKER_FINANCE_PROFILE@_@DOCKER_FINANCE_SUBPROFILE@_bal='$dfi_base_cmd hledger bal \
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_hledger-ui='@DOCKER_FINANCE_SUBPROFILE@_ui'
|
# assets liabilities \
|
||||||
|
#'
|
||||||
|
|
||||||
# Terminal UI (visidata)
|
## Example: fetch all prices for default (current) year
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_vui='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ hledger-vui'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_prices='$dfi_base_cmd fetch all=price'
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_hledger-vui='@DOCKER_FINANCE_SUBPROFILE@_vui'
|
|
||||||
|
|
||||||
# Web UI
|
## Example: print tagged income on all accounts in CSV tax format for default (current) year
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_web='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ hledger-web \'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_income_tax='$dfi_base_cmd taxes all=account tag=income write=off'
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_hledger-web='@DOCKER_FINANCE_SUBPROFILE@_web'
|
|
||||||
|
|
||||||
# Fetches, imports, generates taxes and reports (using defaults)
|
## Example: write income statements and balance sheets, quarterly & monthly for default (current) year
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_all='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ all'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_qm_reports='$dfi_base_cmd reports type=is,bs interval=quarterly,monthly'
|
||||||
|
|
||||||
# Edit configuration files
|
## Examples: uncomment and customize, as needed
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_edit='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ edit'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_all='$dfi_base_cmd all'
|
||||||
|
#alias @DOCKER_FINANCE_SUBPROFILE@_edit='$dfi_base_cmd edit'
|
||||||
# Fetch using remote APIs
|
#alias @DOCKER_FINANCE_SUBPROFILE@_fetch='$dfi_base_cmd fetch'
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_fetch='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ fetch'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_hledger='$dfi_base_cmd hledger'
|
||||||
|
#alias @DOCKER_FINANCE_SUBPROFILE@_import='$dfi_base_cmd import'
|
||||||
# hledger-flow CSV import
|
#alias @DOCKER_FINANCE_SUBPROFILE@_meta='$dfi_base_cmd meta'
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_import='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ import'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_plugins='$dfi_base_cmd plugins'
|
||||||
|
#alias @DOCKER_FINANCE_SUBPROFILE@_reports='$dfi_base_cmd reports'
|
||||||
# Financial metadata viewer
|
#alias @DOCKER_FINANCE_SUBPROFILE@_root='$dfi_base_cmd root'
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_meta='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ meta'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_taxes='$dfi_base_cmd taxes'
|
||||||
|
#alias @DOCKER_FINANCE_SUBPROFILE@_times='$dfi_base_cmd times'
|
||||||
# Generate financial reports
|
#alias @DOCKER_FINANCE_SUBPROFILE@_ui='$dfi_base_cmd hledger-ui'
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_reports='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ reports'
|
#alias @DOCKER_FINANCE_SUBPROFILE@_vui='$dfi_base_cmd hledger-vui'
|
||||||
|
#alias @DOCKER_FINANCE_SUBPROFILE@_web='$dfi_base_cmd hledger-web'
|
||||||
# ROOT.cern / Metadata analysis / C++ interpreter
|
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_root='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ root'
|
|
||||||
|
|
||||||
# Generate tax reports
|
|
||||||
alias @DOCKER_FINANCE_SUBPROFILE@_taxes='$DOCKER_FINANCE_CONTAINER_CMD @DOCKER_FINANCE_PROFILE@/@DOCKER_FINANCE_SUBPROFILE@ taxes'
|
|
||||||
|
|
||||||
# vim: syn=bash sw=2 sts=2 si ai et
|
# vim: syn=bash sw=2 sts=2 si ai et
|
||||||
|
|||||||
Reference in New Issue
Block a user