diff --git a/src/filters/rclmedia b/src/filters/rclmedia new file mode 100755 index 00000000..7b11259b --- /dev/null +++ b/src/filters/rclmedia @@ -0,0 +1,72 @@ +#!/bin/sh +# @(#$Id: rclmedia,v 1.1 2006-03-28 09:38:12 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 +#================================================================ +# set variables +LANG=C ; export LANG +LC_ALL=C ; export LC_ALL +progname="rclsoff" + +# show help message +if test $# -ne 1 -o "$1" = "--help" +then + printf 'Process a media file for recoll indexation.\n' + printf 'Usage: %s [infile]\n' "$progname" + exit 1 +fi + +infile="$1" + +iscmd() +{ + cmd=$1 + case $cmd in + */*) + if test -x $cmd ; then return 0; else return 1; fi ;; + *) + oldifs=$IFS; IFS=":"; set -- $PATH; IFS=$oldifs + for d in $*;do test -x $d/$cmd && return 0;done + return 1 ;; + esac +} +checkcmds() +{ + cmdsok=0 + for cmd in $*;do + if iscmd $cmd + then + cmdsok=1 + else + cmdsok=0 + fi + done +} + +# check the input file existence +if test ! -f "$infile" +then + printf '%s: %s: no such file\n' "$progname" "$infile" + exit 1 +fi +checkcmds id3info + +# output the result +echo '' +#echo '' "$title" '' +echo '' +echo '' +echo '
'
+if test X$cmdsok = X1 ; then
+   id3info $infile | \
+   sed -e 's/'
+echo ''
+
+# exit normally
+exit 0
diff --git a/src/qtgui/mtpics/sownd.png b/src/qtgui/mtpics/sownd.png
new file mode 100755
index 00000000..5748f061
Binary files /dev/null and b/src/qtgui/mtpics/sownd.png differ
diff --git a/src/sampleconf/mimeconf b/src/sampleconf/mimeconf
index 814deab3..a1214598 100644
--- a/src/sampleconf/mimeconf
+++ b/src/sampleconf/mimeconf
@@ -1,4 +1,4 @@
-# @(#$Id: mimeconf,v 1.13 2006-02-03 10:53:35 dockes Exp $  (C) 2004 J.F.Dockes
+# @(#$Id: mimeconf,v 1.14 2006-03-28 09:38:12 dockes Exp $  (C) 2004 J.F.Dockes
 
 # Recoll : associations of mime types to processing filters.
 # There are different sections for decompression, 'interning' for indexing
@@ -42,6 +42,8 @@ application/x-dvi = exec rcldvi
 
 image/vnd.djvu = exec rcldjvu
 
+audio/mpeg = exec rclmedia
+
 message/rfc822 = internal
 
 text/html  = internal 
@@ -72,6 +74,8 @@ application/vnd.sun.xml.writer.template = openoffice %f
 image/vnd.djvu = djview %f
 application/x-dvi = xdvi %f
 
+audio/mpeg = xmms %f
+
 # Icons to be used in the result list.
 [icons]
 application/msword = wordprocessing
@@ -86,6 +90,7 @@ application/vnd.sun.xml.impress.template = presentation
 application/vnd.sun.xml.writer = wordprocessing
 application/vnd.sun.xml.writer.global = wordprocessing
 application/vnd.sun.xml.writer.template = wordprocessing
+audio/mpeg = sownd
 text/html = html
 text/plain = txt
 text/x-mail = message
diff --git a/src/sampleconf/mimemap b/src/sampleconf/mimemap
index ee6a655f..4a4230c0 100644
--- a/src/sampleconf/mimemap
+++ b/src/sampleconf/mimemap
@@ -1,4 +1,4 @@
-# @(#$Id: mimemap,v 1.12 2006-03-20 09:54:09 dockes Exp $  (C) 2004 J.F.Dockes
+# @(#$Id: mimemap,v 1.13 2006-03-28 09:38:13 dockes Exp $  (C) 2004 J.F.Dockes
 
 # Recoll: associations of file name extensions to mime types
 .txt = text/plain
@@ -49,6 +49,7 @@
 .wpd = application/vnd.wordperfect
 .rtf = text/rtf
 
+.mp3 = audio/mpeg
 
 # A list of stuff that we don't want to touch at all (for now). Having the
 # suffixes listed in there speeds up things quite a lot by avoiding