This commit is contained in:
2026-01-14 20:21:45 +01:00
parent 42945b2134
commit 80a8a32ab7
+16 -8
View File
@@ -1975,21 +1975,29 @@ spec:
set -e set -e
mkdir -p /app/assets mkdir -p /app/assets
# 1) Extract all bookmark links into JSON (raw fields)
yq -o=json ' yq -o=json '
[ .pages[] as $p [ .pages[] as $p
| ($p.columns[]?.widgets[]? | select(.type == "bookmarks")) as $w | .columns[]? as $c
| $c.widgets[]? as $w
| select($w.type == "bookmarks")
| $w.groups[]? as $g | $w.groups[]? as $g
| $g.links[]? | $g.links[]?
| select(.url != null and .url != "") | select(.url != null and .url != "")
| { | {
title: ((.title // .url) | tostring), title: (.title // ""),
url: (.url | tostring), url: .url,
page: ($p.name // "" | tostring), page: ($p.name // ""),
widget: ($w.title // "" | tostring), widget: ($w.title // ""),
group: ($g.title // "" | tostring) group: ($g.title // "")
} }
] | unique_by(.url) ]
' /config/glance.yml > /app/assets/bookmarks.json ' /config/glance.yml \
| yq -o=json '
map(.title = (if .title == "" then .url else .title end))
| unique_by(.url)
' - \
> /app/assets/bookmarks.json
echo "Bookmarks indexed: $(yq -r 'length' /app/assets/bookmarks.json)" echo "Bookmarks indexed: $(yq -r 'length' /app/assets/bookmarks.json)"
volumeMounts: volumeMounts: