TKALBUM

NAME
SYNOPSIS
DESCRIPTION
DYNAMIC HELP
WINDOW ORGANIZATION
CAMERA DOWNLOAD
ALBUM GENERATION
OTHER MENU COMMANDS
SHORTCUTS
SHARED DEVELOPMENT OF ALBUMS
SEE ALSO
FILES
BUGS
AUTHOR

NAME

TKAlbum - a Tcl/Tk GUI that assists in the generation and maintenance of HTML photo albums

SYNOPSIS

tkalbum

DESCRIPTION

TKAlbum is a Tcl/Tk GUI assisting in the generation and maintenance of HTML photo albums. It supports
*
downloads of photos from digital cameras using the USB mass storage protocol;
*
file handling, i.e., copying, moving, renaming, deleting, undeleting;
*
image viewing and editing (using the Image Magick tools);
*
transformation of images in a lossless way (using the jpegtran utility);
*
inspection and modification of EXIF data in JPEG files generated by digital cameras (using the jhead tool);
*
editing descriptive data for the album script, e.g., album and picture descriptions, orders of images, etc.;
*
customization of the album script execution; and
*
generation of HTML photo albums using the album script.
The photos are stored in albums, which are organized in a hierarchical manner, i.e., an album can contain pictures and sub-albums. There exists one designated root album. Albums are implemented as directories, which contain the pictures and sub-albums, together with additional descriptive data and some cached data. The album script is used to generate HTML files and thumbnails from this structure, which can be viewed with any web browser. All pictures in one album are displayed as thumbnails on one HTML page, which also contains additional navigation elements.

DYNAMIC HELP

When one moves with the mouse over an area of the TKAlbum main window or one of its option windows, a dynamic help text will pop up after half a second. This text gives a short explanation of what this area of the window is good for, or in the case of option windows, what the option is good for. Since these dynamic help texts are already quite extensive, they are not repeated here and the options are not explained in detail here.

WINDOW ORGANIZATION

Below the menu bar, the absolute directory path to the root album and the path to the current album relative to the root album are shown. Next, the four main areas of the windows are displayed. From the left to right there are:
*
the movement area,
*
the directory list,
*
the EXIF data display, and
*
the preview area.
At the bottom, there is the text area, which can be used to annotate the pictures.
Movement Area
The movement area contains two arrow buttons, which can be used to move selected items up and down in the directory list. A left click moves the selected items one slot up or down. A right click moves them to the beginning or end of the list. Note, however, that directories and regular files are never mixed and that the special directory entries "." and ".." always appear first. The order in which the items appear in the directory list is used later by the album script to generate the HTML pages with the thumbnails.
Directory List
The directory list displays the names of the directories and the pictures contained in the current album. Directories are prefixed with the following codes:
[A]
this is a regular album
[nA]
the contents of this album will not be displayed on the HTML pages because it contains a file named .no_album
[hA]
this album will be hidden, i.e., even the name should not be shown, because it contains a file named .hide_album
[S]
this is a directory symlink. Such symlinks should be avoided in album structures because they will confuse the browser. The reason is that theme files that are used to configure the appearance of the HTML pages are accessed using relative path information. With symlinks this will easily go astray and the HTML pages will look very funny. For this reason, TKAlbum will by default issue warnings when one selects or generates albums following symlinks.
[T]
this is a thumbnail directory generated by the album script, which is usually not displayed (see option Ignore album aux dirs and files in View options)
Any entry not prefixed with one of the markers described above is a regular file. Usually, it is a picture file, provided the option Show only picture files in the View options has been selected. Note that if this option is not selected, the album script may fail because it chokes on non-image files. So either use this option or do not keep non-image files in the album directories.
Most often file names are not very informative and it makes more sense to display the picture names (see below). This mode can be activated by selecting the option Use picture names in directory list in the View options.
Entries in the directory list can be selected using Tcl/Tks extended selection mode enhanced by a few other possibilities:
Mouse-Left-Click
deselects all entries, selects the entry under the cursor and makes that the anchor
Mouse-Left-Click-And-Drag
selects all entries over which the mouse cursor is dragged
Shift-Mouse-Left-Click
selects all entries between the anchor and the entry under the mouse cursor
Ctrl-Mouse-Left-Click
toggles the selection status of the entry under the mouse cursor (and sets or unsets the anchor)
Mouse-Left-Double-Click
displays the picture using an external viewer or, if the entry is a directory, changes into this directory
Up-Arrow-Key
changes the selection to the entries one slot up
Down-Arrow-Key
changes the selection to the entries one slot down
Return-Key
acts in the same way as the Down-Arrow-Key. If the last entry in the list currently selected entries is a directory, however, one changes into this directory.
If more than one file is selected, only information about the last file in the list of selected files is displayed. Similarly, the preview is generated for the last file in the list of selected files.
EXIF Data Display
Provided the selected file has an EXIF header, which are generated by most of the digicams nowadays, interesting information about the picture is displayed, e.g., when the picture was taken, which camera was used etc. This information is extracted using the jhead program by Matthias Wandel. The set of fields to be displayed can be configured in the JpegInfo options dialog.
Preview Area
If the selected file is a picture file, a preview is generated. First of all, TKAlbum tries to extract the EXIF thumbnail that modern digicams store in each JPEG file. This thumbnail has a very low resolution, but is easy to extract and to display. For this reason it is used as a first sketch. Then the original picture is scaled down to the preview area size, which takes much longer time. For this reason, this process is carried out in the background. Finally, the generated previews are cached internally and reused when the picture file is visited again.
If the entry Show thumbnail cropping in the View menu is activated, the preview contains also an indication of which parts of the picture will be displayed in the thumbnails on the HTML pages. The kind of cropping can be changed by selection the appropriate action in the Thumbnail menu.
If a high resolution image is needed, it is possible to request to look at the picture using an external viewer. This is invoked using the Meta-X key or by Mouse-Left-Double-Click over an entry in the directory list.
Text Area
Below the four main areas, there is the text area, which can be used to annotate the pictures. This area consists of three fields:
*
picture name,
*
picture caption, and
*
AltTag.
The picture name, if specified, is displayed below the thumbnail on the album HTML page. If no picture name is given, the file name without extension will be used as a picture name (where underlines are substituted by blanks). Note that directories cannot get a picture name. Since picture names are usually much more informative than file name, there exists the option of displaying the picture name instead of the file names (in the View options dialog and in the View menu).
The picture caption is usually a longer explanation which is - depending on the album style - also displayed below the thumbnail or only displayed on the HTML picture for the single picture.
Finally, the contents of AltTag is displayed when one moves with the mouse cursor over the picture. As a default, the picture name is used as the AltTag.
One can move around between the three text fields using Tab and Shift-Tab. The entered text will be saved after a selection command (i.e., a mouse selection in the directory list), an Up or Down Arrow, or Return key press, or any other command.
In addition to picture annotations, one can also annotate an entire album. With the command Edit header & footer (Meta-F), one can edit the header and footer of an album.

