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.
This commit is contained in:
@@ -28,38 +28,38 @@ source "${DOCKER_FINANCE_CONTAINER_REPO}/src/finance/lib/internal/lib_utils.bash
|
||||
# Facade
|
||||
#
|
||||
|
||||
function lib_ledger::ledger-import()
|
||||
function lib_hledger::hledger-import()
|
||||
{
|
||||
lib_ledger::__ledger "$@"
|
||||
lib_ledger::__ledger-import "$@"
|
||||
lib_hledger::__hledger "$@"
|
||||
lib_hledger::__hledger-import "$@"
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_ledger::ledger-cli()
|
||||
function lib_hledger::hledger-cli()
|
||||
{
|
||||
lib_ledger::__ledger "$@"
|
||||
lib_ledger::__ledger-cli "$@"
|
||||
lib_hledger::__hledger "$@"
|
||||
lib_hledger::__hledger-cli "$@"
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_ledger::ledger-ui()
|
||||
function lib_hledger::hledger-ui()
|
||||
{
|
||||
lib_ledger::__ledger "$@"
|
||||
lib_ledger::__ledger-ui "$@"
|
||||
lib_hledger::__hledger "$@"
|
||||
lib_hledger::__hledger-ui "$@"
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_ledger::ledger-vui()
|
||||
function lib_hledger::hledger-vui()
|
||||
{
|
||||
lib_ledger::__ledger "$@"
|
||||
lib_ledger::__ledger-vui "$@"
|
||||
lib_hledger::__hledger "$@"
|
||||
lib_hledger::__hledger-vui "$@"
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_ledger::ledger-web()
|
||||
function lib_hledger::hledger-web()
|
||||
{
|
||||
lib_ledger::__ledger "$@"
|
||||
lib_ledger::__ledger-web "$@"
|
||||
lib_hledger::__hledger "$@"
|
||||
lib_hledger::__hledger-web "$@"
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ function lib_ledger::ledger-web()
|
||||
#
|
||||
|
||||
# Constructor
|
||||
function lib_ledger::__ledger()
|
||||
function lib_hledger::__hledger()
|
||||
{
|
||||
# Base arguments to hledger before end-user added
|
||||
[ -z "$global_child_profile_journal" ] && lib_utils::die_fatal
|
||||
@@ -97,7 +97,7 @@ function lib_ledger::__ledger()
|
||||
lib_utils::print_debug "${global_base_args[*]}" "$@"
|
||||
}
|
||||
|
||||
function lib_ledger::__parse_ledger-import()
|
||||
function lib_hledger::__parse_hledger-import()
|
||||
{
|
||||
[ -z "$global_usage" ] && lib_utils::die_fatal
|
||||
[ -z "$global_arg_delim_1" ] && lib_utils::die_fatal
|
||||
@@ -157,30 +157,30 @@ function lib_ledger::__parse_ledger-import()
|
||||
fi
|
||||
}
|
||||
|
||||
function lib_ledger::__ledger-import()
|
||||
function lib_hledger::__hledger-import()
|
||||
{
|
||||
lib_ledger::__parse_ledger-import "$@"
|
||||
lib_hledger::__parse_hledger-import "$@"
|
||||
|
||||
time hledger-flow import \
|
||||
"$(dirname $global_child_profile_journal)" \
|
||||
--start-year "$global_arg_year"
|
||||
}
|
||||
|
||||
function lib_ledger::__ledger-cli()
|
||||
function lib_hledger::__hledger-cli()
|
||||
{
|
||||
[ -z "${global_base_args[*]}" ] && lib_utils::die_fatal
|
||||
|
||||
hledger "${global_base_args[@]}" "$@"
|
||||
}
|
||||
|
||||
function lib_ledger::__ledger-ui()
|
||||
function lib_hledger::__hledger-ui()
|
||||
{
|
||||
[ -z "${global_base_args[*]}" ] && lib_utils::die_fatal
|
||||
|
||||
hledger-ui "${global_base_args[@]}" "$@"
|
||||
}
|
||||
|
||||
function lib_ledger::__ledger-vui()
|
||||
function lib_hledger::__hledger-vui()
|
||||
{
|
||||
[ -z "${global_base_args[*]}" ] && lib_utils::die_fatal
|
||||
|
||||
@@ -188,7 +188,7 @@ function lib_ledger::__ledger-vui()
|
||||
| visidata --motd-url file:///dev/null --filetype csv
|
||||
}
|
||||
|
||||
function lib_ledger::__ledger-web()
|
||||
function lib_hledger::__hledger-web()
|
||||
{
|
||||
[ -z "${global_base_args[*]}" ] && lib_utils::die_fatal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user