Chimera Convert Configuration
Chimera can be configured to use other programs to convert data from
a form that chimera cannot handle to a form that it can handle.
For example, chimera can use a convert program to turn JPEG inline
images to GIF inline images.
The file that describes the convert configuration is called the
convert file. Each convert specification is described by
a line in the protocol file. Blank lines or lines beginning with
'#' are ignored.
Each protocol entry is made up of the following white space (excluding
carriage returns and line feeds) delimited fields:
use in-content-type out-content-type command
Use
The use field indicates the circumstances for which the conversion
will be used. Following is a list of possible use values:
- inline - conversion for inline images
- * - match all uses
- ftp - FTP conversions
- http - HTTP conversions
- gopher - Gopher conversions
- file - File conversions
- x-compress - MIME "x-compress" encoding
In-Content-Type
This describes the type to be converted. This must match in order
for the conversion to be done.
Out-Content-Type
This describes the result of the conversion.
Command
This is the command used to do the conversion. It must accept a
filename argument on the command line. The name is the file that
contains the data to be converted.
Example Convert File
#
# use in-content-type out-content-type command
#
# Conversions for inline images
inline application/postscript image/gif pstopxm gif8 %s
inline image/jpeg image/gif djpeg -gif %s
# just do a download
ftp application/x-compress * none
ftp application/x-gzip * none
# Deal with transfer/content encodings
x-compress * * uncompress -c %s
x-gzip * * gunzip -c %s
# Misc. conversions
* text/x-compress-html text/html uncompress -c %s
* text/x-gzip-html text/html gunzip -c %s
* message/ text/html echo ''; cat %s
* x-unknown/x-unknown text/html echo ''; cat %s
* application/news-transmission text/html echo ''; cat %s
Chimera Home Page
john@cs.unlv.edu