From ad6fcad33033f0966874588590b70963b23f0b99 Mon Sep 17 00:00:00 2001 From: DLFW Date: Wed, 19 Jul 2023 00:16:57 +0200 Subject: Fix docs for combined text and image preview (#363) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed a “bug” in the recipe for combining text and image previews. Images at a location whose path contains a space were not shown with the calculated y-offset. --- docs/image_previews/combined_with_text.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/image_previews/combined_with_text.md b/docs/image_previews/combined_with_text.md index 39dd8b3..b194ca3 100644 --- a/docs/image_previews/combined_with_text.md +++ b/docs/image_previews/combined_with_text.md @@ -31,7 +31,7 @@ case "$mimetype" in tags=$(tmsu_tag_list) echo "$dimension" echo "$tags" - meta_file="$(get_preview_meta_file $path)" + meta_file=$(get_preview_meta_file "$path") let y_offset=`printf "${tags}" | sed -n '=' | wc -l`+2 echo "y-offset $y_offset" > "$meta_file" exit 4 @@ -52,7 +52,7 @@ After we have the y-offset available, we adapt the “preview shown” hook scri case "$mimetype" in image/png | image/jpeg) - meta_file="$(get_preview_meta_file $path)" + meta_file=$(get_preview_meta_file "$path") y_offset=`cat "$meta_file" | grep "y-offset" | awk '{print $2}'` y=$(( $y + $y_offset )) show_image "$path" $x $y $width $height -- cgit v1.2.3