diff options
-rwxr-xr-x | ranger/data/scope.sh | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index ae09fe39..da467efa 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -85,6 +85,31 @@ handle_extension() { odt2txt "${FILE_PATH}" && exit 5 exit 1;; + ## RTF and DOC + rtf|doc) + ## Preview as markdown conversion + ## note: catdoc does not always work for .doc files + catdoc "${FILE_PATH}" && exit 5 + exit 1;; + + ## DOCX + docx) + ## Preview as markdown conversion + pandoc -t markdown "${FILE_PATH}" && exit 5 + exit 1;; + + ## XLSX + xlsx) + ## Preview as csv conversion + xlsx2csv "${FILE_PATH}" && exit 5 + exit 1;; + + ## XLS + xls) + ## Preview as csv conversion + xls2csv "${FILE_PATH}" && exit 5 + exit 1;; + ## HTML htm|html|xhtml) ## Preview as text conversion @@ -304,7 +329,6 @@ handle_fallback() { exit 1 } - MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )" if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then handle_image "${MIMETYPE}" |