Hi everyone,
apparently with 0.6.90, the filters were changed from having two
arguments (input file $1, output file $2) to having only one argument
(input file $1) and reading the output from stdout. I noticed that
while porting a debian patch for application/msword_filter to 0.6.90
(see attached patch)
Apparently it was forgotten, to cat $tmptxtfile to stdout.
What I got instead was this
Could not find required program 'elinks' or 'links'
Using lynx. Ouput will be pretty ugly.
Apparently, wvText always prints this message to stdout, even if it
successfully transforms a doc document to txt.
I'm not sure if other tools behave like that, but there is a risk,
that we get noise in the search results.
We either change back to the two argument style, or to be safe update
all invocations of external tools in filter scrips to use
2 &> 1 /dev/null.
Cheers,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/filters/application/msword_filter b/filters/application/msword_filter
index ef9bb4c..95d73da 100755
--- a/filters/application/msword_filter
+++ b/filters/application/msword_filter
@@ -1,17 +1,14 @@
#!/bin/sh
-tmpdir=${TMPDIR-/tmp}
-tmpdir="$tmpdir"/tmpdir.$$
+tmpdir=`mktemp -td tracker.msword_filter.XXXXXXXXXX` || exit 1
-tmptxtfile=`mktemp`
+tmptxtfile=`mktemp` || exit 1
-(umask 077 && mkdir "$tmpdir") || exit 1
-
-tmpfile="$tmpdir"/tmpfile.$$
+tmpfile="$tmpdir"/tmpfile
cp "$1" "$tmpfile"
-# Change the working directory to $tmpdir which we can safely deleter later.
+# Change the working directory to $tmpdir which we can safely delete later.
# Some distributions ship a version of wvText which extracts the image files
# from the word document and places them in the current working directory.
@@ -19,6 +16,8 @@ cd "$tmpdir"
nice -n19 wvText "$tmpfile" "$tmptxtfile"
+cat "$tmptxtfile"
+
rm -rf "$tmpdir"
rm "$tmptxtfile"
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list