~ubuntu-branches/ubuntu/hoary/mime-support/hoary

« back to all changes in this revision

Viewing changes to update-mime.man

  • Committer: Bazaar Package Importer
  • Author(s): Brian White
  • Date: 2004-03-03 07:47:41 UTC
  • Revision ID: james.westby@ubuntu.com-20040303074741-1b96w5g6vqqafdxs
Tags: 3.26-1
added more mime types (closes: #235663, #225222)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" Hey, Emacs!  This is an -*- nroff -*- source file.
 
2
.\" Update-mime and this manpage were written by Brian White and
 
3
.\" have been placed in the public domain (the only true "free").
 
4
.\"
 
5
.TH UPDATE-MIME 8 "16th Aug 1998" "Debian Project" "Update MIME Programs"
 
6
.SH NAME
 
7
update\-mime \- create or update MIME information
 
8
.SH SYNOPSIS
 
9
.B update\-mime
 
10
[no parameters]
 
11
.SH DESCRIPTION
 
12
.PP
 
13
.B update-mime
 
14
updates the
 
15
.B /etc/mailcap
 
16
file to reflect mime information changed by a Debian package during
 
17
installation or removal.
 
18
.SH OVERRIDING ORDER
 
19
The order of entries in the
 
20
.I /etc/mailcap
 
21
file can be altered by editing the
 
22
.I /etc/mailcap.order
 
23
file.  Please see the mailcap.order(5) man page for more information.
 
24
.SH CREATING ENTRIES
 
25
To create entries in the mailcap file, packages need to create a file
 
26
in the
 
27
.I /usr/lib/mime/packages
 
28
directory.  In this file goes the verbatim desired mailcap entries.
 
29
In addition to the standard mailcap options (described below) is a new
 
30
.I priority
 
31
option.  Specifying this will provide for simple ranking of programs
 
32
within a given mime type.  An animation viewer, for example, may be
 
33
able to display a static picture, but probably wouldn't be the best
 
34
choice and so would give an option like "priority=2".  Priorities
 
35
range from 0 to 9, with 0 being the lowest and 9 being the highest.
 
36
If the
 
37
.I priority
 
38
option is omitted, a value of 5 is used.
 
39
 
 
40
The following are standard options that can be specified in the
 
41
mailcap entry.  Options are separated by semicolons (;) but must all
 
42
be on the same line.  Each line should look like:
 
43
 
 
44
  mime/type; viewer; option; another=val; etc; priority=5
 
45
 
 
46
Mime types of the form "class/*" and even "*/*" are now acceptable
 
47
(they were previously disallowed).  When using "class/*", it is
 
48
probably a good idea to add a "priority=[1-4]" option so specific
 
49
rules using the default priority will get chosen first.  If using
 
50
"*/*", though, you probably want to add a "priority=0" option to make
 
51
that rule a "last resort".
 
52
.SS Commands
 
53
.TP
 
54
.BI view=<program-string>
 
55
Specifies the program to run to view a file of the given content-type.
 
56
Actually, the "view=" must be omitted and the viewer program must be
 
57
the second value on the line (after the mime type).
 
58
.B This option connot be omitted.
 
59
When writing an entry that has no viewer, use a value of
 
60
.I false
 
61
in this space.
 
62
.TP
 
63
.BI compose=<program-string>
 
64
The "compose" command may be used to specify a program that can be
 
65
used to compose a new body or body part in the given format.  Its
 
66
intended use is to support mail composing agents that support the
 
67
composition of multiple types of mail using external composing agents.
 
68
The result of the composing program may be data that is not yet
 
69
suitable for mail transport -- that is, a Content-Transfer-Encoding
 
70
may need to be applied to the data.
 
71
.TP
 
72
.BI composetyped=<program-string>
 
73
The "composetyped" command is similar to "compose", but is to be used
 
74
when the composing program needs to specify the Content-type header
 
75
field to be applied to the composed data.  The "compose" option is
 
76
simpler, and is preferred for use with existing (non-mail-oriented)
 
77
programs for composing data in a given format.  The "composetyped"
 
78
option is necessary when the Content-type information must include
 
79
auxiliary parameters, and the composition program must then know
 
80
enough about mail formats to produce output that includes the mail
 
81
type information.
 
82
.TP
 
83
.BI edit=<program-string>
 
84
The "edit" command may be used to specify a program that can be used
 
85
to edit a body or body part in the given format.  In many cases, it
 
86
may be identical in content to the "compose" command.
 
87
.TP
 
88
.BI print=<program-string>
 
89
The "print" command may be used to specify a program that can be used to
 
90
print a message or body part in the given format.
 
91
.SS Modifiers
 
92
These options are modifiers to all the commands specified on the
 
93
command line.
 
94
.TP
 
95
.BI test=<conditional>
 
96
The "test" option may be used to test some external condition (e.g.,
 
97
the machine architecture, or the window system in use) to determine
 
98
whether or not the mailcap line applies.  It specifies a program to be
 
99
run to test some condition.  If the test fails, a subsequent mailcap
 
100
entry will be sought.  Multiple test options are not permitted --
 
101
since a test can call a program, it can already be arbitrarily
 
102
complex.
 
103
 
 
104
.B Note:
 
105
When testing for X by looking at the
 
106
.I DISPLAY
 
107
environment variable, please use one of:
 
108
 
 
109
        test=test -z "$DISPLAY"     (no X)
 
110
  or    test=test -n "$DISPLAY"     (have X)
 
111
 
 
112
Many programs recognize these strings and optimize for them.
 
113
.TP
 
114
.BI needsterminal
 
115
The "needsterminal" option, if given, indicates that the commands must
 
116
be run on an interactive terminal.  This is needed to inform window-
 
117
oriented user agents that an interactive terminal is needed.  (The
 
118
decision is not left exclusively to the command because in some
 
119
circumstances it may not be possible for such programs to tell whether
 
120
or not they are on interactive terminals.)  The needsterminal command
 
121
applies to the view, compose and edit commands, if they exist.  Note
 
122
that this is NOT a test -- it is a requirement for the environment in
 
123
which the program will be executed, and should typically cause the
 
124
creation of a terminal window when not executed on either a real
 
125
terminal or a terminal window.
 
126
.TP
 
127
.BI copiousoutput
 
128
The "copiousoutput" option, if given, indicates that the output from the
 
129
view-command will be an extended stream of output and is to be
 
130
interpreted as advice to the UA (User Agent mail-reading program) that
 
131
the output should be either paged or made scrollable.  Note that it is
 
132
probably a mistake if needsterminal and copiousoutput are both
 
133
specified.
 
134
.SS Content-Type Info
 
135
These options provide additional information about the given
 
136
content-type.
 
137
.TP
 
138
.BI description=<string>
 
139
The "description" option simply provides a textual description that
 
140
describes the type of data, to be used optionally by mail readers that
 
141
wish to describe the data before offering to display it.
 
142
.TP
 
143
.BI textualnewlines
 
144
The "textualnewlines" option, if given, indicates that this type
 
145
of data is line-oriented and that, if encoded in a binary format, all
 
146
newlines should be converted to canonical form (CRLF) before encoding,
 
147
and will be in that form after decoding.  In general, this is needed
 
148
only if there is line-oriented data of some type other than text/* or
 
149
non-line-oriented data that is a subtype of text.
 
150
.TP
 
151
.BI x11-bitmap=<pathname>
 
152
The "x11-bitmap" option names a file, in X11 bitmap (xbm) format,
 
153
which points to an appropriate icon to be used to visually denote the
 
154
presence of this kind of data.
 
155
.TP
 
156
.BI nametemplate=<string>
 
157
The "nametemplate" option gives a file name format, in which %s will be
 
158
replaced by a short unique string to give the name of the temporary
 
159
file to be passed to the viewing command.  This is only expected to be
 
160
relevant in environments where filename extensions are meaningful,
 
161
e.g., one could specify that a GIF file being passed to a gif viewer
 
162
should have a name ending in ".gif" by using "nametemplate=%s.gif".
 
163
.SH DEPENDENCIES
 
164
Packages that wish to provide MIME access to themselves should
 
165
.B not
 
166
depend on, recommend, or suggest
 
167
.B mime-support.
 
168
Instead, they should just put something like the following in the
 
169
.I postinst
 
170
and
 
171
.I postrm
 
172
scripts.
 
173
 
 
174
.ft CW
 
175
.nf
 
176
.ne 4
 
177
\&    if [ -x /usr/sbin/update-mime ]; then
 
178
\&        update-mime
 
179
\&    fi
 
180
.ft R
 
181
.SH "SEE ALSO"
 
182
.BR mailcap.order "(5), RFC-2046, RFC-1524"
 
183
.SH AUTHOR
 
184
.B update\-mime
 
185
was written by Brian White <bcwhite@pobox.com>
 
186
.SH COPYRIGHT
 
187
.B update\-mime
 
188
is in the public domain (the only true "free").