~ubuntu-branches/ubuntu/jaunty/beagle/jaunty-security

« back to all changes in this revision

Viewing changes to Filters/external-filters.xml.sample

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-05-04 00:31:32 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20080504003132-2tkm5o8moo5952ri
Tags: 0.3.7-2ubuntu1
 * Merge from Debian unstable. (LP: #225746) Remaining Ubuntu changes:
  - debian/control:
    + Rename ice{weasel,dove}-beagle to {mozilla,thunderbird}-beagle and
      and update the dependencies accordingly.
    + Change Maintainer to Ubuntu Mono Team.
  - debian/rules:
    + Install the mozilla-beagle and thunderbird-beagle extensions.
  - ice{dove,weasel}.dirs:
    + Renamed to {mozilla,thunderbird}-beagle.dirs.
    + Fixed paths to point to usr/lib/{firefox,thunderbird}

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8"?>
2
 
<!--
3
 
 
4
 
This file allows you to use external programs to extract text from
5
 
more structured file formats.  For example, you could use pdftotext to
6
 
extract data from PDF files.  (Beagle includes a PDF filter, so this
7
 
isn't necessary, but you get the idea.)
8
 
 
9
 
There are some limitations to this system: the external programs must
10
 
take a filename on the command line and must output text to standard
11
 
out.  You cannot extract any metadata using this system.  Using our
12
 
PDF example, you could extract all of the text, but you couldn't
13
 
extract the author of the document as a special field.  For that, you
14
 
will have to write a more traditional filter.
15
 
 
16
 
Now, an example entry:
17
 
 
18
 
<filter>
19
 
  <mimetype>text/plain</mimetype>
20
 
  <extension>.txt</extension>
21
 
  <command>cat</command>
22
 
  <arguments>%s</arguments>
23
 
</filter>
24
 
 
25
 
mimetype - The mime type handled by this filter.  You may have 0 or
26
 
more of these for any filter.
27
 
 
28
 
extension - The file extension handled by this filter.  You may have 0
29
 
or more of these for any filter.
30
 
 
31
 
command - The filename of the command to run.  Do not put any command
32
 
line arguments in this.  This item is required.
33
 
 
34
 
arguments - Any arguments to pass into the given command.  The special
35
 
token "%s" means the filename to be passed in.  This item is required.
36
 
 
37
 
Here are some sample filters from the Wiki, simply move them into the 
38
 
'external-filters' tags to activate!
39
 
 
40
 
Simple TeX filter
41
 
 
42
 
    * Author: Stephan Hegel
43
 
    * Description: untex to remove LaTeX commands from input
44
 
    * Dependencies: untex 
45
 
<filter>
46
 
  <mimetype>text/x-tex</mimetype>
47
 
  <extension>.tex</extension>
48
 
  <command>untex</command>
49
 
  <arguments>-gascii %s</arguments>
50
 
</filter> 
51
 
 
52
 
Simple DVI filter
53
 
 
54
 
    * Author: Dav
55
 
    * Description: dvi to text using the "-q" option of dvi2tty
56
 
    * Dependencies: dvi2tty 
57
 
<filter>
58
 
  <mimetype>application/x-dvi</mimetype>
59
 
  <extension>.dvi</extension>
60
 
  <command>dvi2tty</command>
61
 
  <arguments>-q %s</arguments>
62
 
</filter>
63
 
 
64
 
Simple Postscript filter
65
 
 
66
 
    * Author: Ben Lee
67
 
    * Description: ps2ascii to extract text from postscript
68
 
    * Dependencies: ps2ascii 
69
 
<filter>
70
 
  <mimetype>application/postscript</mimetype>
71
 
  <extension>.ps</extension>
72
 
  <extension>.ai</extension>
73
 
  <extension>.eps</extension>
74
 
  <command>ps2ascii</command>
75
 
  <arguments>%s</arguments>
76
 
</filter>
77
 
 
78
 
Simple Djvu filter 
79
 
    * Author: Ben Lee
80
 
    * Description: djvutxt to extract text from Djvu files
81
 
    * Dependencies: djvutxt 
82
 
<filter>
83
 
  <mimetype>image/vnd.djvu</mimetype>
84
 
  <extension>.djvu</extension>
85
 
  <extension>.djv</extension>
86
 
  <command>djvutxt</command>
87
 
  <arguments>%s</arguments>
88
 
</filter>
89
 
 
90
 
-->
91
 
 
92
 
<external-filters>
93
 
 
94
 
</external-filters>