diff options
-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" |