From 5b9fe16bc9f3ea57f329e531ae652d684b1876e9 Mon Sep 17 00:00:00 2001 From: Michael Huang <40531692+MayoDuckPy@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:22:06 +0000 Subject: Separate OpenOffice preview cases (#376) This commit ports ranger/ranger@9da2b4c which fixes previews with 'ods' and 'odp' filetypes as pandoc does not support them. --- config/preview_file.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/preview_file.sh b/config/preview_file.sh index 15fa6fc..bb7cc7b 100755 --- a/config/preview_file.sh +++ b/config/preview_file.sh @@ -96,12 +96,16 @@ handle_extension() { exit 1 ;; ## OpenDocument - odt|ods|odp|sxw) + odt|sxw) ## Preview as text conversion odt2txt "${FILE_PATH}" && exit 0 ## Preview as markdown conversion pandoc -s -t markdown -- "${FILE_PATH}" && exit 0 exit 1 ;; + ods|odp) + ## Preview as text conversion (unsupported by pandoc for markdown) + odt2txt "${FILE_PATH}" && exit 0 + exit 1 ;; ## XLSX xlsx) -- cgit v1.2.3