removed batcat dependency

This commit is contained in:
2025-07-25 09:05:32 +02:00
parent 7b83b55f69
commit 5bc17bccc9
4 changed files with 8 additions and 14 deletions

View File

@@ -5,6 +5,7 @@ __preview_artist() {
if [ ! "$desc" ]; then
desc=$(mb_artist_discogs "$1" | $JQ -r '.profile' | sed 's/\[a=\([^]]*\)\]/\1/g')
fi
[ "$desc" ] && desc="$(printf "$FORMAT_DESCRIPTION" "$desc")"
if [ "$(mb_artist "$1" | $JQ -r '.type')" = "Person" ]; then
# Show birth place and death place of person
lsb=$(mb_artist "$1" | $JQ -r '."life-span".begin // ""' | head -c 4)
@@ -32,5 +33,5 @@ __preview_artist() {
[ "$begin" ] && begin="$(printf "$FORMAT_LIFESPAN_BORN" "$begin")"
[ "$end" ] && end="$(printf "$FORMAT_LIFESPAN_DIED" "$end")"
fi
printf "\n\n%s\n\n%s\n%s" "$desc" "$begin" "$end" | tr -d '\r' | fold -s -w "$((FZF_PREVIEW_COLUMNS - 4))" | awk '{print " "$0" "}' | $CAT
printf "\n\n%s\n\n%s\n%s" "$desc" "$begin" "$end" | tr -d '\r' | fold -s -w "$((FZF_PREVIEW_COLUMNS - 4))" | awk '{print " "$0" "}' | cat
}