diff options
author | toonn <toonn@toonn.io> | 2019-12-30 21:01:51 +0100 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2019-12-30 21:19:58 +0100 |
commit | b3c1bedb1edb66408501719558f903850f6ab771 (patch) | |
tree | 8bb04edeb7b64d7a3af374e7d0b0e850c6dcee5f | |
parent | 7615fdde77757dee3cf5479f1b1533340d482da3 (diff) | |
download | ranger-b3c1bedb1edb66408501719558f903850f6ab771.tar.gz |
Move xlsx back to handle_extension
Xlsx files aren't properly recognized by `file(1)`.
-rwxr-xr-x | ranger/data/scope.sh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index eb8b6348..f403ed83 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -87,6 +87,13 @@ handle_extension() { pandoc -s -t markdown -- "${FILE_PATH}" && exit 5 exit 1;; + ## XLSX + xlsx) + ## Preview as csv conversion + ## Uses: https://github.com/dilshod/xlsx2csv + xlsx2csv -- "${FILE_PATH}" && exit 5 + exit 1;; + ## HTML htm|html|xhtml) ## Preview as text conversion @@ -173,6 +180,7 @@ handle_image() { # >/dev/null && exit 6 # exit 1;; + ## Font application/font*|application/*opentype) preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png" if fontimage -o "${preview_png}" \ @@ -258,7 +266,7 @@ handle_mime() { local mimetype="${1}" case "${mimetype}" in ## RTF and DOC - text/rtf|*/msword) + text/rtf|*msword) ## Preview as text conversion ## note: catdoc does not always work for .doc files ## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/ @@ -273,15 +281,8 @@ handle_mime() { pandoc -s -t markdown -- "${FILE_PATH}" && exit 5 exit 1;; - ## XLSX - *spreadsheetml.sheet) - ## Preview as csv conversion - ## Uses: https://github.com/dilshod/xlsx2csv - xlsx2csv -- "${FILE_PATH}" && exit 5 - exit 1;; - ## XLS - */ms-excel) + *ms-excel) ## Preview as csv conversion ## xls2csv comes with catdoc: ## http://www.wagner.pp.ru/~vitus/software/catdoc/ |