about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorMarie-Helene Burle <msb2@sfu.ca>2019-06-01 10:37:48 -0700
committertoonn <toonn@toonn.io>2019-12-30 21:16:38 +0100
commit42a5cff42021b75f3a9efd4ad126dba5add9c4a9 (patch)
treeac79b1b4a3a5670d2faa9d532c9776ac5a28e6f0 /ranger
parentf6d7d5ca4b07f7d8687e3121877f329d1c64d791 (diff)
downloadranger-42a5cff42021b75f3a9efd4ad126dba5add9c4a9.tar.gz
More sensible way to add pandoc support for ePub, FB2, and ODT
Diffstat (limited to 'ranger')
-rwxr-xr-xranger/data/scope.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 1fde1de5..56ec51fb 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -83,6 +83,7 @@ handle_extension() {
         odt|ods|odp|sxw)
             ## Preview as text conversion
             odt2txt "${FILE_PATH}" && exit 5
+	    pandoc -s -t markdown "${FILE_PATH}" && exit 5
             exit 1;;
 
 	## ODT (using pandoc)
@@ -102,7 +103,7 @@ handle_extension() {
 	## DOCX, EPUB, FB2 (using pandoc)
 	## you might want to remove EPUB and/or FB2 if you have uncommented
         ## other methods to preview those formats
-	docx|epub|fb2)
+	docx)
 	    ## Preview as markdown conversion
 	    pandoc -s -t markdown "${FILE_PATH}" && exit 5
 	    exit 1;;
@@ -207,6 +208,12 @@ handle_image() {
         #         >/dev/null && exit 6
         #     exit 1;;
 
+	# ePub, FB2 (using pandoc)
+	# epub|fb2)
+	#     # Preview as markdown conversion
+	#     pandoc -s -t markdown "${FILE_PATH}" && exit 5
+	#     exit 1;;
+
         ## Font
         application/font*|application/*opentype)
             preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"