From 63e9c1ba8f12b0545f14cc6b01a72a7894c05fa7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 6 Jul 2017 21:19:48 +0200 Subject: [PATCH] handle pdf & html --- mailcap/.mailcap | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mailcap/.mailcap b/mailcap/.mailcap index c4a502a..333ff05 100644 --- a/mailcap/.mailcap +++ b/mailcap/.mailcap @@ -60,3 +60,11 @@ image/*; curl -s '%s' | convert - jpg:/tmp/rtv.jpg && img2txt -f utf8 /tmp/rtv.j # Ascii videos video/x-youtube; youtube-dl -q -o - '%s' | mplayer -cache 8192 -vo caca -quiet -; needsterminal video/*; wget '%s' -O - | mplayer -cache 8192 -vo caca -quiet -; needsterminal + +# Pdf +application/pdf;mupdf '%s'; test=test -n "$DISPLAY" +application/pdf;pdftotext '%s'; copiousoutput + +# html +text/html; mv %s %s.html && qutebrowser %s.html >/dev/null 2>/dev/null; needsterminal; +text/html; w3m -I %{charset} -T text/html; copiousoutput;