CAMERA DOWNLOAD

Currently, TKAlbum supports only cameras that can be accessed using the USB mass storage protocol. Since there are only two operations, namely downloading and deleting, it should be easy to add support for cameras using gphoto.
In order to make downloading possible, one has to edit the camera options and specify the right mount and unmount commands. Also the directory path to the image directory on the camera needs to be specified. Finally, it might be necessary to edit /etc/fstab and/or scripts for the hot-plugging mechanism. Modern Linux installation probably handle all that already.
If everything has been set up properly, the menu command Download from camera downloads all pictures from the camera. If specified in the Camera options, the downloaded files are post-processed. The default is to rename them to a string made up from the date and the time the picture was taken. In addition, one may also request in the Camera options dialog that the image files get deleted in the camera when they have been downloaded. Instead, however, it is possible to delete all images on the camera using the Delete camera images command.

ALBUM GENERATION

There are a number of different ways to execute the album script depending on what kind of changes had been done:
Strictly local generation (Meta-S):
The album in the current directory will be (re-)generated without descending into to sub-directories. Thumbnails and medium-sized previews will be regenerated only if the pictures they were generated from have changed. This is the right way to use the album script when just some local changes have been made. Note that there is no difference between "strictly local" and "local" if the current album does not contain sub-albums.
Local generation (Meta-L):
The albums are (re-)generated starting from the current album descending into sub-albums. Thumbnails and medium-sized previews will be regenerated only if the pictures they were generated from have changed. This is the right way to apply the album script if an entire sub-tree has been edited or inserted. If the current album is a new album, i.e., there exists no entry in the index file of the next higher album to the current album, then it is necessary to start the album script once in the the next higher directory in order to get the right navigation entries on the HTML pages.
Global generation (Meta-G):
All albums starting from the root album are (re-)generated. Again, thumbnails and medium-sized previews will be regenerated only if the pictures they were generated from have changed. This is the right way to call album after a theme change.
Global generation & Cleanup (Meta-P):
Same as above, but with the album's -clean option enabled. This will identify and delete all obsolete thumbnails, previews, and HTML files. There is also an option that enables cleanup at each regeneration operation.
Forced strictly local, local, or global generation:
Same as above, however, all thumbnails and medium-sized pictures are regenerated. This kind of call is necessary if the geometry of the thumbnails or medium-sized pictures has changed.
All these actions can be activated in the Album menu.

