createPhotoWebPages.pl - Umbenennungsregeln
Author: Stefan Spaeth
Description: Umbenennungsregeln für createPhotoWebPages.pl

# createPhotoWebPages.pl - Renaming Rules

back to main page

The following section briefly introduces the rules that are applied when renaming image files (and associated configuration entries).

- `IMG_NAME_REPLACE_UNDERSCORE=1`
  this switch leads to the replacement of one (or more) blanks with a underscore character ("_");
  e.g. "My Image" is converted to "My_Image";
- `IMG_NAME_NO_NUMBER_SUFFIX=1`
  if an image name ends with digits that follow letters and both are separated by blanks, then these blanks are removed.
  e.g. "Image 1" is converted to "Image1";
- `IMG_NAME_NO_ALPHA_PREFIX=1`
  this entry allows to remove a two letter prefix when creating the readable name of the image (`IMAGE_NAME`);
  e.g. "aa_Image.jpg" is turned into "IMAGE_NAME=Image";
  Note that this entry is not applied when converting an `IMAGE_NAME` entry into an image file name, i.e. a two letter prefix is kept for the file name.
- `IMG_NAME_REPLACE_DASH=0`
  if desired, blanks may also be replaced by dashes and not by underscores;
  e.g. "My Image" is converted to "My-Image";
- `IMG_NAME_BLANK_BEFORE_CAPS=1`
  This entry may be interesting when mixed case words are used. Some letters can be saved and the file name is shortened by removing blanks between any lower case and upper case letter (assuming that in most cases we wish to restore a blank later on);
  this entry may, of course, be combined with the replacement of blanks by underscores or dashes.

One additional rule that is always applied affects HTML-Entities, which are permissive in `IMAGE_NAME` entries. They are replaced by the first letter following the ampersand ("&") character.

Let's look at some examples. They will show more clearly how to apply the different renaming configuration entries.
It is assumed that images have been scanned using the command:
`-scan -rename -ext -prefix`
The rename configuration entry values are applied as described above.
The table describes:

- the original file name,
- the renamed file name after doing a "-scan" run,
- the associated automatically generated IMAGE_NAME entry,
- an example how IMAGE_NAME might be changed,
- and finally the renamed file name after applying a "-rename" run.

Original file name | after "-scan" | IMAGE_NAME | IMAGE_NAME changed into | file name after "-rename"
--- | --- | --- | --- | ---
DSCN4325.JPG | aa_DSCN4325.jpg | DSCN 4325 | Gro&szlig;er Vogel | aa_GroserVogel.jpg
MyFirstIMage.jpg | ab_MyFirstImage.jpg | My First Image | My first Image | ab_My_firstImage.jpg
Image1.jpg | ac_Image1.jpg | Image 1 | My second Image 1 | ac_My_secondImage1.jpg

back to main page