This script renames the members of a fileset (such as the files of a DTB). The renaming process can be customized by
The script is primarily written to support DTBs - other fileset types are not explicitly supported.
The input fileset manifest file (NCC, OPF, etc)
A fileset in which certain members have been renamed according to the configuration.
A renaming pattern consists of a sequence of tokens. A token is a symbol for a certain kind of information.
The following table defines the available tokens.
| token | meaning |
|---|---|
| label | A label of the current file - typically corresponding to the first heading in the file. This cannot always be set. |
| uid | A unique identifier from the fileset (such as a DTB) to which the file belongs. This can be values of dc:identifier or dtb:uid metadata. |
| seq | Represents the sequential position of this file within the presentation. If this is audio file 34 out of 100 audio files, the value will be '034'. |
| echo | An echo of the input filename. |
| fixed | A fixed string. The string is expressed within parenthesis; fixed(the string) |
| rnd | A random string. The length of the string is expressed within parenthesis; rnd(2), where each increment will add 4 random characters to the name. |
If a renaming pattern contains several tokens, they are separated by plus signs. Pattern examples:
seq+label
uid+seq
fixed(dtb)+seq
echo
uid+rnd(2)
uid+seq+label
The default is to exclude images, CSS files and XML files, which means that the default value is XmlFile, CssFile, ImageFile.
Names for file types that can be used in the exclude list are:
XmlFile, Xhtml10File, DtbookFile, OpfFile, SmilFile, ImageFile, JpgFile, BmpFile, PngFile, SvgFile, CssFile, AudioFile, Mp3File, Mp2File, WavFile.
Note that some file types infer others: if you add XmlFile to the exclude list, then all XML files will be excluded (Smil, Dtbook, Opf, Xhtml etc).
The documents linked below are parts of the Transformer technical documentation. These are developer and systems-administrator centric documents.