extended awk scripts to return partentid

This commit is contained in:
2025-08-28 13:26:47 +02:00
parent 28f6dc67ba
commit f2383c3803
9 changed files with 133 additions and 119 deletions

View File

@@ -150,7 +150,7 @@ load_local() {
"$AWK_ARTISTS" |
sort |
column -t -s "$(printf '\t')" |
sed 's| \+\([0-9a-f-]\+\)$|\t\1|' >"$LOCALDATA_ARTISTS_VIEW"
sed 's| \+\([0-9a-f-]\+\) \+\([0-9a-f-]\+\)$|\t\1\t\2|' >"$LOCALDATA_ARTISTS_VIEW"
info "Precomputing releasegroup view"
while IFS= read -r rgid; do
mb_releasegroup "$rgid" | $JQ -r '[
@@ -192,11 +192,12 @@ load_local() {
sort -n -r |
cut -d "$(printf '\t')" -f 2- |
column -t -s "$(printf '\t')" |
sed 's| \+\([0-9a-f-]\+\)$|\t\1|' >"$LOCALDATA_RELEASEGROUPS_VIEW"
sed 's| \+\([0-9a-f-]\+\) \+\([0-9a-f-]\+\)$|\t\1\t\2|' >"$LOCALDATA_RELEASEGROUPS_VIEW"
info "Precomputing release view"
cut -d "$(printf '\t')" -f 1 "$LOCALDATA_RELEASES" |
while IFS= read -r rid; do
mb_release "$rid" | $JQ -r '[
"0",
.id,
.status,
.date,
@@ -228,5 +229,5 @@ load_local() {
sort -n -r |
cut -d "$(printf '\t')" -f 2- |
column -t -s "$(printf '\t')" |
sed 's| \+\([0-9a-f-]\+\):\(.*$\)$|\t\1\t\2|' >"$LOCALDATA_RELEASES_VIEW"
sed 's| \+\([0-9a-f-]\+\) \+\([0-9a-f-]\+\):\(.*$\)$|\t\1\t\2\t\3|' >"$LOCALDATA_RELEASES_VIEW"
}