added support for indexing TeX text

This commit is contained in:
dockes 2007-11-09 11:55:50 +00:00
parent 379e0ea375
commit 3128cb3bd9
3 changed files with 18 additions and 15 deletions

View File

@ -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 '<html><head>'
@ -89,9 +86,10 @@ echo '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">'
echo '</head><body>'
echo '<pre>'
id3info "$infile" | \
sed -e 's/</&lt;/g' -e 's/&/&amp;/g' -e 's/===.*://' | \
grep -v 'Tag information for'
untex -giso -a "$infile" | \
iconv -f iso-8859-1 -t utf-8 | \
sed \
-e 's/</&lt;/g' -e 's/&/&amp;/g'
echo '</pre>'
echo '</body></html>'

View File

@ -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 \

View File

@ -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 ~ #