filter for indexing mp3 tags
This commit is contained in:
parent
5b6a148073
commit
abf02bd55c
72
src/filters/rclmedia
Executable file
72
src/filters/rclmedia
Executable file
@ -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 '<html><head>'
|
||||||
|
#echo '<title>' "$title" '</title>'
|
||||||
|
echo '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">'
|
||||||
|
echo '</head><body>'
|
||||||
|
echo '<pre>'
|
||||||
|
if test X$cmdsok = X1 ; then
|
||||||
|
id3info $infile | \
|
||||||
|
sed -e 's/</</g' -e 's/&/&/g' -e 's/===.*://' | \
|
||||||
|
grep -v 'Tag information for'
|
||||||
|
fi
|
||||||
|
echo '</pre>'
|
||||||
|
echo '</body></html>'
|
||||||
|
|
||||||
|
# exit normally
|
||||||
|
exit 0
|
||||||
BIN
src/qtgui/mtpics/sownd.png
Executable file
BIN
src/qtgui/mtpics/sownd.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
@ -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.
|
# 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
|
||||||
@ -42,6 +42,8 @@ application/x-dvi = exec rcldvi
|
|||||||
|
|
||||||
image/vnd.djvu = exec rcldjvu
|
image/vnd.djvu = exec rcldjvu
|
||||||
|
|
||||||
|
audio/mpeg = exec rclmedia
|
||||||
|
|
||||||
message/rfc822 = internal
|
message/rfc822 = internal
|
||||||
|
|
||||||
text/html = internal
|
text/html = internal
|
||||||
@ -72,6 +74,8 @@ application/vnd.sun.xml.writer.template = openoffice %f
|
|||||||
image/vnd.djvu = djview %f
|
image/vnd.djvu = djview %f
|
||||||
application/x-dvi = xdvi %f
|
application/x-dvi = xdvi %f
|
||||||
|
|
||||||
|
audio/mpeg = xmms %f
|
||||||
|
|
||||||
# Icons to be used in the result list.
|
# Icons to be used in the result list.
|
||||||
[icons]
|
[icons]
|
||||||
application/msword = wordprocessing
|
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 = wordprocessing
|
||||||
application/vnd.sun.xml.writer.global = wordprocessing
|
application/vnd.sun.xml.writer.global = wordprocessing
|
||||||
application/vnd.sun.xml.writer.template = wordprocessing
|
application/vnd.sun.xml.writer.template = wordprocessing
|
||||||
|
audio/mpeg = sownd
|
||||||
text/html = html
|
text/html = html
|
||||||
text/plain = txt
|
text/plain = txt
|
||||||
text/x-mail = message
|
text/x-mail = message
|
||||||
|
|||||||
@ -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
|
# Recoll: associations of file name extensions to mime types
|
||||||
.txt = text/plain
|
.txt = text/plain
|
||||||
@ -49,6 +49,7 @@
|
|||||||
.wpd = application/vnd.wordperfect
|
.wpd = application/vnd.wordperfect
|
||||||
.rtf = text/rtf
|
.rtf = text/rtf
|
||||||
|
|
||||||
|
.mp3 = audio/mpeg
|
||||||
|
|
||||||
# A list of stuff that we don't want to touch at all (for now). Having the
|
# 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
|
# suffixes listed in there speeds up things quite a lot by avoiding
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user