container: lib_taxes: don't write empty OBFS keymap rows

- Removes empty row quotations after selecting column.
- No longer writes row when `RawValue` is subsequently empty.
- Variable name refactor (`RawValue` is not limited to accounts).

NOTE: headers are still written, regardless of any keymap data.
This commit is contained in:
2026-04-06 14:41:45 -07:00
parent ed37859c4e
commit fc53b1310f

View File

@@ -1348,7 +1348,7 @@ function lib_taxes::__reports_obfs_gen()
# Generate obfs/raw keymap
local _raw_column
_raw_column="$(xan select $_column $_in_file | tail -n +2 | sort -u)"
_raw_column="$(xan select $_column $_in_file | tail -n +2 | sort -u | grep -v \"\")"
local _count
_count=$(echo "$_raw_column" | wc -l)
@@ -1358,7 +1358,7 @@ function lib_taxes::__reports_obfs_gen()
local _obfs_column
_obfs_column="$(echo "$_raw_column" \
| while read _account; do
| while read _entry; do
#
# OBFS column key is a truncated SHA digest of complete profile along with complete account.
#
@@ -1370,7 +1370,7 @@ function lib_taxes::__reports_obfs_gen()
# - complete profile is included as a means to provide a 'reasonable' salt
# (since default account names and memos can be used across profiles or subprofiles)
#
echo -n "${global_parent_profile}/${global_child_profile}/${_account}" | "$_sha" | head -c${2:-10}
echo -n "${global_parent_profile}/${global_child_profile}/${_entry}" | "$_sha" | head -c${2:-10}
echo
done)"
@@ -1394,7 +1394,7 @@ function lib_taxes::__reports_obfs_gen()
for(i = 1; i <= count; i++)
{
print r[i] OFS o[i]
if (r[i]) {print r[i] OFS o[i]}
}
}' FS=, OFS=, \
| (