- Copy your photos to directories and their subdirectories. (more details)
- Modify optional settings and run the Rhotoalbum generator. (more details)
- Enjoy :)
Please, visit the Rhotoalbum's RubyForge page.
The latest version 0.6 was released on June 7, 2008.
Rhotoalbum is a photo album generator (programmed in Ruby). It works with a directory structure and it does not require any database connection.
Rhotoalbum generates thumbnails and the index.html file in each subdirectory. User can also add titles and descriptions of the images.
There are the following requirements:
convert program from the ImageMagick libraryexifr for reading EXIF data from your photosRhotoalbum expects that your photos are stored in directories (and their subdirectories). The Rhotoalbum files should be installed (do not worry, it means unpacked) it the top directory of this structure.
Example 1:
photos
2005
01_London
02_Stockholm
03_Oslo
2006
01_Paris
02_Madrid
03_Rome
2007
01_Sydney
02_Melbourne
In this example, the Rhotoalbum files should be stored in the photos directory.
Example 2:
photos
john
200702 Beach
200705 Party
alice
200703 Nice sunset
200705 Party
Again, the Rhotoalbum files should be stored in the photos directory.
ruby rhotoalbum.rb
Rhotoalbum starts in the actual directory where it gathers all subdirectories and image files.
If there are image files, it creates the thumbnails directory, creates a thumbnail for each image and stores is in the thumbnails directory.
Then it creates the index.html file that contains:
And it repeats these steps for each subdirectory (and its subdirectories).
Directories and files are ordered by their names.
A link to a subdirectory uses a thumbnail highlight.jpg located in that subdirectory.
The album thumbnail - highlight - is automatically created from the first image in the directory (i.e. album).
How to create own highlight.jpg of a directory:
ln -s highlight.jpg thumbnails/th_img_1234.jpg
highlight.jpg
copy thumbnails/img_1234.jpg .
mv img_1234.jpg highlight.jpg
The best practice / sequence of steps for generating albums:
./rhotoalbum.rb textto generate
description.txt files.description.txt file in each directory.options.yml.template to options.yml, e.g. cp options.yml.template options.yml
options.yml file, e.g. enable cool effects for the photo slideshow:
panning: true fading: true
./rhotoalbum.rbAll thumbnails, index pages will be generated.
highlight.jpg (by copy or symbolic link) in each directory for the album front page.Rhotoalbum uses the TripTracker slideshow. See the link for more details.
Rhotoalbum is distributed under the GPL license.
A few of (not so) frequently asked questions:
ssh account, FTP
Q: I do not have an ssh account, only FTP. Is there a way how to use Rhotoalbum?
A: No.
Q: Really?
A: Well, there is a possibility to generate your album on your computer and then transfer all files to your server. Usually, photos are quite large, so to copy the whole album again and again is cumbersome. Of course, you could copy only the changed files, but if you would install a new version of Rhotoalbum :), you would have to manually copy all changed files in all directories.
image viewer
Q: Is it possible to change the image viewer?
A: Hmmm... It is possible but... I tried several JavaScript image viewers -- the TripTRacker slideshow was the best (and also the license is fine).
Q: The panning and fading effects are cool, but it does not run smoothly on slower computers. What to do?
A: Unfortunately, then there is only one way: to disable them. For that reason they are disabled by default.
best practice
Q: What should I do to regenerate some or all files?
A: There are two options:
./rhotoalbum.rb cleanindexto remove all index files, or
./rhotoalbum.rb cleanto delete thumbnails, indices, highlights
Q: What should I do if I added photos to already existing structure?
A: As simple as you may think :) Just copy them to a directory where you want to have them and execute the ./rhotoalbum.rb as you did the first time.
./rhotoalbum.db [command]
Commands:
generate (default) generates index.html, thumbnails for all subdirectories
recursively (doesn't overwrite already generated files)
text generates descriptions.txt file in each subdirectory where
album/photo descriptions can be written
cleanindex remove all index.html files recursively
clean remove all generated thumbnails, indices, highlights
recursively
help displays a short Usage
If a photo title is not enough, you can assign a description text to any album or photo.
Thereare two ways how to do it:
IMG123.JPG the description file is IMG123.JPG.txtdescription.txt containing one-line mappings of the format: image name, text separated by colon, semicolon, comma or tab, e.g.
IMG123.JPG : Sunset My Album : Vacation 2007
You can customize the album generation. You can do it in the options.yml file. If this file is present the options will be used. You can copy the file from options.yml.template
The following properties can be customized:
title:: name of the album
author:: author or authors
author_label:: a label that should be used in the copyright section for author(s), e.g. Author, Authors or Artist
css:: default style to be used
explicitIndexHtml: true or false -- if true, appends '/index.html' to links; useful when you're browsing the album locally, using the 'file://' protocol, and not through a webserver
styleSwitcher:: true or false -- to show the style switcher
showTitleAlbum:: true or false -- to show the album title
showStatsAlbum:: true or false -- to show the album statistics
showTitlePhoto:: true or false -- to show the photo title
showDescription:: true or false -- to show the photo description
showDate:: true or false -- to show the photo date
showExif:: true or false -- to show the basic EXIF data (exposure time, focal length and f-number)
showExtendedExif:: true or false -- to show extended EXIF data (camera model)
thumbnailDim:: 256x256 -- the thumbnail size
panning:: true or false -- to enable the panning effect for the JavaScript photo viewer
fading:: true or false -- to enable the fading effect for the JavaScript photo viewer
labelNoPhoto:: no photos -- a label for no photo in an album
labelOnePhoto:: one photo -- a label for one photo in an album
labelMorePhotos:: # photos -- a label for more photos in an album
labelOneAlbum:: one album -- a label for one subalbum in an album
labelMoreAlbums:: # albums -- a label for more subalbums in an album
copyright:: your copyright section, it may include links to e.g. creative commons licenses.
Thanks to:
Michael Adams for his CSS file optimisation and double thumbnails fix.
Mooffie for the relative links and adding index.html to URLs for browsing without a web server.