detoxrc man page

When setting up a new set of rules, the safe and wipeup filters must always be run after a translating filter (or series thereof), such as the utf_8 or the uncgi filters. Otherwise, the risk of introducing illegal characters into the filename is introduced.

The format of this configuration file is C-like. It is based loosely off named's configuration files. Each statement is semicolon terminated, and modifiers on a particular statement are generally contained within braces.

Defines a sequence of filters to run a filename through. "name" specifies how the user will refer to the particular sequence during runtime. Quotes around the sequence name are generally optional, but should be used if the sequence name does not start with a letter.

There is a special sequence, named "default", which is the default sequence used by detox. This can be overridden through the command line option -s or the environmental variable DETOX_SEQUENCE.

Sequence names are case sensitive and unique throughout all sequences; that is, if a system wide file defines normal_seq and a user has a sequence with the same name in their .detoxrc, the users' normal_seq will take precedence.

This translates ISO 8859-1 (aka Latin-1) characters into lower ASCII equivalents. The output is not necessarily safe, and should also be run through the safe filter.

Under normal circumstances, the filename syntax is not needed. Detox looks in several locations for a file called iso8859_1.tbl, which is a set of rules defining how an ISO 8859-1 character should be translated.

In the event this table doesn't exist, you have two options. You can download or create your own, and tell detox the location of it using the filename syntax shown above, or you can let detox fall back on its internal tables. The internal tables translate the same as the stock translation tables.

You can chain together multiple iso8859_1 translations, as long as the default value of all but the last one is set to nothing. This is explained in detox.tbl(5).

This could also be called "safe for UNIX-like operating systems". It translates characters that are difficult to work with in UNIX environments into characters that are not.

In earlier versions this filter was entirely internal. Starting with 1.2.0, this filter is controlled by a translation table. In the absense of the translation table, the previous code will be employed for the translation. Also, prior to 1.2.0, the safe filter removed leading dashes to prevent the hassle of dealing with a filename in the format -filename. This functionality is exclusively handled by the wipeup filter now.

See the Safe section for more details on what this filter translates by default.

This wipes up any excessive characters. For instance, multiple underscores or dashes will be converted into a single underscore or dash. Any series of dash and underscore (i.e. "_-_") will be converted into a single dash.

The remove trailing option removes a dash or underscore followed immediately by a period.

See the Wipeup section for more details on what this filter translates.