diff options
author | Zach Smith <zsmith@newhopechurch.tv> | 2025-06-30 09:54:09 -0500 |
---|---|---|
committer | Zach Smith <zsmith@newhopechurch.tv> | 2025-06-30 09:54:09 -0500 |
commit | e702ba1ce491456183e9f8ae4454d3a891e03273 (patch) | |
tree | 8c5948559ff74861bbcefdbfd1ad4d7e7ba9aa00 | |
parent | cee34d05f754ab8ae9a82d13a9feb50dfd0f3180 (diff) |
Use mac available progs in lf previewer
-rwxr-xr-x | lf/previewer | 14 |
1 files changed, 13 insertions, 1 deletions
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" |