added support for indexing TeX text
This commit is contained in:
parent
379e0ea375
commit
3128cb3bd9
@ -1,17 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# rcltex
|
||||||
# Handle media files for recoll. This currently returns an empty
|
# Translate TeX files for recoll. Use untex to translate to html
|
||||||
# document to let the indexer process the file names as terms, but
|
|
||||||
# we might want to extract mp3 tags one day
|
|
||||||
#================================================================
|
#================================================================
|
||||||
# set variables
|
# set variables
|
||||||
LANG=C ; export LANG
|
LANG=C ; export LANG
|
||||||
LC_ALL=C ; export LC_ALL
|
LC_ALL=C ; export LC_ALL
|
||||||
progname="rclmedia"
|
progname="rcltex"
|
||||||
filetype=media
|
filetype=TeX
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#RECFILTCOMMONCODE
|
#RECFILTCOMMONCODE
|
||||||
@ -80,7 +77,7 @@ umask 77
|
|||||||
# !! Leave the following line unmodified !
|
# !! Leave the following line unmodified !
|
||||||
#ENDRECFILTCOMMONCODE
|
#ENDRECFILTCOMMONCODE
|
||||||
|
|
||||||
checkcmds id3info
|
checkcmds untex iconv
|
||||||
|
|
||||||
# output the result
|
# output the result
|
||||||
echo '<html><head>'
|
echo '<html><head>'
|
||||||
@ -89,9 +86,10 @@ echo '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">'
|
|||||||
echo '</head><body>'
|
echo '</head><body>'
|
||||||
echo '<pre>'
|
echo '<pre>'
|
||||||
|
|
||||||
id3info "$infile" | \
|
untex -giso -a "$infile" | \
|
||||||
sed -e 's/</</g' -e 's/&/&/g' -e 's/===.*://' | \
|
iconv -f iso-8859-1 -t utf-8 | \
|
||||||
grep -v 'Tag information for'
|
sed \
|
||||||
|
-e 's/</</g' -e 's/&/&/g'
|
||||||
|
|
||||||
echo '</pre>'
|
echo '</pre>'
|
||||||
echo '</body></html>'
|
echo '</body></html>'
|
||||||
@ -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.
|
# Recoll : associations of mime types to processing filters.
|
||||||
# There are different sections for decompression, 'interning' for indexing
|
# 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-kword = exec rclkwd
|
||||||
application/x-lyx = exec rcllyx
|
application/x-lyx = exec rcllyx
|
||||||
application/x-scribus = exec rclscribus
|
application/x-scribus = exec rclscribus
|
||||||
|
application/x-tex = exec rcltex
|
||||||
audio/mpeg = exec rclid3
|
audio/mpeg = exec rclid3
|
||||||
image/gif = exec rclimg
|
image/gif = exec rclimg
|
||||||
image/jpeg = exec rclimg
|
image/jpeg = exec rclimg
|
||||||
@ -88,6 +89,8 @@ application/x-flac = sownd
|
|||||||
application/x-fsdirectory = folder
|
application/x-fsdirectory = folder
|
||||||
application/x-kword = wordprocessing
|
application/x-kword = wordprocessing
|
||||||
application/x-lyx = wordprocessing
|
application/x-lyx = wordprocessing
|
||||||
|
application/x-scribus = document
|
||||||
|
application/x-tex = wordprocessing
|
||||||
audio/mpeg = sownd
|
audio/mpeg = sownd
|
||||||
image/gif = image
|
image/gif = image
|
||||||
image/jpeg = image
|
image/jpeg = image
|
||||||
@ -116,6 +119,7 @@ text = \
|
|||||||
application/x-kword \
|
application/x-kword \
|
||||||
application/x-lyx \
|
application/x-lyx \
|
||||||
application/x-scribus \
|
application/x-scribus \
|
||||||
|
application/x-tex \
|
||||||
image/vnd.djvu \
|
image/vnd.djvu \
|
||||||
text/html \
|
text/html \
|
||||||
text/plain \
|
text/plain \
|
||||||
|
|||||||
@ -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
|
# Recoll: associations of file name extensions to mime types
|
||||||
|
|
||||||
.txt = text/plain
|
.txt = text/plain
|
||||||
@ -25,6 +25,7 @@
|
|||||||
.eps = application/postscript
|
.eps = application/postscript
|
||||||
.ai = application/postscript
|
.ai = application/postscript
|
||||||
|
|
||||||
|
.tex = application/x-tex
|
||||||
.dvi = application/x-dvi
|
.dvi = application/x-dvi
|
||||||
|
|
||||||
.djvu = image/vnd.djvu
|
.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 \
|
.m4 .tcl .js .sh .pl .awk \
|
||||||
.o .lib .dll .a \
|
.o .lib .dll .a \
|
||||||
.dat .bak .rdf .log .db .ini .msf .pid \
|
.dat .bak .rdf .log .db .ini .msf .pid \
|
||||||
.gnm .gnumeric .tex \
|
.gnm .gnumeric \
|
||||||
.gif .bmp .xpm \
|
.gif .bmp .xpm \
|
||||||
,v ~ #
|
,v ~ #
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user