Author: Stefan Spaeth
Description: Description of more advanced features of createPhotoWebPages.pl

# createPhotoWebPages.pl - Advanced Features

back to main page

This section describes a few of the advanced features in more detail.

- CSS Stylesheets
- Variables

## CSS Stylesheets

"CSS Stylesheets" are only partially supported. Later versions may provide a more sophisticated support. Currently, only font entries are fully supported.

The entry HTML_CSS_ENABLE must be set to a value of 1 in order to activate CSS stylesheet support. A value of 0, on the other hand, activates `<font>` constructs inside the HTML code.

The name of the "CSS-Stylesheet" file is configurable by setting the entry HTML_CSS_FILENAME to the desired value (the default name is "stylesheet"). The file extension ".css" is automatically appended to this name. The stylesheet file is created if it does not exist and is placed next to the thumbnail HTML pages. It is referenced by all HTML files (except for the image wrapper HTML file which contains only the image and no text).

If a "CSS-Stylesheet" file cannot be found then the script tries to copy a template from the location "~/.createPhotoWebPages/stylesheet.css" (actually the installation directory) to be used as default. If this default file cannot be found then a new file is generated with appropriate default values.

back to top,

## Variables

In order to simplify the use of template-driven texts a number of placeholder variables are available. These are replaced by the appropriate content when the HTML files are later generated. All use the format "%VARIABLENNAME%"

Two groups of variables are available which may be used inside different entries.

- Document Variables
- Image Variables

### Document Variables

The variables described in the following may be used in the configuration file entries HTML_ADDRESS_TEXT and HTML_TOP_TEXT.

- %DOCAUTHOR%
  The variable is later replaced by the contents of the AUTHOR entry.
- %DOCEMAIL%
  The variable is later replaced by the contents of the EMAIL entry.
- %DOCDATE%
  The variable is replaced by the current date (i.e. the date of the script execution).
  (Format: TT.MM.JJJJ).
- %DOCCOPY%
  The field is later replaced by the contents of the COPYRIGHT entry.

### Image Variables

Note that most image variables are extracted from the EXIF entries of the JPEG format. It is therefore a prerequisite to have images available in JPEG format. The program "jhead" is used to extract the EXIF entries. The configuration entry USE_JPEGTRAN_JHEAD indicates the availability of this program.

The variables described in the following may be used in the configuration file entries IMAGE_ALT, IMAGE_TEXT, and IMAGE_CAPT.

- `%IMGDATE%`
  The date of recording. If not available, the script tries to use the file creation date (with the additional text "(File)").
- `%IMGTIME%`
  Die time of recording. If not available, the script tries to use the file creation time (with the additional text "(File)").
- `%IMGFSIZE%`
  The size of the image file (depending on the size the unit suffix "Bytes", "kBytes", or "MBytes" is added).
- `%IMGWIDTH%`
  The width of the original image measured in pixels.
- `%IMGHEIGHT%`
  The height of the original image measured in pixels.
- `%IMGTYPE%`
  The file format of the image file. "jpg", "png", and "gif" are possible values.
  An unknown file type is marked with "unknown".
- `%IMGFNAME%`
  The file name of the image file. Including file extension, but without file path.
- `%IMGFLASH%`
  Indicates if the flash light was active during the recording. Possible values are "yes" und "
- `%IMGISOEQUIV%`
  The ISO Equivalent of the light sensitivity (100, 200, 400, ...).
- `%IMGCAMVENDOR%`
  The camera vendor / manufacturer.
- `%IMGCAMMODEL%`
  The camera model.
- `%IMGFOCLEN%`
  The focal length used during the recording.
- `%IMGEXPOSURE%`
  The exposure time used during the recording.
- `%IMGAPERTURE%`
  The aperture used during the recording.
- `%IMGEXPBIAS%`
  The additional exposure bias used during the recording.
- `%IMGMETERMODE%`
  The metering method for the auto focus.
- `%IMGEXPMODE%`
  The exposure mode.
- `%IMGRATIO%`
  The width vs. height ratio of the image ("3:2", "4:3", or "non standard" are possible values)

back to top, back to main page