OTHER MENU COMMANDS

The commands in the File menu are for file handling, i.e., creating new albums, moving to an album, copying, renaming, moving, and deleting files. There is also an Undelete command, which changes into the trash bin directory and allows one to restore deleted files - provided that the trash bin option has not been deselected.
One particular useful command is the Copy & Convert commands that can be used to copy selected files to another directory and to convert them to low resolution and highly compressed images, which then can be sent by e-mail. There exists an option that allows an automatic renaming of these files using the picture name so that it is easier to refer to these pictures. Furthermore, there is an option called Edit before "Copy & Convert", which triggers the question whether an image should be edited before conversion.
Note that image files that are copied are marked by a star. This feature is helpful to keep track of the pictures that have been copied and/or converted for some purpose, e.g., to be shipped off for printing or for e-mailing them.
The dialogs in the Option allow to change a large set of options. In particular, it is possible to deactivate almost all warnings. In addition, one can also load new profiles and switch between existing profiles (which may have different root albums).
The commands in the Transformation menu are image transformation operations. Provided the pictures to be transformed are JPEG files, the jpegtran tool is used to transform the pictures in a lossless way.
The purpose of the commands in the Thumbnail menu is to change the cropping area for the generation of the HTML thumbnails for the selected picture. The effect of such a change can be viewed if the Show thumbnail cropping in the View menu has been enabled.
The View menu addresses previewing and viewing pictures in an external window. Some of the options from the View options dialog are repeated in this menu in order to make them more easily accessible.
The JpegInfo menu contains a number of commands connected with the capabilities of the jhead tool. For example, on can change the picture dates and one can rename files according to the picture date and time.
Finally, under the Help menu one finds supposedly helpful information, such as the licenses for TKAlbumP and its component programs, version information, and this manual page. In addition, one can disable dynamic help in this menu.

SHORTCUTS

The following shortcuts can be used (in addition to those supported by Tcl/Tk for entry and text fields):
Meta-+
Rotate picture by 90 degrees clockwise
Meta--
Rotate picture by 90 degrees counter clockwise
Meta-1
Rotate picture by 180 degrees
Meta-C
Copy the set of selected files to another directory
Meta-D
Delete the set of selected files
Meta-E
Edit the selected image
Meta-F
Edit the header & footer of this album
Meta-G
Generate album pages globally
Meta-H
Horizointal flip, i.e., mirror the picture along the vertical axis
Meta-L
Generate album pages locally
Meta-M
Move the set of selected files to another directory
Meta-N
Create a new album
Meta-O
Open another album
Meta-O
Global album generation & cleanup
Meta-R
Rename the selected file
Meta-S
Generate album pages strictly locally
Meta-T
Copy & Convert the selected files
Meta-U
Move one album up
Meta-V
Vertical flip, i.e., mirror along the horizontal axis
Meta-X
Start external viewer
Return
Go to next picture or, if a directory is selected, change into the selected directory
Up-Arrow
Move selection one slot up
Down-Arrow
Move selection one slot down
Tab
Move focus to next text field
Shift-Tab
Move focus to previous text field

SHARED DEVELOPMENT OF ALBUMS

One can configure TKAlbum so that it supports the shared development of albums. The idea is to set up a dedicated Unix group for this purpose and make all users who shall be able to modify the albums members of this group. Then the initial album must be set up such that all files belong to the new group and the group write permission is set.
In TKAlbum, the group name must be entered in the General options dialog in the field Group ID for shared work on albums. If this field contains a non-empty string, TKAlbum will make sure that all files generated in this album will belong to this group and have their group write permissions set, so that everybody from the group can delete and overwrite these files.
Using the profile select/load/save functionality in the General options dialog, one can also establish a common profile for all group members. Note that the appropriate write permissions must be set to store the profile.
There are no synchronization methods for assuring that changes get safely logged to the profile files or the albums. In other words, it would not be a good idea to work concurrently on an album since changes most probably will be lost. Only one user at a time should work on an album structure!

SEE ALSO

album, jhead, jpegtran(1), display(1), convert(1), mogrify(1)

FILES

~/.tkalbum/profile - list of user preference files
~/.tkalbum/default - default user preference file
captions.txt - contains picture names and captions
header.txt - header text for an album
footer.txt - footer text for an album
tn - thumbnail directory
<root-album>/.trash - trash bin

BUGS

Caption files for single pictures, i.e., <filename>.txt, are ignored by TKAlbum. The album script on the other hand considers these captions with higher priority than those in the captions.txt files.
The user is not warned when files necessary to run the album script are deleted.
Files starting with a dash lead to trouble.

AUTHOR

Bernhard Nebel
bernhard.nebel@gmx.de