Merge pull request #180 into master
9380f03hledger-flow: lib_preprocess: allow testing of single / multiple columns (Aaron Fiore)0932246hledger-flow: lib: symlink to finance's lib_utils (Aaron Fiore)
This commit was merged in pull request #180.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# docker-finance | modern accounting for the power-user
|
# docker-finance | modern accounting for the power-user
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -60,13 +60,13 @@ echo -e " \e[32m├─\e[34m\e[1;3m ${global_account}/${global_subaccount}\e[
|
|||||||
echo -e " \e[32m│ └─\e[34;3m ${global_year}\e[0m"
|
echo -e " \e[32m│ └─\e[34;3m ${global_year}\e[0m"
|
||||||
echo -e " \e[32m│ └─\e[37;2m ${global_in_filename}\e[0m"
|
echo -e " \e[32m│ └─\e[37;2m ${global_in_filename}\e[0m"
|
||||||
|
|
||||||
# Search for column in given CSV header
|
# Test if column(s) exist in given CSV header
|
||||||
function lib_preprocess::test_header()
|
function lib_preprocess::test_header()
|
||||||
{
|
{
|
||||||
local _column="$1"
|
local _column="$1"
|
||||||
local _header
|
local _header
|
||||||
_header="$(lib_preprocess::__sanitize_header $2)"
|
_header="$(lib_preprocess::__sanitize_header $2)"
|
||||||
[[ "$_header" =~ (^${_column},|,${_column},|,${_column}$) ]] && return 0 || return 2
|
[[ "$_header" =~ (^${_column}$|^${_column},|,${_column},|,${_column}$) ]] && return 0 || return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Assert header in given CSV header
|
# Assert header in given CSV header
|
||||||
|
|||||||
1
container/src/hledger-flow/lib/lib_utils.bash
Symbolic link
1
container/src/hledger-flow/lib/lib_utils.bash
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../finance/lib/internal/lib_utils.bash
|
||||||
Reference in New Issue
Block a user