diff --git a/src/filters/rclmedia b/src/filters/rcltex similarity index 81% rename from src/filters/rclmedia rename to src/filters/rcltex index 83644a09..39be5c04 100755 --- a/src/filters/rclmedia +++ b/src/filters/rcltex @@ -1,17 +1,14 @@ #!/bin/sh -# @(#$Id: rclmedia,v 1.4 2007-06-08 13:51:09 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: rcltex,v 1.1 2007-11-09 11:55:50 dockes Exp $ (C) 2004 J.F.Dockes #================================================================ -# rclmedia -# Handle media files for recoll. This currently returns an empty -# document to let the indexer process the file names as terms, but -# we might want to extract mp3 tags one day +# rcltex +# Translate TeX files for recoll. Use untex to translate to html #================================================================ # set variables LANG=C ; export LANG LC_ALL=C ; export LC_ALL -progname="rclmedia" -filetype=media - +progname="rcltex" +filetype=TeX #RECFILTCOMMONCODE @@ -80,7 +77,7 @@ umask 77 # !! Leave the following line unmodified ! #ENDRECFILTCOMMONCODE -checkcmds id3info +checkcmds untex iconv # output the result echo '
' @@ -89,9 +86,10 @@ echo '' echo '' echo '' -id3info "$infile" | \ - sed -e 's/</g' -e 's/&/&/g' -e 's/===.*://' | \ - grep -v 'Tag information for' +untex -giso -a "$infile" | \ + iconv -f iso-8859-1 -t utf-8 | \ + sed \ + -e 's/</g' -e 's/&/&/g' echo '' echo '' diff --git a/src/sampleconf/mimeconf b/src/sampleconf/mimeconf index 79b2c2d1..bf079c7b 100644 --- a/src/sampleconf/mimeconf +++ b/src/sampleconf/mimeconf @@ -1,4 +1,4 @@ -# @(#$Id: mimeconf,v 1.35 2007-10-06 07:44:03 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: mimeconf,v 1.36 2007-11-09 11:55:50 dockes Exp $ (C) 2004 J.F.Dockes # Recoll : associations of mime types to processing filters. # There are different sections for decompression, 'interning' for indexing @@ -49,6 +49,7 @@ application/x-flac = exec rclflac application/x-kword = exec rclkwd application/x-lyx = exec rcllyx application/x-scribus = exec rclscribus +application/x-tex = exec rcltex audio/mpeg = exec rclid3 image/gif = exec rclimg image/jpeg = exec rclimg @@ -88,6 +89,8 @@ application/x-flac = sownd application/x-fsdirectory = folder application/x-kword = wordprocessing application/x-lyx = wordprocessing +application/x-scribus = document +application/x-tex = wordprocessing audio/mpeg = sownd image/gif = image image/jpeg = image @@ -116,6 +119,7 @@ text = \ application/x-kword \ application/x-lyx \ application/x-scribus \ + application/x-tex \ image/vnd.djvu \ text/html \ text/plain \ diff --git a/src/sampleconf/mimemap b/src/sampleconf/mimemap index d15b8ac3..3fa87c89 100644 --- a/src/sampleconf/mimemap +++ b/src/sampleconf/mimemap @@ -1,4 +1,4 @@ -# @(#$Id: mimemap,v 1.27 2007-10-02 14:22:38 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: mimemap,v 1.28 2007-11-09 11:55:50 dockes Exp $ (C) 2004 J.F.Dockes # Recoll: associations of file name extensions to mime types .txt = text/plain @@ -25,6 +25,7 @@ .eps = application/postscript .ai = application/postscript +.tex = application/x-tex .dvi = application/x-dvi .djvu = image/vnd.djvu @@ -84,7 +85,7 @@ recoll_noindex = .tar.gz .tgz .tar.bz2 .tbz .log.gz .md5 .map \ .m4 .tcl .js .sh .pl .awk \ .o .lib .dll .a \ .dat .bak .rdf .log .db .ini .msf .pid \ - .gnm .gnumeric .tex \ + .gnm .gnumeric \ .gif .bmp .xpm \ ,v ~ #