support thumbnails for cbz, dbr and cbt
This commit is contained in:
parent
3ac2f3f9c1
commit
42f33547a4
@ -35,6 +35,12 @@ case "$(printf "%s\n" "$1" | awk '{print tolower($0)}')" in
|
|||||||
chafa "$CACHE.jpg" -f sixel -s "$(($2-2))x$(($3-2))" | sed 's/#/\n#/g'
|
chafa "$CACHE.jpg" -f sixel -s "$(($2-2))x$(($3-2))" | sed 's/#/\n#/g'
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
*.cbz|*.cbr|*.cbt)
|
||||||
|
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
|
||||||
|
[ ! -f "$CACHE.jpg" ] && comicthumb "$1" "$CACHE.jpg" 768
|
||||||
|
chafa "$CACHE.jpg" -f sixel -s "$(($2-2))x$(($3-2))" | sed 's/#/\n#/g'
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$(file --dereference --brief --mime-type -- "$1")" in
|
case "$(file --dereference --brief --mime-type -- "$1")" in
|
||||||
|
Loading…
Reference in New Issue
Block a user