Commit 2c4debdd 2c4debdd172756b0814da8665cdf1f4155564485 by Sergey Poznyakoff

(mimeview): Documented the program

1 parent e66dab68
...@@ -3300,7 +3300,90 @@ To summarize this, here is a working @file{mailutils.rc} entry for ...@@ -3300,7 +3300,90 @@ To summarize this, here is a working @file{mailutils.rc} entry for
3300 @section mimeview 3300 @section mimeview
3301 @pindex mimeview 3301 @pindex mimeview
3302 3302
3303 FIXME 3303 For each file given in its command line, @command{mimeview} attempts
3304 to autodetect its type and invoke an appropriate file viewer.
3305
3306 To detect the file type, @command{mimeview} uses @file{mime.types}
3307 file. This file is a part of Common UNIX Printing System, see
3308 @code{man mime.types} for the description of its syntax. [FIXME:
3309 provide an xref to CUPS]. By default @command{mimeview} searches for
3310 @file{mime.types} in @file{$prefix/etc/cups/}@footnote{The exact
3311 location is determined at configuration time by setting environment
3312 variable @var{DEFAULT_CUPS_CONFDIR}. On most sites running
3313
3314 @smallexample
3315 ./configure DEFAULT_CUPS_CONFDIR=/etc/cups
3316 @end smallexample
3317
3318 @noindent
3319 should be recommended.}, however its exact location can be specified
3320 at runtime as well (see @option{--mimetypes} below).
3321
3322 Once file MIME type is successfully determined, @command{mimeview}
3323 consults @file{mailcap} files in order to determine how to display
3324 the file. It does so essentially in the same manner as
3325 @command{metamail} utility, i.e., it scans all files specified
3326 in @code{METAMAIL} environment variable until it finds an entry
3327 describing the desired file format or until the list of files is
3328 exhausted. If @code{METAMAIL} variable is not set, @command{mimeview}
3329 uses the following default path instead:
3330
3331 @smallexample
3332 $HOME/.mailcap:/usr/local/etc/mailcap:\
3333 /usr/etc/mailcap:/etc/mailcap:\
3334 /etc/mail/mailcap:/usr/public/lib/mailcap
3335 @end smallexample
3336
3337 The following table summarizes options specific for @command{mimeview}:
3338
3339 @table @option
3340 @item -d[@var{flags}]
3341 @itemx --debug[=@var{flags}]
3342 Enables debugging output. @var{Flags} is a sequence of characters
3343 specifying the desired debugging level. Following characters are
3344 meaningful in @var{flags}:
3345
3346 @table @asis
3347 @item g
3348 Enables debugging of @file{mime.types} parser
3349
3350 @item l
3351 Enables debugging of @file{mime.types} lexical analyzer (warning:
3352 produces @emph{very} copious output)
3353
3354 @item 1
3355 Prints basic information about actions to be executed and reports
3356 about exit status of executed commands.
3357
3358 @item 2
3359 Additionally displays each file name along with its MIME type
3360
3361 @item 3
3362 Additionally traces the process of looking up the matching entry
3363 in @code{mailcap} files.
3364
3365 @item digits from 4 to 9
3366 The same as 3, currently.
3367 @end table
3368
3369 If @var{flags} are not given, the default @samp{9} is assumed.
3370
3371 @item --metamail[=@var{file}]
3372 Run @command{metamail} to display files, instead of using the internal
3373 mechanisms. If @var{file} is specified, it is taken as
3374 @command{metamail} command line.
3375
3376 @item -n
3377 @itemx --dry-run
3378 Do not do anything, just print what whould be done. Implies
3379 @option{--debug=1}, unless the debugging level is set up explicitely.
3380
3381 @item -t @var{file}
3382 @itemx --mimetypes @var{file}
3383 Use @var{file} as @file{mime.types} file. If @var{file} is a
3384 directory, use @file{@var{file}/mime.types}
3385 @end table
3386
3304 3387
3305 @page 3388 @page
3306 @node pop3d 3389 @node pop3d
......