Album
view release on metacpan or search on metacpan
lib/Album/Tutorial.pm view on Meta::CPAN
Creating pages for 1 index
(Needed to write 1 index page)
The file 'dsc00052.jpg' has now been imported as
'200405171843310052.jpg'. 'album' tries to link to the image, if that
is not possible, the image will be coped. File 'dsc00053.jpg' must be
rotated, so it will always be a copy.
If you hover the mouse over the file name in the index page, or over
the title on the image pages, a pop-up will show a selection of
information from the EXIF data.
=head2 Embedding other albums
In the file 'info.dat' you can also enter names of HTML documents to
refer to arbitrary other information you want to include in your
album. You can use this to embed (more precisely: refer to) other
albums. For example:
20040910/index.html Pictures of an exhibition
This will store in the album a reference to another album. If at the
given location a file 'icon.jpg' exists, this will be used in the
album as thumbnail image. To generate a sample icon for an album to be
included, run the album program with command line option --icon.
The reference will only be present on the index pages. When following
the 'previous' and 'next' links of image pages, these references will
be skipped.
Note that when you click on an external reference thumbnail, a new
browser window will be opened to show the referenced information.
=head2 Journal mode
I<Warning: Journal mode is still under development and may change in
future versions.>
Journal mode is enabled with the control B<!journal> in C<info.dat>.
When journal mode is enabled, the data from C<info.dat> is considered
to be a series of paragraphs. Paragraphs are separated using one or
more empty lines.
The first line of a paragraph may contain image info, preceeded by an
asterisk and whitespace. For example:
!journal
!tag 2004/06/01
A bright, shiny day.
* im023.jpg Sunrise
This morning, we were surprised by a fantastic sunrise like
we have never seen before.
* im024.jpg Overview
This picture shows an overview of the area.
This way it is possible to attach extended pieces of text to a images.
An additional series of pages is generated, the journal pages. Each
journal page contains the extended text and thumbnail images of all
entries that belong to a single tag. The idea is that the tags are
dates, and each journal page contains the text and images of a single
day.
If the extended text starts with C<< < >> it is assumed to be HTML and
included literally.
The medium and large image pages have an additional icon to jump to
the journal entry for an image. The extended text can be also viewed
on the medium and large image pages when the mouse is placed over the
info at the right side above the image, e.g., C<My First Album: Image
1 of 9>.
Note that journal mode can not be mixed with normal mode.
=head2 External formats and style sheets
I<Warning: External formats and style sheets are still under
development and may change in future versions.>
Internally, 'album' uses formats (templates) to build the generated
HTML pages, and cascading style sheets (CSS) to specify how the
browser should show the pages. Formats and style sheets can be
exported (written to external directories), and 'album' will then use
the external information. So you can have ultimate control over how
pages must look like.
=head2 External formats
When 'album' is run with B<--extformats> it will create a directory
'formats' and, in this directory, the HTML templates for all types of
pages that 'album' will generate. Existing files in this directory
will B<not> be overwritten, so it is safe to change the templates to
your liking. When 'album' is run again to process images, it will use
the templates from the 'formats' directory if they are available.
The templates are plain HTML and contain variables that will be
substituted with actual values. Some of the variables are:
=over 12
=item $title
The title of the album.
=item $css
The code to get the style sheet of this page. This can be in-line
specifications, or a link to an external stylesheet.
=item $ltop
Index and image pages only: The text above each image, left.
=item $rtop
Index and image pages only: The text above each image, right.
( run in 0.585 second using v1.01-cache-2.11-cpan-0b5f733616e )