Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 2f6684ace8d80f7b24aa34a05a2009fe > files > 2

pinot-0.94-3mdv2010.0.i586.rpm

<?xml version="1.0" encoding="utf-8"?>
<!--

This file allows you to use external programs to extract text from
more structured file formats. For example, you could use pdftotext to
extract data from PDF files.
The format is very close to that used by Beagle, with a few modifications.

There are some limitations to this system: the external programs must
take a filename on the command line and must output text to standard
out. You cannot extract any metadata using this system. Using our
PDF example, you could extract all of the text, but you couldn't
extract the author of the document as a special field. For that, you
will have to write a more traditional filter.

Now, an example entry:

<filter>
  <mimetype>application/msword</mimetype>
  <charset>utf-8</charset>
  <command>antiword</command>
  <arguments>-mUTF-8.txt %s</arguments>
  <output>text/plain</output>
</filter>

mimetype - The mime type handled by this filter. This item is required.

charset - The charset of the output generated by this filter. This item
is optional , and defaults to whatever the locale charset is.

command - The filename of the command to run. Do not put any command
line arguments in this. This item is required.

arguments - Any arguments to pass into the given command. The special
token "%s" means the filename to be passed in. This item is required.

output - The mime type of the output generated by the command. For
the right thing to happen, this should be restricted to basic types
text/plain, text/html and text/xml or application/xml. The special
value SCAN will cause the output to be scanned for its mime type.
This item is optional, and defaults to text/plain.

-->

<external-filters>
<filter>
  <mimetype>application/vnd.sun.xml.writer</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.writer.template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.calc</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.calc.template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.draw</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.draw.template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.impress</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.impress.template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.writer.global</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.sun.xml.math</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.chart</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.database</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.formula</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.graphics</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.graphics-template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.presentation</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.presentation-template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.spreadsheet</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.spreadsheet-template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.text</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.text-master</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.text-template</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.oasis.opendocument.text-web</mimetype>
  <command>unzip</command>
  <arguments>-p %s content.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mimetype>
  <command>unzip</command>
  <arguments>-p %s word/document.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.openxmlformats-officedocument.presentationml.presentation</mimetype>
  <command>unzip</command>
  <arguments>-p %s ppt/slides/slide*.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mimetype>
  <command>unzip</command>
  <arguments>-p %s xl/sharedStrings.xml</arguments>
  <output>application/xml</output>
</filter>
<filter>
  <mimetype>application/pdf</mimetype>
  <charset>utf-8</charset>
  <command>pdftotext</command>
  <arguments>-enc UTF-8 -raw %s -</arguments>
  <output>text/plain</output>
</filter>
<filter>
  <mimetype>application/rtf</mimetype>
  <command>unrtf</command>
  <arguments>-n -t html %s</arguments>
  <output>text/html</output>
</filter>
<filter>
  <mimetype>text/rtf</mimetype>
  <command>unrtf</command>
  <arguments>-n -t html %s</arguments>
  <output>text/html</output>
</filter>
<filter>
  <mimetype>application/msword</mimetype>
  <charset>utf-8</charset>
  <command>antiword</command>
  <arguments>-mUTF-8.txt %s</arguments>
</filter>
<filter>
  <mimetype>application/vnd.ms-word</mimetype>
  <charset>utf-8</charset>
  <command>antiword</command>
  <arguments>-mUTF-8.txt %s</arguments>
</filter>
<filter>
  <mimetype>application/vnd.ms-excel</mimetype>
  <charset>utf-8</charset>
  <command>xls2csv</command>
  <arguments>-q0 -dutf-8 %s</arguments>
</filter>
<filter>
  <mimetype>application/vnd.ms-powerpoint</mimetype>
  <charset>utf-8</charset>
  <command>catppt</command>
  <arguments>-dutf-8 %s</arguments>
</filter>
<filter>
  <mimetype>application/x-dvi</mimetype>
  <command>catdvi</command>
  <arguments>-e2 -s %s</arguments>
</filter>
<filter>
  <mimetype>image/vnd.djvu</mimetype>
  <command>djvutxt</command>
  <arguments>%s</arguments>
</filter>
<filter>
  <mimetype>application/x-rpm</mimetype>
  <command><![CDATA[OUT=`file -bi %s` && [ "$OUT" == "application/x-rpm" ] && rpm]]></command>
  <arguments>-qlp %s</arguments>
</filter>
<filter>
  <mimetype>application/x-compress</mimetype>
  <command>uncompress</command>
  <arguments>-c %s</arguments>
  <output>SCAN</output>
</filter>
<filter>
  <mimetype>application/x-gzip</mimetype>
  <command>gunzip</command>
  <arguments>-c %s</arguments>
  <output>SCAN</output>
</filter>
<filter>
  <mimetype>application/x-bzip</mimetype>
  <command>bunzip2</command>
  <arguments>-c %s</arguments>
  <output>SCAN</output>
</filter>
</external-filters>