From e702ba1ce491456183e9f8ae4454d3a891e03273 Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Mon, 30 Jun 2025 09:54:09 -0500 Subject: Use mac available progs in lf previewer --- lf/previewer | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lf/previewer') diff --git a/lf/previewer b/lf/previewer index 24db043..a41e692 100755 --- a/lf/previewer +++ b/lf/previewer @@ -27,10 +27,22 @@ case "$(file -Lb --mime-type "$file")" in ;; application/epub+zip|application/epub) CACHE=$(mktemp /tmp/thumbcache.XXXXX) - epub-thumbnailer "$1" "$CACHE" 1024 + python3 ~/Applications/epub-thumbnailer.py "$1" "$CACHE" 1024 $HOME/.config/lf/image draw "$CACHE" rm -f "$CACHE" "$CACHE.png" ;; + application/vnd.openxmlformats-officedocument.wordprocessingml.document) + textutil -convert txt -stdout "$1" + ;; + application/vnd.oasis.opendocument.text) + textutil -convert txt -stdout "$1" + ;; + text/*) + cat -v "$1" + ;; + *) + exiftool "$1" + ;; esac pistol "$file" -- cgit v1.2.3