Generated: August 27, 2003, 22:47:50Copyright ©2003, Kurt NørmarkThe local LAML software home page

Reference Manual of LAML Photo Show Tool

Kurt Nørmark ©    normark@cs.auc.dk    Department of Computer Science    Aalborg University    Denmark    

LAML Version 21.00 (August 27, 2003, PP edition)

This is the reference manual of the LAML Photo Show tool. This tool allows you to create a set of HTML files embedded in a directory with photos (jpg files). The HTML files provides for smooth navigation, and it provides nice overviews of your pictures, all made by HTML files which can be shown in any Internet browser. Some help to photo management is also provided. This tool is based on XML-in-LAML.

Table of Contents:
1. Organization of photos3. The photo element
2. The Top Level4. Examples

Alphabetic index:
lower-caption(lower-caption (quote size) 4 Lower caption text)Defines the default lower caption of a photo page.
photo(photo (quote file) 1.jpg (quote path) ../Film3/)Defines the characteristics of each presented photo in the show.
photo-list(photo-list (photo (quote file) 1.jpt (quote path) Film1/))The list of photos in the show.
photo-show(photo-show (quote time) 8 (quote background-color) #123456 (photos-in-current-directory))The top level element which holds a number of attributes that affect the photo show of all pictures in a film.
photos-in-current-directory(photos-in-current-directory)Automatically forms a photo list of the photos in the current directory.
title-of-show(title-of-show The title)Determines the title (caption) of the current film
upper-caption(upper-caption (quote size) 6 Upper caption text)Defines the default upper caption of a photo page.

 

1.   ORGANIZATION OF PHOTOS

A LAML photo show is directory of films. Each film is a directory itself. Films cannot be nested into each other; Thus the films obey a flat organization within the top-level photo show directory. There may, however, be subdirs of the photo show directory with other photo shows directories (recursive orgnization). As of now, no linking is provided to these.

The directory corresponding to a film contains a flat list of jpg files, with arbitrary names. To use the LAML photo show generator you should put a LAML file side-by-side with the photos, which describes the properties of the photo show, as related to the current film. This reference manual documents how this LAML is made. To make things easy, use the Emacs command M-x make-laml-photo-show (found in 'Tools>LAML>Make new photo show...') for this.

Thus, the typical directory and file organization is like the following:

process-all-films.laml
index.html
Film1
  1.jpg
  2.jpg
  3.jpg
  make-show.laml
  index.html
  html
   1.html
   ...
  internal
   film-description-entry.lsp
   photo-ast.lsp
   photo-list
Film2
  1.jpg
  2.jpg
  3.jpg
  index.html
  make-show.laml
  html
   1.html
   ...
  internal
   film-description-entry.lsp
   photo-ast.lsp
   photo-list
Film3
  4.jpg
  5.jpg
  6.jpg
  index.html
  make-show.laml
  html
   1.html
   ...
  internal
   film-description-entry.lsp
   photo-ast.lsp
   photo-list

You are supposed to make to top level directory and the film directories. The directory names are arbitrary. The jpg files are created by the software that transfers photos from your digital camera. You write the make-show.laml files with your text editor - Emacs, for instance. The name of this file is arbitrary, but you should use the laml extension. The LAML photo show generator makes the remaining files and directories. - Noticed the file process-all-films.laml in the root which, when processed, regenerates the photo shows for all (already once processed) films; This laml file is made automatically the first to you process one of the films.

You can use the LAML photo show generator to make collections of photos from different directories, without copying any photo. To do so, make a film directory without jpg files, and address individual photos in arbitrary films from there. LAML makes it easy to do so, because you can copy the necessary photo clauses from your browser into the text editor. The names of the photos are linked to the appropriate photo clauses.



 

2.   THE TOP LEVEL
In this section we document the top level photo-show element, and not least its numerous attributes.


photo-show


Example form
(photo-show 'time "8" 'background-color "#123456" (photos-in-current-directory))

Description
The top level element which holds a number of attributes that affect the photo show of all pictures in a film. As constituents there is either a list of photo entries, or a directive to automatically collect the photos in the current directory.

XML Attributes
Required: *
Default values: red
time *CDATAThe time in second each picture is show in automatically progressing shows. This is a default value, which can be overwritten for each photo.
background-colorCDATAThe background color of photo pages. As an example "#000000" represent black, like in HTML. The LAML function rgb-color-encoding is useful to give colors.
text-colorCDATAThe color of the text in photo pages. As an example "#ffffff" represent white, like in HTML. The LAML function rgb-color-encoding is useful to give colors.
home-pathCDATAThe path to the directory with all the film. Should always be "../" with the current and flat organization of the films.
previous-filmCDATAThe to path of the previous film. The path is relative from the current directory. The path must have a trailing '/'. Example "../Film1/".
next-filmCDATAThe path to the next film. The path is relative from the current directory. The path must have a trailing '/'. Example "../Film2/".
before-first(last-picture | previous-film | none)Determines what comes before the first photo in the film. last-picture means 'cyclic show'. previous-film means that a link is made to the last picture in previous-film. none means that there is nothing before the first picture.
after-last(first-picture | next-film | stop-page | none)Determins what comes after the last photo in the film. first-picture means 'cyclic show'. next-film means that a link is made to the first picture of the next-film. stop-page means that the photo show ends with a stop page. none means that thre is is nothing after the last picture.
transition(blend | none)The browser transition used when shifting from photo to phote during automatically progressing shows. Notice that blend only works in Internet Explorer from Microsoft.
verbosity-levelCDATA     (2)A number between 0 and 2 which controls the amount of messages given by the tool. 0 is minial and 2 is maximal.
language(danish | english)The language of the fixed text generated by the tool
html-mode(raw | pp)The formatting of the HTML pages generated by the tool. pp means pretty printed, and it takes appr. the double amount of disk space than raw. If you never read the HTML files - and why should you - you can use raw.
index-linking(run | stop)Determines the kind of linking used from a film page to the photos. run means that the links go to automatically progressing pages. stop means that the links go to pages without automatically progress.
default-size(original | auto | explicit)Determines the size of the photos, as presented by the tool. original means that the photos are presented directly, without enlarging or reducing them. auto means that the photos are enlarged or reduced to make them fit with the real estate of the browser. explicit means that we should use the witdh and height are given for each photo.
default-orientation(portrait | landscape)Controls the automatically enlarging or reduction, when auto is used for default-size.
portrait-percentageCDATA     (90)-
landscape-percentageCDATA     (95)-
tabular-overview-dimensionCDATA     (3)An integer such as 1, 2, 3 or 4 which determines the tabular layout of the overview pages. If, for instance, 3 is given, 9 photos are shown on each overview page.
copy-film(true | false)A boolean attribute that controls if the photos (the jpg files) are copied to the copy-destination directories. Useful for photo management.
copy-destinationCDATAAn absolute path on the your computer which defines the target directory of photo copying. Only releant is copy-film is true.
cameraCDATA     (Canon-G3)-

XML content model
(title-of-show,upper-caption,lower-caption,(photo-list | photos-in-current-directory))


title-of-show


Example form
(title-of-show "The title")

Description
Determines the title (caption) of the current film

XML Attributes

XML content model
(#PCDATA)


upper-caption


Example form
(upper-caption 'size "6" "Upper caption text")

Description
Defines the default upper caption of a photo page. Can be overruled by each photo element.

XML Attributes
Required: *
Default values: red
sizeCDATAThe size of the upper caption. A number between 1 and 6.

XML content model
(#PCDATA)


lower-caption


Example form
(lower-caption 'size "4" "Lower caption text")

Description
Defines the default lower caption of a photo page. Can be overruled by each photo element.

XML Attributes
Required: *
Default values: red
sizeCDATAThe size of the lower caption. A number between 1 and 6.

XML content model
(#PCDATA)


photos-in-current-directory


Example form
(photos-in-current-directory)

Description
Automatically forms a photo list of the photos in the current directory. This clause can be given instead of a photo list. It means that the tool automatically makes a photo list of all the jpg files in the current directory. The sorting is done in a smart way, by taking the numeric part of the file names into account. Default properties are assigned to the photos. As an important practical observation, the tool will make a file photo-list in the internal directory, with a photo list. You can replace the (photos-in-current-directory) clause with this list, and thereby control the show in a much better way.

XML Attributes

XML content model
EMPTY


photo-list


Example form
(photo-list (photo 'file "1.jpt" 'path "Film1/"))

Description
The list of photos in the show. Notice that the order of the photo elements in the photo-list controls the ordering of the photos in the show.

XML Attributes

XML content model
(photo*)


 

3.   THE PHOTO ELEMENT
In this section we document the photo element, which can be used to describe each photo in the show.


photo


Example form
(photo 'file "1.jpg" 'path "../Film3/")

Description
Defines the characteristics of each presented photo in the show. Some of the attributes overrules the default attributes given in the photo-show element.

XML Attributes
Required: *
Default values: red
file *CDATAThe name of a photo file, either from the current directory (current film) or from another directory (another film). In the latter case, the path attribute must address the other film. The name consist of the proper name and the file extension (jpg). For instance "1.jpg".
pathCDATA     ()The path of the photo file, as given by the file attribute. The path is relative to the current directory. It must end with a '/'. Example: "../Film3/", where .. means the parent directory.
timeCDATAThe time in second this photo is show in automatically progressing shows. Overrules the time in the enclosing photo-show element.
transition(blend | none)The browser transition used when shifting from this photo to the next. Notice that blend only works in Internet Explorer from Microsoft. Overrules the transition in photo-element.
size(original | auto | explicit)Determines the size of this photo, as presented by the tool. original means that the photo is presented directly, without enlarging or reducing it. auto means that the photo is enlarged or reduced to make it fit with the real estate of the browser. explicit means that we should use the width and height attribute of this photo. Overrules the default value given in the enclosing photo-element.
orientation(portrait | landscape)Controls the automatically enlarging or reduction, when auto is used as size for this photo.
widthCDATAThe width to be used for this photo. Use the value explicit for size if you give the width. Normally you will not want give both with and height.
heightCDATAThe height to be used for this photo. Use the value explicit for size if you give the height. Normally you will not want give both with and height.

XML content model
(upper-caption?,lower-caption?)


 

4.   EXAMPLES

In this section we show examples of LAML files.

The first file is similar to the file produced by the Emacs command M-x M-x make-laml-photo-show:

(load (string-append laml-dir "laml.scm"))
(laml-style "xml-in-laml/photo-show/photo-show")

(define photo-show-title "Example")

(photo-show
  'language "danish"                                       ; danish or english
  'time "3"
  'background-color (rgb-color-encoding black)             ; color string, like "#123456"
  'text-color (rgb-color-encoding white)                   ; color string, like "#123456"
  'home-path "../"
  'transition "none"                                       ; none or blend
  'tabular-overview-dimension "3"                          

  'previous-film "../Film1/"
  'before-first "previous-film"                            ; last-picture, previous-film, none
  'next-film "../Film3/"
  'after-last "next-film"                                  ; first-picture, next-film, stop-page, none

  'index-linking "stop"                                    ; run or stop
  'default-size "auto"                                     ; original, auto, explicit
  'default-orientation "landscape"                         ; portrait or landscape

  'verbosity-level "2"                                     ; 0, 1, 2


  (title-of-show photo-show-title)
  (upper-caption 'size "6" photo-show-title)
  (lower-caption 'size "4" "")

  (photos-in-current-directory)

)

The purpose of the next laml file is to enumerate 'the best photos' in a large collection of films and photos:

(load (string-append laml-dir "laml.scm"))
(lib-load "xml-in-laml/xml-in-laml.scm")
(laml-style "xml-in-laml/photo-show/photo-show")

(photo-show
  'time "8"
  'language "english"
  'transition "blend"
  'html-mode "pp"
  'home-path "../"

  'tabular-overview-dimension "3"
  'before-first "none"
  'after-last "stop-page"

  (title-of-show "My Best Photos")
  (upper-caption 'size "6" "")
  (lower-caption 'size "3" "")
  

  (photo-list
    (photo 'time "3" 'path "../Film34/" 'file "109_0957.JPG" 'size "auto" (upper-caption 'size "6" "") )
    (photo 'time "3" 'path "../Film34/" 'file "109_0960.JPG" 'size "auto" (upper-caption 'size "6" "") ) 
    (photo 'time "3" 'path "../Film34/" 'file "109_0968.JPG" 'size "auto" (upper-caption 'size "6" "") )
    (photo 'time "3" 'path "../Film34/" 'file "109_0974.JPG" 'size "auto" (upper-caption 'size "6" "") )   
    (photo 'time "3" 'path "../Film34/" 'file "109_0975.JPG" 'size "auto" (upper-caption 'size "6" "") ) 
    (photo 'time "3" 'path "../Film32/" 'file "109_0915.JPG" 'size "auto" (upper-caption 'size "6" "") )

  )

)



Generated: August 27, 2003, 22:47:50