[packages/mailcap] fixed text/html copiousoutput charset passing from Content-Type header, asciiview and cacaview need

gotar gotar at pld-linux.org
Mon May 26 17:31:52 CEST 2014


commit 4623e8a902e23dfa89937316d87af07d4b6c6ccf
Author: Tomasz Pala <gotar at pld-linux.org>
Date:   Mon May 26 17:28:50 2014 +0200

    fixed text/html copiousoutput charset passing from Content-Type header,
    asciiview and cacaview need terminal, added RTF handler (plain ASCII
    text, might be better to output HTML and handle it accordingly)

 mailcap      | 8 +++++---
 mailcap.spec | 1 +
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/mailcap.spec b/mailcap.spec
index 4aa5b13..1a09e5f 100644
--- a/mailcap.spec
+++ b/mailcap.spec
@@ -52,6 +52,7 @@ Suggests:	soffice2html
 Suggests:	tar
 Suggests:	tnef
 Suggests:	unrar
+Suggests:	unrtf
 Suggests:	unzip
 Suggests:	wv
 Suggests:	xdvi
diff --git a/mailcap b/mailcap
index def1a3d..1bee904 100644
--- a/mailcap
+++ b/mailcap
@@ -1,7 +1,7 @@
 image/*; /usr/bin/eog %s; test=[ -n "$DISPLAY" -a -x /usr/bin/eog ]
 image/*; /usr/bin/qiv %s; test=[ -n "$DISPLAY" ]
-image/*; /usr/bin/asciiview %s; test=[ -z "$DISPLAY" ]
-image/*; /usr/bin/cacaview %s; test=[ -z "$DISPLAY" ]
+image/*; /usr/bin/asciiview %s; test=[ -z "$DISPLAY" ]; needsterminal
+image/*; /usr/bin/cacaview %s; test=[ -z "$DISPLAY" ]; needsterminal
 image/*; /usr/bin/identify -verbose %s; copiousoutput
 
 audio/mpeg; /usr/bin/id3v2 -l %s; copiousoutput
@@ -31,12 +31,14 @@ application/x-dvi; /usr/bin/dvi2tty -w123 %s; copiousoutput
 text/html; /usr/bin/htmlview %s; copiousoutput; test=[ -x /usr/bin/htmlview ]
 text/html; /usr/bin/elinks %s; nametemplate=%s.html; test=[ -z "$DISPLAY" ]
 text/html; /usr/bin/xterm -name xterm-elinks -e /usr/bin/elinks %s & /bin/sleep 1; nametemplate=%s.html; test=[ -n "$DISPLAY" ]
-text/html; /usr/bin/elinks -dump %s; copiousoutput
+text/html; /usr/bin/elinks -dump -eval 'set document.codepage.assume = "%{charset}"' %s; copiousoutput
 
 #text/x-patch; /usr/bin/colordiff.pl < %s | less -r
 
 application/x-shockwave-flash; /usr/bin/swfplayer %s & sleep 2; test=[ -n "$DISPLAY" ]
 
+application/rtf; /usr/bin/unrtf --nopict --text --quiet %s; copiousoutput
+
 application/vnd.oasis.opendocument.presentation; odt2txt %s; copiousoutput; test=[ -z "$DISPLAY" ]
 application/vnd.oasis.opendocument.spreadsheet; odt2txt %s; copiousoutput; test=[ -z "$DISPLAY" ]
 application/vnd.oasis.opendocument.text; odt2txt %s; copiousoutput; test=[ -z "$DISPLAY" ]
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mailcap.git/commitdiff/4623e8a902e23dfa89937316d87af07d4b6c6ccf



More information about the pld-cvs-commit mailing list