album-4.17/ 0000755 0000000 0000000 00000000000 14215673616 011256 5 ustar root root album-4.17/Docs/ 0000775 0000000 0000000 00000000000 12661460265 012145 5 ustar root root album-4.17/Docs/conf.bak 0000644 0000000 0000000 00000004456 10067262453 013555 0 ustar root root New_Chunk = ITEM:
# Name of the short index, just links to the chapters
Short_Index = Short.html
# Name of the long index, links to chapters and chunks/questions
Long_Index = index.html
# Our list of text files (can use glob characters)
# Just make sure the filename ends with the section number.
Text_Files = txt_*
# Header
Header = "conf(my_head_head)
conf(my_start_table_top)
SPACE_OUT($NUMBER -- $TOPIC)
conf(my_start_table_bottom)
"
# Footer
Footer = " "
# Header for short index
Short_Header = "
conf(my_head_head)
conf(my_start_table_top)
SPACE_OUT(album Documentation)
conf(my_start_table_bottom)
"
# Footer for short index
Short_Footer = conf(Footer)
Long_Header = conf(Short_Header)
Long_Footer = conf(Short_Footer)
##################################################
# Local variables for the conf file (used in conf(..) constructs)
##################################################
my_head_head = "
MarginalHacks album Documentation
"
my_start_table_top = "
1: Methods
There are easy ways and complicated ways to create a custom theme,
depending on what you want to be able to do.
2: Editing current theme HTML
If you just want to slightly change the theme to match the output
of your site, it might make sense to edit a current theme.
In the theme directory there are two *.th files. album.th is
the template for album pages (the thumbnail pages) and image.th
is the template for image pages (where you can see medium or full
size images). The files are very similar to HTML except for
some embedded <: ePerl :> code. Even if you don't know perl or
ePerl you can still edit the HTML to make simple changes.
Good starting themes:
Any simmer_theme is going to be up to date and clean, such as "Blue" or
"Maste." If you only need 4 corner thumbnail borders then take a look
at "Eddie Bauer." If you want overlay/transparent borders, see FunLand.
If you want something demonstrating a minimal amount of code, try "simple"
but be warned that I haven't touched the theme in a long time.
3: The easy way, simmer_theme from graphics.
Most themes have the same basic form, show a bunch of thumbnails
for directories and then for images, with a graphic border, line and
background. If this is what you want, but you want to create new
graphics, then there is a tool that will build your themes for you.
If you create a directory with the images and a CREDIT file as well
as a Font or Style.css file, then simmer_theme will create theme for you.
Files:
Font/Style.css
This determines the fonts used by the theme. The "Font" file is the
older system, documented below. Create a Style.css file and define
styles for: body, title, main, credit and anything else you like.
See FunLand for a simple example.
Alternatively, use a font file. An example Font file is:
--------------------------------------------------
$TITLE_FONT = "size='4' color='#ffffff' face='Times New Roman,Georgia,Times'";
$MAIN_FONT = "face='Times New Roman,Georgia,Times'";
$CREDIT_FONT = "size='-1' face='Verdana' color='#ffffff'";
$BODY = "background='$PATH/bkgrnd.gif' link='#0099FF'">
--------------------------------------------------
CREDIT
The credit file is two lines and is used for the theme index at MarginalHacks.
If you're never submitting your theme to us, then you don't need this file.
(But please do!) If so, the two lines (and only two lines) are:
1) A short description of the theme (keep it all on one line)
2) Your name (can be inside a mailto: or href link)
Null.gif
Each simmer theme needs a spacer image, this is a 1x1 transparent gif.
You can just copy this from another simmer theme.
Optional image files:
Bar Images
The bar is composed of Bar_L.gif, Bar_R.gif and Bar_M.gif in the middle.
The middle is stretched. If you need a middle piece that isn't stretched, use:
Bar_L.gif, Bar_ML.gif, Bar_M.gif, Bar_MR.gif, Bar_R.gif
And then the Bar_ML.gif and Bar_MR.gif will be stretched. (See the
Craftsman theme for an example of this).
Locked.gif
A lock image for any directories that have .htaccess
Background image
If you want a background image, specify it in the Font file in the $BODY
section, as in the example above. The $PATH variable will be replaced
with the path to the theme files:
More.gif
When an album page has sub-albums to list, it first shows the 'More.gif'
image.
Next.gif, Prev.gif, Back.gif
For the next and previous arrows and the back button
Icon.gif
Shown at the top left by the parent albums, this is often just the text "Photos"
Border Images
There are many ways to slice up a border, from simple to complex, depending on
the complexity of the border and how much you want to be able to stretch it:
4 pieces Uses Bord_L.gif, Bord_R.gif, Bord_T.gif, Bord_B.gif
(The corners go with the left and right images)
4 piece borders usually don't stretch well so they don't work well on
image_pages. Generally you can cut the corners out of the left and
right images to make:
8 pieces Also includes Bord_TL.gif, Bord_TR.gif, Bord_BL.gif, Bord_BR.gif
8 piece borders allow you to stretch to handle most sized images
12 pieces Also includes Bord_LT.gif, Bord_RT.gif, Bord_LB.gif, Bord_RB.gif
12 pieces allow stretching of borders that have more complex corners (such
as Dominatrix6 or Ivy)
Overlay Borders Can use transparent images that can be partially
overlaying your thumbnail. See below.
Here's how the normal border pieces are laid out:
12 piece borders
TL T TR 8 piece borders 4 piece borders
LT RT TL T TR TTTTTTT
L IMG R L IMG R L IMG R
LB RB BL B BR BBBBBBB
BL B BR
Note that every row of images must be the same height, though the
widths do not have to line up. (i.e., height TL = height T = height TR)
(This is not true about overlay borders!)
Once you've created these files, you can run the simmer_theme tool
(an optional tool download at MarginalHacks.com) and your theme will
then be ready to use!
If you need different borders for the image pages, then use the same
filenames prefixed by 'I' - such as IBord_LT.gif, IBord_RT.gif,...
Overlay borders allow for really fantastic effects with image borders.
Currently there's no support for different overlay borders for images.
For using Overlay borders, create images:
Over_TL.png Over_T.png Over_TR.png
Over_L.png Over_R.png
Over_BL.png Over_B.png Over_BR.png
Then figure out how many pixels of the borders are padding (outside photo)
Then put those values in files: Over_T.pad Over_R.pad Over_B.pad Over_L.pad
See "Themes/FunLand" for a simple example
Multi-lingual Images
If your images have text, you can translate them into other languages
so that albums can be generated in other languages. For example, you
can create a Dutch "More.gif" image and put it in 'lang/nl/More.gif'
in the theme (nl is the language code for Dutch).
When the user runs album in Dutch (album -lang nl) then the theme
will use the Dutch image if found. Themes/Blue has a simple example.
The currently "translated" images are:
More, Back, Next, Prev and Icon
You can create an HTML table that shows the translations immediately
available to themes with -list_html_trans:
% album -list_html_trans > trans.html
Then view trans.html in a browser. Unfortunately different languages
have different charsets, and an HTML page can only have one. The
output is in utf-8, but you can edit the "charset=utf-8" to properly
view language characters in different charsets (such as hebrew).
If you need more words translated for themes, let me know, and if you
create any new language images for a theme, please send them to me!
4: From scratch, Theme API
This is a much heavier job - you need to have a very clear idea of
how you want album to place the images on your page. It might be
a good idea to start with modifying existing themes first to get
an idea of what most themes do. Also look at existing themes
for code examples (see suggestions above).
Themes are directories that contain at the minimum an 'album.th' file.
This is the album page theme template. Often they also contain an 'image.th'
which is the image theme template, and any graphics/css used by the theme.
Album pages contain thumbnails and image pages show full/medium sized images.
The .th files are ePerl, which is perl embedded inside of HTML. They
end up looking a great deal like the actual album and image HTML themselves.
To write a theme, you'll need to understand the ePerl syntax. You can
find more information from the actual ePerl tool available at MarginalHacks
(though this tool is not needed to use themes in album).
There are a plethora of support routines available, but often only
a fraction of these are necessary - it may help to look at other themes
to see how they are generally constructed.
Function table:
Required Functions
Meta() Must be called in the section of HTML
Credit() Gives credit ('this album created by..')
Must be called in the section of HTML
Body_Tag() Called inside the actual tag.
Paths and Options
Option($name) Get the value of an option/configuration setting
Version() Return the album version
Version_Num() Return the album version as just a number (i.e. "3.14")
Path($type) Returns path info for $type of:
album_name The name of this album
dir Current working album directory
album_file Full path to the album index.html
album_path The path of parent directories
theme Full path to the theme directory
img_theme Full path to the theme directory from image pages
page_post_url The ".html" to add onto image pages
parent_albums Array of parent albums (album_path split up)
Image_Page() 1 if we're generating an image page, 0 for album page.
Page_Type() Either 'image_page' or 'album_page'
Theme_Path() The filesystem path to the theme files
Theme_URL() The URL path to the theme files
Header and Footer
isHeader(), pHeader() Test for and print the header
isFooter(), pFooter() Same for the footer
Generally you loop through the images and directories using local variables:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
This will print the name of each image. Our object types are either 'pics'
for images or 'dirs' for the child directories. Here are the object functions:
Objects (type is either 'pics' (default) or 'dirs')
First($type) Get the first image or sub-album object.
Last($type) Last object
Next($obj) Given an object, return the next object
Next($obj,1) Same, loop past end to beginning.
Prev($obj), Prev($obj,1) Similar to Next()
num('pics') or just num() Total number of images in this album
num('dirs') Total number of children/sub-albums
Also:
num('parent_albums') Total number of parents leading up to this album.
Object lookup:
get_obj($num, $type, $loop)
Finds object by number ('pics' or 'dirs').
If $loop is set than the count will wrap around.
Object Properties
Each object (image or child albums) has properties.
Some properties are accessed by a single field:
Get($obj,$field) Get a single field of an object
Field Description
----- ----------
type What type of object? Either 'pics' or 'dirs'
is_movie Boolean: is this a movie?
name Name (cleaned and optionally from captions)
cap Image caption
capfile Optional caption file
alt Alt tag
num_pics [directories only, -dir_thumbs] Num of pics in directory
num_dirs [directories only, -dir_thumbs] Num of dirs in directory
Some properties are accessed by a field and subfield. For example,
each image has information for different sizes: full, medium and thumb
(though 'medium' is optional).
Get($obj,$size,$field) Get a property for a given size
Size Field Description
---- ----- ----------
$size x Width
$size y Height
$size file Filename (without path)
$size path Filename (full path)
$size filesize Filesize in bytes
full tag The tag (either 'image' or 'embed') - only for 'full'
We also have URL information which is access according to the
page it's coming 'from' and the image/page it's pointing 'to':
Get($obj,'URL',$from,$to) Get a URL for an object from -> to
Get($obj,'href',$from,$to) Same but wraps it in an 'href' string.
Get($obj,'link',$from,$to) Same but wraps the object name inside the href link.
From To Description
---- -- ----------
album_page image Image_URL from album_page
album_page thumb Thumbnail from album_page
image_page image Image_URL from image_page
image_page image_page This image page from another image page
image_page image_src The <img src> URL for the image page
image_page thumb Thumbnail from image_page
Directory objects also have:
From To Description
---- -- ----------
album_page dir URL to the directory from it's parent album page
Parent Albums
Parent_Album($num) Get a parent album string (including the href)
Parent_Albums() Return a list of the parent albums strings (including href)
Parent_Album($str) A join($str) call of Parent_Albums()
Back() The URL to go back or up one page.
Images
This_Image The image object for an image page
Image($img,$type) The <img> tags for type of medium,full,thumb
Image($num,$type) Same, but by image number
Name($img) The clean or captioned name for an image
Caption($img) The caption for an image
Child Albums
Name($alb)
Caption($img) The caption for an image
Convenience Routines
Pretty($str,$html,$lines) Pretty formats a name.
If $html then HTML is allowed (i.e., use 0 for <title> and the like)
Currently just puts prefix dates in a smaller font (i.e. '2004-12-03.Folder')
If $lines then multilines are allowed
Currently just follows dates with a 'br' line break.
New_Row($obj,$cols,$off) Should we start a new row after this object?
Use $off if the first object is offset from 1
Image_Array($src,$x,$y,$also,$alt)
Returns an <img> tag given $src, $x,...
Image_Ref($ref,$also,$alt)
Like Image_Array, but $ref can be a hash of
Image_Arrays keyed by language ('_' is default).
album picks the Image_Array by what languages are set.
Border($img,$type,$href,@border)
Border($str,$x,$y,@border)
Create the full bordered image.
See 'Borders' for more information.
If you're creating a theme from scratch, consider adding support for -slideshow.
The easiest way to do this is to cut/paste the "slideshow" code out of an
existing theme.
5: Submitting Themes
Have a custom theme? I'd love to see it, even if it's totally site-specific.
If you have a new theme you'd like to offer the public, feel free to send
it to me and/or a URL where I can see how it looks. Be sure to set the CREDIT
file properly and let me know if you are donating it to MarginalHacks for
everyone to use or if you want it under a specific license.
6: Converting v2.0 Themes to v3.0 Themes
album v2.0 introduced a theme interface which has been rewritten. Most
2.0 themes (especially those that don't use many of the global variables)
will still work, but the interface is deprecated and may disappear in
the near future.
It's not difficult to convert from v2.0 to v3.0 themes.
The v2.0 themes used global variables for many things. These are now
deprecated In v3.0 you should keep track of images and directories in
variables and use the 'iterators' that are supplied, for example:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
Will loop through all the images and print their names.
The chart below shows you how to rewrite the old style calls which
used a global variable with the new style which uses a local variable,
but to use these calls you need to rewrite your loops as above.
Here is a conversion chart for helping convert v2.0 themes to v3.0:
# Global vars shouldn't be used
# ALL DEPRECATED - See new local variable loop methods above
$PARENT_ALBUM_CNT Rewrite with: Parent_Album($num) and Parent_Albums($join)
$CHILD_ALBUM_CNT Rewrite with: my $dir = First('dirs'); $dir=Next($dir);
$IMAGE_CNT Rewrite with: my $img = First('pics'); $pics=Next($pics);
@PARENT_ALBUMS Can instead use: @{Path('parent_albums')}
@CHILD_ALBUMS, @CHILD_ALBUM_NAMES, @CHILD_ALBUM_URLS, ...
# Old global variable modifiers:
# ALL DEPRECATED - See new local variable loop methods above
Next_Image(), Images_Left(), Image_Cnt(), Image_Prev(), Image_Next()
Set_Image_Prev(), Set_Image_Next(), Set_Image_This()
Next_Child_Album(), Child_Album_Cnt(), Child_Albums_Left()
# Paths and stuff
pAlbum_Name() Path('album_name')
Album_Filename() Path('album_file')
pFile($file) print read_file($file)
Get_Opt($option) Option($option)
Index() Option('index')
pParent_Album($str) print Parent_Album($str)
# Parent Albums
Parent_Albums_Left Deprecated, see '$PARENT_ALBUM_CNT' above
Parent_Album_Cnt Deprecated, see '$PARENT_ALBUM_CNT' above
Next_Parent_Album Deprecated, see '$PARENT_ALBUM_CNT' above
pJoin_Parent_Albums print Parent_Albums(\@_)
# Images, using variable '$img'
pImage() Use $img instead and:
print Get($img,'href','image');
print Get($img,'thumb') if Get($img,'thumb');
print Name($img), "</a>";
pImage_Src() print Image($img,'full')
Image_Src() Image($img,'full')
pImage_Thumb_Src() print Image($img,'thumb')
Image_Name() Name($img)
Image_Caption() Caption($img)
pImage_Caption() print Get($img,'Caption')
Image_Thumb() Get($img,'URL','thumb')
Image_Is_Pic() Get($img,'thumb')
Image_Alt() Get($img,'alt')
Image_Filesize() Get($img,'full','filesize')
Image_Path() Get($img,'full','path')
Image_Width() Get($img,'medium','x') || Get($img,'full','x')
Image_Height() Get($img,'medium','y') || Get($img,'full','y')
Image_Filename() Get($img,'full','file')
Image_Tag() Get($img,'full','tag')
Image_URL() Get($img,'URL','image')
Image_Page_URL() Get($img,'URL','image_page','image_page') || Back()
# Child album routines, using variable '$alb'
pChild_Album($nobr) print Get($alb,'href','dir');
my $name = Name($alb);
$name =~ s/<br>//g if $nobr;
print $name,"</a>";
Child_Album_Caption() Caption($alb,'dirs')
pChild_Album_Caption() print Child_Album_Caption($alb)
Child_Album_URL() Get($alb,'URL','dir')
Child_Album_Name() Name($alb)
# Unchanged
Meta() Meta()
Credit() Credit()
album-4.17/Docs/it/txt_2 0000644 0000000 0000000 00000013747 10547227225 013554 0 ustar root root MINI HOW-TO
ITEM: Un semplice album
Presupponendo che album sia stato installato correttamente,
illustriamo qualche semplice esempio. Se dovessero verificarsi degli
errori o problemi si prega di consultare la documentazione
d'installazione.
È necessaria una directory web dove mettere i temi e il vostro
album. In questo esempio useremo /home/httpd/test. Questa directory
dovrà essere visibile con un browser; in questo esempio assumiamo
sia visibile tramite il seguente URL: http://myserver/test/
Si prega di modificare gli esempi appropriatamente per riflettere la
propria configurazione.
Per iniziare, create una directory (ad esempio /home/httpd/test/Foto )
e aggiungeteci alcune immagini (ad esempio da "IMG_001.jpg" a
"IMG_004.jpg") ed eseguite
% album /home/httpd/test/Foto
Ora potete vedere il vostro album con un web browser all'indirizzo:
http://myserver/test/Foto
ITEM: Aggiungere titoli
Create un file /home/httpd/test/Foto/captions.txt con il seguente
contenuto (usate il tasto tabulatore dove è specificato [tab])
- -- captions.txt ---------
IMG_001.jpg [tab] Nome della prima immagine
IMG_002.jpg [tab] Seconda immagine
IMG_003.jpg [tab] Terza immagine [tab] con un titolo!
IMG_004.jpg [tab] Ultima immagine [tab] con un altro titolo
- -------------------------
ed eseguite nuovamente album:
% album /home/httpd/test/Foto
A questo punto dovreste vedere i titoli delle immagini sulle pagine
dell'album.
Create un file /home/httpd/test/Foto/header.txt e scriveteci
un'intestazione. Dopo aver nuovamente eseguito album potrete osservare
la vostra intestazione all'inizio di ogni pagina dell'album appena
generato.
ITEM: Nascondere immagini
Ci sono diversi modi per nascondere foto, file, e directory; per il
momento raggiungeremo lo scopo usando il file con i titoli.
Aggiungete '#'
all'inizio della riga corrispondente all'immagine da nascondere in
captions.txt:
- -- captions.txt ---------
IMG_001.jpg [tab] Prima immagine
#IMG_002.jpg [tab] Seconda immagine
IMG_003.jpg [tab] Un altra immagine [tab] con un titolo!
IMG_004.jpg [tab] Ultima immagine [tab] con un altro titolo
- -------------------------
Eseguite nuovamente album, e osserverete che IMG_002.jpg
non è più inclusa nell'album.
Dato che avevamo già eseguito album prima di
nascondere l'immagine, la directory con l'album conterrà
ancora le immagini intermedie o i thumbnail. Per rimuoverli usate
l'opzione -clean:
% album -clean /home/httpd/test/Foto
ITEM: Temi
Se i temi sono stati istallati correttamente e sono nel vostro
"theme_path", dovreste essere in grado di specificarli con
l'opzione "-theme":
% album -theme Blue /home/httpd/test/Foto
In questo caso l'album verrà generato con il tema "Blue". Se
l'album
dovesse presentarsi con delle immagini non leggibili, molto
probabilmente
il tema specificato non è stato installato in una
directory accessibile tramite il server web. In questo caso si prega di
consultare la documentazione d'installazione.
Album salva automaticamente le opzioni specificate, per cui
eseguendo:
% album /home/httpd/test/Foto
starete sempre usando il tema "Blue". Per disabilitare l'uso di un
tema su può specificare:
% album -no_theme /home/httpd/test/Foto
ITEM: Immagini intermedie
Le immagini a piena risoluzione sono solitamente troppo grandi per un
album sul web. Per questo motivo è possibile generare delle
immagini intermedie da presentare nelle pagine dell'album:
% album -medium 33% /home/httpd/test/Foto
Le immagini originali rimangono accessibili cliccando
sull'immagine intermedia. L'opzione "-just_medium" invece sopprime il
collegamento tra l'immagine intermedia e l'originale:
% album -just_medium /home/httpd/test/Foto
ITEM: Aggiungere i metadati EXIF nei titoli
Per aggiungere, ad esempio, i dati sull'apertura di ogni immagine al
titolo della stessa:
% album -exif "<br>aperture=%Aperture%" /home/httpd/test/
Foto
In questo modo, se l'informazione sull'apertura dell'obiettivo
è presente (specificando "Aperture" tra %), essa verrà
inserita nel titolo dopo una fine riga (<br>)
Per visualizzare anche la focale:
% album -exif "<br>focal: %FocalLength%" /home/httpd/test/
Foto
In modo analogo alla scelta del tema, album, memorizzando le opzioni
specificate
precedentemente, genererà pagine con entrambe le informazioni
(apertura e focale). Per rimuovere l'apertura:
% album -no_exif "<br>aperture=%Aperture%" /home/httpd/
test/Foto
L'opzione "-no_exif" deve essere identica all'opzione "-exif" che si
desidera rimuovere. È anche possibile modificare le opzioni
modificando direttamente il file di configurazione:
/home/httpd/test/Foto/album.conf
ITEM: Generare più album
Supponiamo di avere delle foto di un viaggio in Spagna a di metterle in:
/home/httpd/test/Foto/Spagna/
Eseguendo album in
% album /home/httpd/test/Foto
album riorganizzerà "Foto" in modo da collegare la directory
"Spagna" e genererà un album (con la stessa configurazione) per
le foto del viaggio in Spagna.
Supponiamo di fare un altro viaggio e di creare:
/home/httpd/test/Foto/Italia/
Eseguendo album in
% album /home/httpd/test/Foto,
album rianalizzerà anche la directory "Spagna", la quale nel
frattempo non
ha subito modifiche. Anche se album non rigenererà le pagine o i
thumbnail se non necessario, ricontrollare le immagini non
modificate richiede diverso tempo. Per specificare che si
è unicamente aggiunta una directory:
% album -add /home/httpd/test/Photos/Italia
In questo caso album aggiurnerà la pagina di indice (in "Foto")
e genererà l'album per le foto in "Italia".
ITEM: Tradotto da
Matteo Corti [http://matteocorti.ch/]
Proofread by: Antonio Vilei [http://www.bytetranslation.com/]
album-4.17/Docs/it/Section_5.html 0000644 0000000 0000000 00000047523 12661460265 015310 0 ustar root root
MarginalHacks album - Feature Requests, Bugs, Patches and Troubleshooting
- Documentation
A l b u m
F i v e - - F e a t u r e R e q u e s t s , B u g s , P a t c h e s a n d T r o u b l e s h o o t i n g
1: Feature Requests
If there's something you want added to album, first make sure
it doesn't already exist! Check the man page or the usage:
% man album% album -h
Also see -more and -usage options.
If you don't see it there, consider writing a patch or a plugin.
2: Bug reports
Before you submit a bug, please make sure you have the most current release of album!
When submitting a bug, I need to know at least:
1) Your operating system
2) The exact problem and the exact error messages
I'd also like to know, if possible:
1) The exact album command you ran
2) The output from the command
And I generally also need the debug output of album:
% album -d
Finally, make sure that you've got the most current
version of album, and the most current themes as well.
3: Writing Patches, Modifying album
If you want to modify album, you might want to check with me
first to make sure it's not already on my development plate.
If not, then consider writing it as a plugin instead of patching
the album source. This avoids adding complexity to album for
features that may not be globally used.
If it needs to go into album (for example, if it's a bug), then
please make sure to first download the most recent copy of album
first, then patch that and send me either a diff, a patch, or the
full script. If you comment off the changes you make that'd be great too.
4: Known Bugs
v3.11: -clear_* and -no_* doesn't clear out parent directory options.
v3.10: Burning CDs doesn't quite work with theme absolute paths.
v3.00: Array and code options are saved backwards, for example:
"album -lang aa .. ; album -lang bb .." will still use language 'aa'
Also, in some cases array/code options in sub-albums will not
be ordered right the first time album adds them and you may
need to rerun album. For example:
"album -exif A photos/ ; album -exif B photos/sub"
Will have "B A" for the sub album, but "A B" after: "album photos/sub"
5: PROBLEM: My index pages are too large!
I get many requests to break up the index pages after reaching a certain
threshold of images.
The problem is that this is hard to manage - unless the index pages are
treated just like sub-albums, then you now have three major components
on a page, more indexes, more albums, and thumbnails. And not only is
that cumbersome, but it would require updating all the themes.
Hopefully the next major release of album will do this, but until then
there is another, easier solution - just break the images up into
subdirectories before running album.
I have a tool that will move new images into subdirectories for you and
then runs album:
in_album6:ERROR: no delegate for this image format (./album)
You have the album script in your photo directory and it can't make
a thumbnail of itself! Either:
1) Move album out of the photo directory (suggested)
2) Run album with -known_images
7:ERROR: no delegate for this image format (some_non_image_file)
Don't put non-images in your photo directory, or else run with -known_images.
8:ERROR: no delegate for this image format (some.jpg)9:ERROR: identify: JPEG library is not available (some.jpg)
Your ImageMagick installation isn't complete and doesn't know how
to handle the given image type.
10:ERROR: Can't get [some_image] size from -verbose output.
ImageMagick doesn't know the size of the image specified. Either:
1) Your ImageMagick installation isn't complete and can't handle the image type.
2) You are running album on a directory with non-images in it without
using the -known_images option.
If you're a gentoo linux user and you see this error, then run this command
as root (thanks Alex Pientka):
USE="avi gif jpeg mpeg png quicktime tiff" emerge imagemagick
album-4.17/Docs/it/txt_1 0000655 0000000 0000000 00000011534 10716453531 013544 0 ustar root root Installation
ITEM: Minimum Requirements
1) The album perl script
2) ImageMagick tools (specifically 'convert')
Put the 'album' script and the ImageMagick tools somewhere in your PATH,
or else call 'album' by it's full path (and specify the full path to
convert either in the album script or in the album configuration files.
ITEM: Initial Configuration
The first time you run album it will ask you a few questions to
setup the configuration for you. If you're on UNIX/OSX, then you
can run the first time as root so that it sets up the global configuration
and themes for everyone instead of just the current user.
ITEM: Optional Installation
3) Themes
4) ffmpeg (for movie thumbnails)
5) jhead (for reading EXIF info)
6) plugins
7) Various tools available at MarginalHacks.com
ITEM: UNIX
Most UNIX distros come with ImageMagick and perl, so just download
the album script and themes (#1 and #3 above) and you're done.
To test your install, run the script on a directory with images:
% album /path/to/my/photos/
ITEM: Debian UNIX
album is in debian stable, though right now it's a bit stale.
I recommend getting the latest version from MarginalHacks.
You can save the .deb package, and then, as root, run:
% dpkg -i album.deb
ITEM: Macintosh OSX
It works fine on OSX, but you have to run it from a terminal window. Just
install the album script and ImageMagick tools, and type in the path to album,
any album options you want, and then the path to the directory with the
photos in them (all separated by spaces), such as:
% album -theme Blue /path/to/my/photos/
ITEM: Win95, Win98, Win2000/Win2k, WinNT, WinXP
(Windows 95, Windows 98, Windows 2000, Windows NT, Windows XP)
There are two methods to run perl scripts on Windows, either using ActivePerl
or Cygwin.
ActivePerl is simpler and allows you to run album from a DOS prompt,
though I've heard that it doesn't work with themes.
Cygwin is a bulkier but more robust package that gives you access to
a bunch of UNIX like utilities, and album is run from a bash (UNIX shell)
prompt.
Cygwin method
-------------
1) Install Cygwin
Choose packages: perl, ImageMagick, bash
Do not use the normal ImageMagick install! You must use the Cygwin ImageMagick packages!
2) Install album in bash path or call using absolute path:
bash% album /some/path/to/photos
3) If you want exif info in your captions, you need the Cygwin version of jheadActivePerl method
-----------------
1) Install ImageMagick for Windows
2) Install ActivePerl, Full install (no need for PPM profile)
Choose: "Add perl to PATH" and "Create Perl file extension association"
3) If Win98: Install tcap in path
4) Save album as album.pl in windows path
5) Use dos command prompt to run:
C:> album.pl C:\some\path\to\photosNote: Some versions of Windows (2000/NT at least) have their
own "convert.exe" in the c:\windows\system32 directory (an NTFS utility?).
If you have this, then you either need to edit your path variable,
or else just specify the full path to convert in your album script.
ITEM: How do I edit the Windows path?
Windows NT4 Users
Right Click on My Computer, select Properties.
Select Environment tab.
In System Variables box select Path.
In Value edit box add the new paths separated by semicolons
Press OK/Set, press OK again.
Windows 2000 Users
Right Click My Computer, select Properties.
Select Advanced tab.
Click Environment Variables.
In System Variables box select double-click Path
In Value edit box add the new paths separated by semicolons
Press OK/Set, press OK again.
Windows XP Users
Click My Computer, select Change a Setting.
Double click System.
Select Advanced tab.
Select Environment Variables.
In System Variables box select double-click Path
In Value edit box add the new paths separated by semicolons
Press OK.
ITEM: Macintosh OS9
I don't have any plans to port this to OS9 - I don't know what
the state of shells and perl is for pre-OSX. If you have it working
on OS9, let me know.
album-4.17/Docs/it/flag.png 0000644 0000000 0000000 00000000227 10425737355 014202 0 ustar root root PNG
IHDR m?h bKGD tIME1U 9IDAT8cduπ\}LCH
ܻ*KR0j< a
> IENDB` album-4.17/Docs/it/Section_4.html 0000644 0000000 0000000 00000047502 12661460265 015304 0 ustar root root
MarginalHacks album - Configuration Files
- Documentation
A l b u m
F o u r - - C o n f i g u r a t i o n F i l e s
1: Configuration Files
Album behavior can be controlled through command-line options, such as:
% album -no_known_images% album -geometry 133x100% album -exif "File: %File name% " -exif "taken with %Camera make%"
But these options can also be specified in a configuration file:
# Example configuration file # comments are ignored
known_images 0 # known_images=0 is same as no_known_images
geometry 133x100
exif "File: %File name% "
exif "taken with %Camera make%"
The configuration file format is one option per line optionally followed
by whitespace and the option value. Boolean options can be set without
the option value or can be cleared/set with 0 and 1.
2: Location Of Configuration Files
album looks for configuration files in a few locations, in order:
/etc/album/conf System-wide settings
/etc/album.conf System-wide settings
$BASENAME/album.conf In the 'album' install directory
$HOME/.albumrc User specific settings
$HOME/.album.conf User specific settings
$DOT/album.conf User specific (I keep my dot files elsewhere)
$USERPROFILE/album.conf For Windows (C:\Documents and Settings\TheUser)
album also looks for album.conf files inside the photo album directories.
Sub-albums can also have album.conf which will alter the settings
from parent directories (this allows you to, for example, have a
different theme for part of your photo album). Any album.conf files
in your photo album directories will configure the album and any sub-albums
unless overridden by any album.conf settings found in a sub-album.
As an example, consider a conf for a photo album at 'images/album.conf':
theme Dominatrix6
columns 3
And another conf inside 'images/europe/album.conf':
theme Blue
crop
album will use the Dominatrix6 theme for the images/ album and all of
it's sub-albums except for the images/europe/ album which will use
the Blue theme. All of the images/ album and sub-albums will have
3 columns since that wasn't changed in the images/europe/ album, however
all of the thumbnails in images/europe/ and all of it's sub-albums
will be cropped due to the 'crop' configuration setting.
3: Saving Options
Whenever you run an album, the command-line options are saved in
an album.conf inside the photo album directory. If an album.conf
already exists it will be modified not overwritten, so it is safe
to edit this file in a text editor.
This makes it easy to make subsequent calls to album. If you
first generate an album with:
% album -crop -no_known_images -theme Dominatrix6 -sort date images/
Then the next time you call album you can just:
% album images/
This works for sub-albums as well:
% album images/africa/
Will also find all of the saved options.
Some 'one-time only' options are not saved for obvious reasons, such
as -add, -clean, -force, -depth, etc..
Running album multiple times on the same directories can
get confusing if you don't understand how options are saved.
Here are some examples.
Premises:
1) Command-line options are processed before conf options found
in the album directory.
2) Album should run the same the next time you call it if you
don't specify any options.
For example, consider running album twice on a directory:
% album -exif "comment 1" photos/spain% album photos/spain
The second time you run album you'll still get the "comment 1"
exif comment in your photos directory.
3) Album shouldn't end up with multiple copies of the same array
options if you keep calling it with the same command-line
For example:
% album -exif "comment 1" photos/spain% album -exif "comment 1" photos/spain
The second time you run album you will NOT end up with multiple
copies of the "comment 1" exif comment.
However, please note that if you re-specify the same options
each time, album may run slower because it thinks it needs to
regenerate your html!
As an example, if you run:
% album -medium 640x640 photos/spain
(then later...)
% album -medium 640x640 photos/spain
Then the second time will unnecessarily regenerate all your
medium images. This is much slower.
It's better to specify command-line options only the first time
and let them get saved, such as:
% album -medium 640x640 photos/spain
(then later...)
% album photos/spain
Unfortunately these constraints mean that any new array options will
be put at the beginning of your list of -exif options.
For example:
% album -exif "comment 1" photos/spain% album -exif "comment 2" photos/spain
The comments will actually be ordered "comment 2" then "comment 1"
To specify exact ordering, you may need to re-specify all options.
Either specify "comment 1" to put it back on top:
% album -exif "comment 1" photos/spain
Or just specify all the options in the order you want:
% album -exif "comment 1" -exif "comment 2" photos/spain
Sometimes it may be easier to merely edit the album.conf file directly
to make any changes.
Finally, this only allows us to accumulate options.
We can delete options using -no and -clear, see the section on Options,
these settings (or clearings) will also be saved from run to run.
1: Un semplice album
Presupponendo che album sia stato installato correttamente,
illustriamo qualche semplice esempio. Se dovessero verificarsi degli
errori o problemi si prega di consultare la documentazione
d'installazione.
È necessaria una directory web dove mettere i temi e il vostro
album. In questo esempio useremo /home/httpd/test. Questa directory
dovrà essere visibile con un browser; in questo esempio assumiamo
sia visibile tramite il seguente URL: http://myserver/test/
Si prega di modificare gli esempi appropriatamente per riflettere la
propria configurazione.
Per iniziare, create una directory (ad esempio /home/httpd/test/Foto )
e aggiungeteci alcune immagini (ad esempio da "IMG_001.jpg" a
"IMG_004.jpg") ed eseguite
% album /home/httpd/test/Foto
Ora potete vedere il vostro album con un web browser all'indirizzo:
http://myserver/test/Foto
2: Aggiungere titoli
Create un file /home/httpd/test/Foto/captions.txt con il seguente
contenuto (usate il tasto tabulatore dove è specificato [tab])
- -- captions.txt ---------
IMG_001.jpg [tab] Nome della prima immagine
IMG_002.jpg [tab] Seconda immagine
IMG_003.jpg [tab] Terza immagine [tab] con un titolo!
IMG_004.jpg [tab] Ultima immagine [tab] con un altro titolo
- -------------------------
ed eseguite nuovamente album:
% album /home/httpd/test/Foto
A questo punto dovreste vedere i titoli delle immagini sulle pagine
dell'album.
Create un file /home/httpd/test/Foto/header.txt e scriveteci
un'intestazione. Dopo aver nuovamente eseguito album potrete osservare
la vostra intestazione all'inizio di ogni pagina dell'album appena
generato.
3: Nascondere immagini
Ci sono diversi modi per nascondere foto, file, e directory; per il
momento raggiungeremo lo scopo usando il file con i titoli.
Aggiungete '#'
all'inizio della riga corrispondente all'immagine da nascondere in
captions.txt:
- -- captions.txt ---------
IMG_001.jpg [tab] Prima immagine
#IMG_002.jpg [tab] Seconda immagine
IMG_003.jpg [tab] Un altra immagine [tab] con un titolo!
IMG_004.jpg [tab] Ultima immagine [tab] con un altro titolo
- -------------------------
Eseguite nuovamente album, e osserverete che IMG_002.jpg
non è più inclusa nell'album.
Dato che avevamo già eseguito album prima di
nascondere l'immagine, la directory con l'album conterrà
ancora le immagini intermedie o i thumbnail. Per rimuoverli usate
l'opzione -clean:
% album -clean /home/httpd/test/Foto4: Temi
Se i temi sono stati istallati correttamente e sono nel vostro
"theme_path", dovreste essere in grado di specificarli con
l'opzione "-theme":
% album -theme Blue /home/httpd/test/Foto
In questo caso l'album verrà generato con il tema "Blue". Se
l'album
dovesse presentarsi con delle immagini non leggibili, molto
probabilmente
il tema specificato non è stato installato in una
directory accessibile tramite il server web. In questo caso si prega di
consultare la documentazione d'installazione.
Album salva automaticamente le opzioni specificate, per cui
eseguendo:
% album /home/httpd/test/Foto
starete sempre usando il tema "Blue". Per disabilitare l'uso di un
tema su può specificare:
% album -no_theme /home/httpd/test/Foto5: Immagini intermedie
Le immagini a piena risoluzione sono solitamente troppo grandi per un
album sul web. Per questo motivo è possibile generare delle
immagini intermedie da presentare nelle pagine dell'album:
% album -medium 33% /home/httpd/test/Foto
Le immagini originali rimangono accessibili cliccando
sull'immagine intermedia. L'opzione "-just_medium" invece sopprime il
collegamento tra l'immagine intermedia e l'originale:
% album -just_medium /home/httpd/test/Foto6: Aggiungere i metadati EXIF nei titoli
Per aggiungere, ad esempio, i dati sull'apertura di ogni immagine al
titolo della stessa:
% album -exif "<br>aperture=%Aperture%" /home/httpd/test/
Foto
In questo modo, se l'informazione sull'apertura dell'obiettivo
è presente (specificando "Aperture" tra %), essa verrà
inserita nel titolo dopo una fine riga (<br>)
Per visualizzare anche la focale:
% album -exif "<br>focal: %FocalLength%" /home/httpd/test/
Foto
In modo analogo alla scelta del tema, album, memorizzando le opzioni
specificate
precedentemente, genererà pagine con entrambe le informazioni
(apertura e focale). Per rimuovere l'apertura:
% album -no_exif "<br>aperture=%Aperture%" /home/httpd/
test/Foto
L'opzione "-no_exif" deve essere identica all'opzione "-exif" che si
desidera rimuovere. È anche possibile modificare le opzioni
modificando direttamente il file di configurazione:
/home/httpd/test/Foto/album.conf
7: Generare più album
Supponiamo di avere delle foto di un viaggio in Spagna a di metterle in:
/home/httpd/test/Foto/Spagna/
Eseguendo album in
% album /home/httpd/test/Foto
album riorganizzerà "Foto" in modo da collegare la directory
"Spagna" e genererà un album (con la stessa configurazione) per
le foto del viaggio in Spagna.
Supponiamo di fare un altro viaggio e di creare:
/home/httpd/test/Foto/Italia/
Eseguendo album in
% album /home/httpd/test/Foto,
album rianalizzerà anche la directory "Spagna", la quale nel
frattempo non
ha subito modifiche. Anche se album non rigenererà le pagine o i
thumbnail se non necessario, ricontrollare le immagini non
modificate richiede diverso tempo. Per specificare che si
è unicamente aggiunta una directory:
% album -add /home/httpd/test/Photos/Italia
In questo caso album aggiurnerà la pagina di indice (in "Foto")
e genererà l'album per le foto in "Italia".
8: Tradotto da
Matteo Corti [http://matteocorti.ch/]
Proofread by: Antonio Vilei [http://www.bytetranslation.com/]
album-4.17/Docs/it/txt_7 0000655 0000000 0000000 00000023653 11015005334 013542 0 ustar root root Plugins, Usage, Creation,..
ITEM: What are Plugins?
Plugins are snippets of code that allow you to modify the behavior
of album. They can be as simple as a new way to create EXIF captions,
to something as complex as creating the album based on a database of
images instead of using the filesystem hierarchy.
ITEM: Installing Plugins and plugin support
There are a number of plugins available with the standard installation of
album. If you are upgrading album with plugins from an earlier version
of album that did not have plugins (pre v3.10), you may need to once do:
% album -configure
You will not need to do this with future upgrades of album.
This will install the current plugins into one of the default
plugin directories - album will look for plugins in a number of
locations, the default locations are:
/etc/album/plugins/
/usr/share/album/plugins/
$HOME/.album/plugins/
In reality, these are 'plugins' directories found in the set of
locations specified by '--data_path' - hence the defaults are:
/etc/album/
/usr/share/album/
$HOME/.album/
You can specify a new location with --data_path and then add a 'plugins'
directory to that location, or use the --plugin_path option.
Plugins usually end with the ".alp" prefix, but you do not need
to specify this prefix when using plugins. For example, if you
have a plugin installed at:
/etc/album/plugins/utils/mv.alp
Then you would specify the plugin as: utils/mv
ITEM: Loading/Unloading Plugins
To list all the currently installed plugins:
% album -list_plugins
To show information about a specific plugin (using 'utils/mv' as an example):
% album -plugin_info utils/mv
Plugins will be saved in the configuration for a given album, so
they don't need to be respecified every time (excluding one-time
plugins such as 'utils/mv')
You can use -no_plugin and -clear_plugin to turn off plugins that have
been saved in an album configuration. As with normal album options,
-no_plugin will turn off a specific plugin, and -clear_plugin will
turn off all plugins. Any saved plugin options for that plugin will be
erased as well.
ITEM: Plugin Options
A few plugins may be able to take command-line options, to view usage
for these plugins:
% album -plugin_usage utils/mv
But when specifying plugin options, you need to tell album which plugin
the option belongs to. Instead of specifying as a normal album option:
% album -some_option
You prefix the option with the plugin name followed by a colon:
% album -some_plugin:some_option
For example, you can specify the generated 'index' created by
the 'utils/capindex' plugin.
% album -plugin utils/capindex -utils/capindex:index blah.html
That's a bit unwieldy. You can shorten the name of the plugin as
long as it doesn't conflict with another plugin you've loaded (by
the same name):
% album -plugin utils/capindex -capindex:index
Obviously the other types of options (strings, numbers and arrays) are
possible and use the same convention. They are saved in album configuration
the same as normal album options.
One caveat: As mentioned, once we use a plugin on an album it is saved
in the configuration. If you want to add options to an album that is
already configured to use a plugin, you either need to mention the plugin
again, or else use the full name when specifying the options (otherwise
we won't know what the shortened option belongs to).
For example, consider an imaginary plugin:
% album -plugin some/example/thumbGen Photos/Spain
After that, let's say we want to use the thumbGen boolean option "fast".
This will not work:
% album -thumbGen:fast Photos/Spain
But either of these will work:
% album -plugin some/example/thumbGen -thumbGen:fast blah.html Photos/Spain% album -some/example/thumbGen:fast Photos/Spain
ITEM: Writing Plugins
Plugins are small perl modules that register "hooks" into the album code.
There are hooks for most of the album functionality, and the plugin hook
code can often either replace or supplement the album code. More hooks
may be added to future versions of album as needed.
You can see a list of all the hooks that album allows:
% album -list_hooks
And you can get specific information about a hook:
% album -hook_info <hook_name>
We can use album to generate our plugin framework for us:
% album -create_plugin
For this to work, you need to understand album hooks and album options.
We can also write the plugin by hand, it helps to use an already
written plugin as a base to work off of.
In our plugin we register the hook by calling the album::hook() function.
To call functions in the album code, we use the album namespace.
As an example, to register code for the clean_name hook our plugin calls:
album::hook($opt,'clean_name',\&my_clean);
Then whenever album does a clean_name it will also call the plugin
subroutine called my_clean (which we need to provide).
To write my_clean let's look at the clean_name hook info:
Args: ($opt, 'clean_name', $name, $iscaption)
Description: Clean a filename for printing.
The name is either the filename or comes from the caption file.
Returns: Clean name
The args that the my_clean subroutine get are specified on the first line.
Let's say we want to convert all names to uppercase. We could use:
sub my_clean {
my ($opt, $hookname, $name, $iscaption) = @_;
return uc($name);
}
Here's an explanation of the arguments:
$opt This is the handle to all of album's options.
We didn't use it here. Sometimes you'll need it if you
call any of albums internal functions. This is also true
if a $data argument is supplied.
$hookname In this case it will be 'clean_name'. This allows us
to register the same subroutine to handle different hooks.
$name This is the name we are going to clean.
$iscaption This tells us whether the name came from a caption file.
To understand any of the options after the $hookname you
may need to look at the corresponding code in album.
In this case we only needed to use the supplied $name, we called
the perl uppercase routine and returned that. The code is done, but now
we need to create the plugin framework.
Some hooks allow you to replace the album code. For example, you
could write plugin code that can generate thumbnails for pdf files
(using 'convert' is one way to do this). We can register code for
the 'thumbnail' hook, and just return 'undef' if we aren't looking
at a pdf file, but when we see a pdf file, we create a thumbnail
and then return that. When album gets back a thumbnail, then it
will use that and skip it's own thumbnail code.
Now let's finish writing our uppercase plugin. A plugin must do the following:
1) Supply a 'start_plugin' routine. This is where you will likely
register hooks and specify any command-line options for the plugin.
2) The 'start_plugin' routine must return the plugin info
hash, which needs the following keys defined:
author => The author name
href => A URL (or mailto, of course) for the author
version => Version number for this plugin
description => Text description of the plugin
3) End the plugin code by returning '1' (similar to a perl module).
Here is our example clean_name plugin code in a complete plugin:
sub start_plugin {
my ($opt) = @_;
album::hook($opt,'clean_name',\&my_clean);
return {
author => 'David Ljung Madison',
href => 'http://MarginalHacks.com/',
version => '1.0',
description => "Conver image names to uppercase",
};
}
sub my_clean {
return uc($name);
}
1;
Finally, we need to save this somewhere. Plugins are organized in the
plugin directory hierarchy, we could save this in a plugin directory as:
captions/formatting/NAME.alp
In fact, if you look in examples/formatting/NAME.alp you'll find that
there's a plugin already there that does essentially the same thing.
If you want your plugin to accept command-line options, use 'add_option.'
This must be done in the start_plugin code. Some examples:
album::add_option(1,"fast",album::OPTION_BOOL, usage=>"Do it fast");
album::add_option(1,"name", album::OPTION_STR, usage=>"Your name");
album::add_option(1,"colors",album::OPTION_ARR, usage=>"Color list");
For more info, see the 'add_option' code in album and see all of the uses
of it (at the top of album and in plugins that use 'add_option')
To read an option that the user may have set, we use option():
my $fast = album::option($opt, "fast");
If the user gave a bad value for an option, you can call usage():
album::usage("-colors array can only include values [red, green, blue]");
If your plugin needs to load modules that are not part of the
standard Perl distribution, please do this conditionally. For
an example of this, see plugins/extra/rss.alp.
You can also call any of the routines found in the album script
using the album:: namespace. Make sure you know what you are doing.
Some useful routines are:
album::add_head($opt,$data, "<meta name='add_this' content='to the <head>'>");
album::add_header($opt,$data, "<p>This gets added to the album header");
album::add_footer($opt,$data, "<p>This gets added to the album footer");
The best way to figure out how to write plugins is to look at other
plugins, possibly copying one that is similar to yours and working
off of that. Plugin development tools may be created in the future.
Again, album can help create the plugin framework for you:
% album -create_plugin
album-4.17/Docs/it/langmenu 0000644 0000000 0000000 00000001507 12661460265 014313 0 ustar root root English Deutsch Español Français Nederlands Русский Italiano magyar
album-4.17/Docs/it/langhtml 0000644 0000000 0000000 00000001602 12661460265 014307 0 ustar root root
album-4.17/Docs/it/Section_1.html 0000644 0000000 0000000 00000047312 12661460265 015300 0 ustar root root
MarginalHacks album - Installation
- Documentation
1: Minimum Requirements
1) The album perl script
2) ImageMagick tools (specifically 'convert')
Put the 'album' script and the ImageMagick tools somewhere in your PATH,
or else call 'album' by it's full path (and specify the full path to
convert either in the album script or in the album configuration files.
2: Initial Configuration
The first time you run album it will ask you a few questions to
setup the configuration for you. If you're on UNIX/OSX, then you
can run the first time as root so that it sets up the global configuration
and themes for everyone instead of just the current user.
3: Optional Installation
3) Themes
4) ffmpeg (for movie thumbnails)
5) jhead (for reading EXIF info)
6) plugins
7) Various tools available at MarginalHacks.com
4: UNIX
Most UNIX distros come with ImageMagick and perl, so just download
the album script and themes (#1 and #3 above) and you're done.
To test your install, run the script on a directory with images:
% album /path/to/my/photos/5: Debian UNIX
album is in debian stable, though right now it's a bit stale.
I recommend getting the latest version from MarginalHacks.
You can save the .deb package, and then, as root, run:
% dpkg -i album.deb6: Macintosh OSX
It works fine on OSX, but you have to run it from a terminal window. Just
install the album script and ImageMagick tools, and type in the path to album,
any album options you want, and then the path to the directory with the
photos in them (all separated by spaces), such as:
% album -theme Blue /path/to/my/photos/7: Win95, Win98, Win2000/Win2k, WinNT, WinXP
(Windows 95, Windows 98, Windows 2000, Windows NT, Windows XP)
There are two methods to run perl scripts on Windows, either using ActivePerl
or Cygwin.
ActivePerl is simpler and allows you to run album from a DOS prompt,
though I've heard that it doesn't work with themes.
Cygwin is a bulkier but more robust package that gives you access to
a bunch of UNIX like utilities, and album is run from a bash (UNIX shell)
prompt.
Cygwin method
-------------
1) Install Cygwin
Choose packages: perl, ImageMagick, bash
Do not use the normal ImageMagick install! You must use the Cygwin ImageMagick packages!
2) Install album in bash path or call using absolute path:
bash% album /some/path/to/photos
3) If you want exif info in your captions, you need the Cygwin version of jheadActivePerl method
-----------------
1) Install ImageMagick for Windows
2) Install ActivePerl, Full install (no need for PPM profile)
Choose: "Add perl to PATH" and "Create Perl file extension association"
3) If Win98: Install tcap in path
4) Save album as album.pl in windows path
5) Use dos command prompt to run:
C:> album.pl C:\some\path\to\photosNote: Some versions of Windows (2000/NT at least) have their
own "convert.exe" in the c:\windows\system32 directory (an NTFS utility?).
If you have this, then you either need to edit your path variable,
or else just specify the full path to convert in your album script.
8: How do I edit the Windows path?Windows NT4 Users
Right Click on My Computer, select Properties.
Select Environment tab.
In System Variables box select Path.
In Value edit box add the new paths separated by semicolons
Press OK/Set, press OK again.
Windows 2000 Users
Right Click My Computer, select Properties.
Select Advanced tab.
Click Environment Variables.
In System Variables box select double-click Path
In Value edit box add the new paths separated by semicolons
Press OK/Set, press OK again.
Windows XP Users
Click My Computer, select Change a Setting.
Double click System.
Select Advanced tab.
Select Environment Variables.
In System Variables box select double-click Path
In Value edit box add the new paths separated by semicolons
Press OK.
9: Macintosh OS9
I don't have any plans to port this to OS9 - I don't know what
the state of shells and perl is for pre-OSX. If you have it working
on OS9, let me know.
album-4.17/Docs/it/txt_4 0000655 0000000 0000000 00000012757 10313504407 013547 0 ustar root root Configuration Files
ITEM: Configuration Files
Album behavior can be controlled through command-line options, such as:
% album -no_known_images% album -geometry 133x100% album -exif "File: %File name% " -exif "taken with %Camera make%"
But these options can also be specified in a configuration file:
# Example configuration file # comments are ignored
known_images 0 # known_images=0 is same as no_known_images
geometry 133x100
exif "File: %File name% "
exif "taken with %Camera make%"
The configuration file format is one option per line optionally followed
by whitespace and the option value. Boolean options can be set without
the option value or can be cleared/set with 0 and 1.
ITEM: Location Of Configuration Files
album looks for configuration files in a few locations, in order:
/etc/album/conf System-wide settings
/etc/album.conf System-wide settings
$BASENAME/album.conf In the 'album' install directory
$HOME/.albumrc User specific settings
$HOME/.album.conf User specific settings
$DOT/album.conf User specific (I keep my dot files elsewhere)
$USERPROFILE/album.conf For Windows (C:\Documents and Settings\TheUser)
album also looks for album.conf files inside the photo album directories.
Sub-albums can also have album.conf which will alter the settings
from parent directories (this allows you to, for example, have a
different theme for part of your photo album). Any album.conf files
in your photo album directories will configure the album and any sub-albums
unless overridden by any album.conf settings found in a sub-album.
As an example, consider a conf for a photo album at 'images/album.conf':
theme Dominatrix6
columns 3
And another conf inside 'images/europe/album.conf':
theme Blue
crop
album will use the Dominatrix6 theme for the images/ album and all of
it's sub-albums except for the images/europe/ album which will use
the Blue theme. All of the images/ album and sub-albums will have
3 columns since that wasn't changed in the images/europe/ album, however
all of the thumbnails in images/europe/ and all of it's sub-albums
will be cropped due to the 'crop' configuration setting.
ITEM: Saving Options
Whenever you run an album, the command-line options are saved in
an album.conf inside the photo album directory. If an album.conf
already exists it will be modified not overwritten, so it is safe
to edit this file in a text editor.
This makes it easy to make subsequent calls to album. If you
first generate an album with:
% album -crop -no_known_images -theme Dominatrix6 -sort date images/
Then the next time you call album you can just:
% album images/
This works for sub-albums as well:
% album images/africa/
Will also find all of the saved options.
Some 'one-time only' options are not saved for obvious reasons, such
as -add, -clean, -force, -depth, etc..
Running album multiple times on the same directories can
get confusing if you don't understand how options are saved.
Here are some examples.
Premises:
1) Command-line options are processed before conf options found
in the album directory.
2) Album should run the same the next time you call it if you
don't specify any options.
For example, consider running album twice on a directory:
% album -exif "comment 1" photos/spain% album photos/spain
The second time you run album you'll still get the "comment 1"
exif comment in your photos directory.
3) Album shouldn't end up with multiple copies of the same array
options if you keep calling it with the same command-line
For example:
% album -exif "comment 1" photos/spain% album -exif "comment 1" photos/spain
The second time you run album you will NOT end up with multiple
copies of the "comment 1" exif comment.
However, please note that if you re-specify the same options
each time, album may run slower because it thinks it needs to
regenerate your html!
As an example, if you run:
% album -medium 640x640 photos/spain
(then later...)
% album -medium 640x640 photos/spain
Then the second time will unnecessarily regenerate all your
medium images. This is much slower.
It's better to specify command-line options only the first time
and let them get saved, such as:
% album -medium 640x640 photos/spain
(then later...)
% album photos/spain
Unfortunately these constraints mean that any new array options will
be put at the beginning of your list of -exif options.
For example:
% album -exif "comment 1" photos/spain% album -exif "comment 2" photos/spain
The comments will actually be ordered "comment 2" then "comment 1"
To specify exact ordering, you may need to re-specify all options.
Either specify "comment 1" to put it back on top:
% album -exif "comment 1" photos/spain
Or just specify all the options in the order you want:
% album -exif "comment 1" -exif "comment 2" photos/spain
Sometimes it may be easier to merely edit the album.conf file directly
to make any changes.
Finally, this only allows us to accumulate options.
We can delete options using -no and -clear, see the section on Options,
these settings (or clearings) will also be saved from run to run.
album-4.17/Docs/it/txt_3 0000655 0000000 0000000 00000036071 12475152364 013555 0 ustar root root Running album / Basic Options
ITEM: Basic execution
Create a directory with nothing but images in it. The album script and
other tools should not go here. Then run album specifying that directory:
% album /example/path/to/images/
Or, if you're in the /example/path/to directory:
% album images/
When it's done, you'll have a photo album inside that directory starting
with images/index.html.
If that path is in your web server, then you can view it with your
browser. If you can't find it, talk to your sysadmin.
ITEM: Options
There are three types of options. Boolean options, string/num options
and array options. Boolean options can be turned off by prepending -no_:
% album -no_image_pages
String and number values are specified after a string option:
% album -type gif
% album -columns 5
Array options can be specified two ways, with one argument at a time:
% album -exif hi -exif there
Or multiple arguments using the '--' form:
% album --exif hi there --
You can remove specific array options with -no_<option>
and clear all the array options with -clear_<option>.
To clear out array options (say, from the previous album run):
% album -clear_exif -exif "new exif"
(The -clear_exif will clear any previous exif settings and then the
following -exif option will add a new exif comment)
And finally, you can remove specific array options with 'no_':
% album -no_exif hi
Which could remove the 'hi' exif value and leave the 'there' value intact.
Also see the section on Saving Options.
To see a brief usage:
% album -h
To see more options:
% album -more
And even more full list of options:
% album -usage=2
You can specify numbers higher than 2 to see even more options (up to about 100)
Plugins can also have options with their own usage.
ITEM: Themes
Themes are an essential part of what makes album compelling.
You can customize the look of your photo album by downloading a
theme from MarginalHacks or even writing your own theme to match
your website.
To use a theme, download the theme .tar or .zip and unpack it.
Themes are found according to the -theme_path setting, which is
a list of places to look for themes. Those paths need to be somewhere
under the top of your web directory, but not inside a photo album
directory. It needs to be accessible from a web browser.
You can either move the theme into one of the theme_paths that album
is already using, or make a new one and specify it with the -theme_path
option. (-theme_path should point to the directory the theme is in,
not the actual theme directory itself)
Then call album with the -theme option, with or without -theme_path:
% album -theme Dominatrix6 my_photos/
% album -theme Dominatrix6 -theme_path /home/httpd/album/Themes/ my_photos/
You can also create your own themes pretty easily, this is covered
later in this documentation.
ITEM: Sub-albums
Make directories inside your first directory and put images in that.
Run album again, and it will run through all the child directories
and create sub-albums of the first album.
If you make changes to just a sub-album, you can run album on that
and it will keep track of all the parent links.
If you don't want to traverse down the tree of directories, you
can limit it with the depth option. Example:
% album images/ -depth 1
Will only generate photo albums for the images directory.
If you have many sub-albums, and you want to add a new sub-album
without regenerating all the previous sub-albums, then you can use -add:
% album -add images/new_album/
Which will add the new_album to the HTML for 'images/' and then
generate the thumbs and HTML for everything inside 'images/new_album/'
ITEM: Avoiding Thumbnail Regeneration
album tries to avoid unnecessary work. It only creates thumbnails if
they don't exist and haven't changed. This speeds up successive runs
of album.
This can cause a problem if you change the size or cropping of your
thumbnails, because album won't realize that the thumbnails have changed.
You can use the force option to force album to regenerate thumbnails:
% album -force images/
But you shouldn't need to use -force every time.
ITEM: Cleaning Out The Thumbnails
If you remove images from an album then you'll have leftover thumbs and HTML.
You can remove them by running album once with the -clean option:
% album -clean images/
ITEM: Medium size images
When you click on an album thumbnail you're taken to an 'image_page.'
The image_page shows, by default, the full size image (as well as
navigation buttons and captions and such). When you click on the
image on the image_page, you'll be taken to the URL for just the full
size image.
If you want a medium size image on the image_page, use the -medium
option and specify a geometry for the medium size image. You can
specify any geometry that ImageMagick can use (see their man page
for more info). Some examples:
# An image that is half the full size
% album -medium 50%
# An image that fits inside 640x480 (maximum size)
% album -medium 640x480
# An image that is shrunk to fit inside 640x480
# (but won't be enlarged if it's smaller than 640x480)
% album -medium '640x480>'
You need the 'quotes' on the last example with most shells because
of the '>' character.
ITEM: Captions
Images and thumbnails can have names and captions. There are a number
of ways to specify/change names and captions in your photo albums.
The name is linked to the image or image_page,
and the caption follows underneath.
The default name is the filename cleaned up:
"Kodi_Cow.gif" => "Kodi Cow"
One way to specify a caption is in a .txt file
with the same name as the image. For this example,
"Kodi_Cow.txt" could contain "Kodi takes down a cow!"
You can rename your images and specify captions in bulk
for an album directory with a captions.txt file.
Each line of the file should be an image or directory filename,
followed by a tab, followed by the new name. You can also
specify (separated by tabs), an optional caption and then an optional
image ALT tag. (To skip a field, use 'tab' 'space' 'tab')
Example:
001.gif My first photo
002.gif Mom and Dad My parents in the grand canyon
003.gif Ani DiFranco My fiancee Yowsers!
The images and directories will also be sorted in the order they are found
in the caption file. You can override this with '-sort date' and '-sort name'
If your editor doesn't handle tabs very well, then you can separate the
fields by double-colons, but only if the caption line doesn't contain any
tabs at all:
003.gif :: Ani DiFranco :: My fiancee :: Yowsers!
If you only want captions on image pages (not on album pages) use:
% album -no_album_captions
If you want web access to create/edit your captions, look at the
caption_edit.cgi CGI script (but be sure to limit access to the
script or anyone can change your captions!)
ITEM: EXIF Captions
You can also specify captions that are based off of EXIF information
(Exchangeable Image File Format) which most digital cameras add to images.
First you need 'jhead' installed. You should be able to run jhead
on a JPG file and see the comments and information.
EXIF captions are added after the normal captions and are specified with -exif:
% album -exif "<br>File: %File name% taken with %Camera make%"
Any %tags% found will be replaced with EXIF information. If any %tags%
aren't found in the EXIF information, then that EXIF caption string is
thrown out. Because of this you can specify multiple -exif strings:
% album -exif "<br>File: %File name% " -exif "taken with %Camera make%"
This way if the 'Camera make' isn't found you can still get the 'File name'
caption.
Like any of the array style options you can use --exif as well:
% album --exif "<br>File: %File name% " "taken with %Camera make%" --
Note that, as above, you can include HTML in your EXIF tags:
% album -exif "<br>Aperture: %Aperture%"
To see the possible EXIF tags (Resolution, Date/Time, Aperture, etc..)
run a program like 'jhead' on an digital camera image.
You can also specify EXIF captions only for album or image pages, see
the -exif_album and -exif_image options.
ITEM: Headers and Footers
In each album directory you can have text files header.txt and footer.txt
These will be copied verbatim into the header and footer of your album (if
it's supported by the theme).
ITEM: Hiding Files/Directories
Any files that album does not recognize as image types are ignored.
To display these files, use -no_known_images. (-known_images is default)
You can mark an image as a non-image by creating an empty file with
the same name with .not_img added to the end.
You can ignore a file completely by creating an empty file with
the same name with .hide_album on the end.
You can avoid running album on a directory (but still include it in your
list of directories) by creating a file <dir>/.no_album
You can ignore directories completely by creating a file <dir>/.hide_album
The Windows version of album doesn't use dots for no_album, hide_album
and not_img because it's difficult to create .files in Windows.
ITEM: Cropping Images
If your images are of a large variety of aspect ratios (i.e., other than
just landscape/portrait) or if your theme only allows one orientation,
then you can have your thumbnails cropped so they all fit the same geometry:
% album -crop
The default cropping is to crop the image to center. If you don't
like the centered-cropping method that the album uses to generate
thumbnails, you can give directives to album to specify where to crop
specific images. Just change the filename of the image so it has a
cropping directive before the filetype. You can direct album to crop
the image at the top, bottom, left or right. As an example, let's
say you have a portrait "Kodi.gif" that you want cropped on top for
the thumbnail. Rename the file to "Kodi.CROPtop.gif" and this will
be done for you (you might want to -clean out the old thumbnail).
The "CROP" string will be removed from the name that is printed in
the HTML.
The default geometry is 133x133. This way landscape images will
create 133x100 thumbnails and portrait images will create 100x133
thumbnails. If you are using cropping and you still want your
thumbnails to have that digital photo aspect ratio, then try 133x100:
% album -crop -geometry 133x100
Remember that if you change the -crop or -geometry settings on a
previously generated album, you will need to specify -force once
to regenerate all your thumbnails.
ITEM: Video
album can generate snapshot thumbnails of many video formats if you
install ffmpeg
If you are running linux on an x86, then you can just grab the binary,
otherwise get the whole package from ffmpeg.org (it's an easy install).
ITEM: Burning CDs (using file://)
If you are using album to burn CDs or you want to access your albums with
file://, then you don't want album to assume "index.html" as the default
index page since the browser probably won't. Furthermore, if you use
themes, you must use relative paths. You can't use -theme_url because
you don't know what the final URL will be. On Windows the theme path
could end up being "C:/Themes" or on UNIX or OSX it could be something
like "/mnt/cd/Themes" - it all depends on where the CD is mounted.
To deal with this, use the -burn option:
% album -burn ...
This requires that the paths from the album to the theme don't change.
The best way to do this is take the top directory that you're going to
burn and put the themes and the album in that directory, then specify
the full path to the theme. For example, create the directories:
myISO/Photos/
myISO/Themes/Blue
Then you can run:
% album -burn -theme myISO/Themes/Blue myISO/Photos
Then you can make a CD image from the myISO directory (or higher).
If you are using 'galbum' (the GUI front end) then you can't specify
the full path to the theme, so you'll need to make sure that the version
of the theme you want to burn is the first one found in the theme_path
(which is likely based off the data_path). In the above example you
could add 'myISO' to the top of the data_path, and it should
use the 'myISO/Themes/Blue' path for the Blue theme.
You can also look at shellrun for windows users, you can have it
automatically launch the album in a browser. (Or see winopen)
ITEM: Indexing your entire album
To navigate an entire album on one page use the caption_index tool.
It uses the same options as album (though it ignores many
of them) so you can just replace your call to "album" with "caption_index"
The output is the HTML for a full album index.
See an example index
for one of my example photo albums
ITEM: Updating Albums With CGI
First you need to be able to upload the photo to the album directory.
I suggest using ftp for this. You could also write a javascript that
can upload files, if someone could show me how to do this I'd love to know.
Then you need to be able to remotely run album. To avoid abuse, I
suggest setting up a CGI script that touches a file (or they can just
ftp this file in), and then have a cron job that checks for that
file every few minutes, and if it finds it it removes it and runs album.
[unix only] (You will probably need to set $PATH or use absolute paths
in the script for convert)
If you want immediate gratification, you can run album from a CGI script
such as this one.
If your photos are not owned by the webserver user, then you
need to run through a setud script which you run from a CGI [unix only].
Put the setuid script in a secure place, change it's ownership to be the
same as the photos, and then run "chmod ug+s" on it. Here are example
setuid and CGI scripts. Be sure to edit them.
Also look at caption_edit.cgi which allows you (or others) to edit
captions/names/headers/footers through the web.
album-4.17/Docs/it/txt_6 0000655 0000000 0000000 00000045742 10670046152 013555 0 ustar root root Creating Themes
ITEM: Methods
There are easy ways and complicated ways to create a custom theme,
depending on what you want to be able to do.
ITEM: Editing current theme HTML
If you just want to slightly change the theme to match the output
of your site, it might make sense to edit a current theme.
In the theme directory there are two *.th files. album.th is
the template for album pages (the thumbnail pages) and image.th
is the template for image pages (where you can see medium or full
size images). The files are very similar to HTML except for
some embedded <: ePerl :> code. Even if you don't know perl or
ePerl you can still edit the HTML to make simple changes.
Good starting themes:
Any simmer_theme is going to be up to date and clean, such as "Blue" or
"Maste." If you only need 4 corner thumbnail borders then take a look
at "Eddie Bauer." If you want overlay/transparent borders, see FunLand.
If you want something demonstrating a minimal amount of code, try "simple"
but be warned that I haven't touched the theme in a long time.
ITEM: The easy way, simmer_theme from graphics.
Most themes have the same basic form, show a bunch of thumbnails
for directories and then for images, with a graphic border, line and
background. If this is what you want, but you want to create new
graphics, then there is a tool that will build your themes for you.
If you create a directory with the images and a CREDIT file as well
as a Font or Style.css file, then simmer_theme will create theme for you.
Files:
Font/Style.css
This determines the fonts used by the theme. The "Font" file is the
older system, documented below. Create a Style.css file and define
styles for: body, title, main, credit and anything else you like.
See FunLand for a simple example.
Alternatively, use a font file. An example Font file is:
--------------------------------------------------
$TITLE_FONT = "size='4' color='#ffffff' face='Times New Roman,Georgia,Times'";
$MAIN_FONT = "face='Times New Roman,Georgia,Times'";
$CREDIT_FONT = "size='-1' face='Verdana' color='#ffffff'";
$BODY = "background='$PATH/bkgrnd.gif' link='#0099FF'">
--------------------------------------------------
CREDIT
The credit file is two lines and is used for the theme index at MarginalHacks.
If you're never submitting your theme to us, then you don't need this file.
(But please do!) If so, the two lines (and only two lines) are:
1) A short description of the theme (keep it all on one line)
2) Your name (can be inside a mailto: or href link)
Null.gif
Each simmer theme needs a spacer image, this is a 1x1 transparent gif.
You can just copy this from another simmer theme.
Optional image files:
Bar Images
The bar is composed of Bar_L.gif, Bar_R.gif and Bar_M.gif in the middle.
The middle is stretched. If you need a middle piece that isn't stretched, use:
Bar_L.gif, Bar_ML.gif, Bar_M.gif, Bar_MR.gif, Bar_R.gif
And then the Bar_ML.gif and Bar_MR.gif will be stretched. (See the
Craftsman theme for an example of this).
Locked.gif
A lock image for any directories that have .htaccess
Background image
If you want a background image, specify it in the Font file in the $BODY
section, as in the example above. The $PATH variable will be replaced
with the path to the theme files:
More.gif
When an album page has sub-albums to list, it first shows the 'More.gif'
image.
Next.gif, Prev.gif, Back.gif
For the next and previous arrows and the back button
Icon.gif
Shown at the top left by the parent albums, this is often just the text "Photos"
Border Images
There are many ways to slice up a border, from simple to complex, depending on
the complexity of the border and how much you want to be able to stretch it:
4 pieces Uses Bord_L.gif, Bord_R.gif, Bord_T.gif, Bord_B.gif
(The corners go with the left and right images)
4 piece borders usually don't stretch well so they don't work well on
image_pages. Generally you can cut the corners out of the left and
right images to make:
8 pieces Also includes Bord_TL.gif, Bord_TR.gif, Bord_BL.gif, Bord_BR.gif
8 piece borders allow you to stretch to handle most sized images
12 pieces Also includes Bord_LT.gif, Bord_RT.gif, Bord_LB.gif, Bord_RB.gif
12 pieces allow stretching of borders that have more complex corners (such
as Dominatrix6 or Ivy)
Overlay Borders Can use transparent images that can be partially
overlaying your thumbnail. See below.
Here's how the normal border pieces are laid out:
12 piece borders
TL T TR 8 piece borders 4 piece borders
LT RT TL T TR TTTTTTT
L IMG R L IMG R L IMG R
LB RB BL B BR BBBBBBB
BL B BR
Note that every row of images must be the same height, though the
widths do not have to line up. (i.e., height TL = height T = height TR)
(This is not true about overlay borders!)
Once you've created these files, you can run the simmer_theme tool
(an optional tool download at MarginalHacks.com) and your theme will
then be ready to use!
If you need different borders for the image pages, then use the same
filenames prefixed by 'I' - such as IBord_LT.gif, IBord_RT.gif,...
Overlay borders allow for really fantastic effects with image borders.
Currently there's no support for different overlay borders for images.
For using Overlay borders, create images:
Over_TL.png Over_T.png Over_TR.png
Over_L.png Over_R.png
Over_BL.png Over_B.png Over_BR.png
Then figure out how many pixels of the borders are padding (outside photo)
Then put those values in files: Over_T.pad Over_R.pad Over_B.pad Over_L.pad
See "Themes/FunLand" for a simple example
Multi-lingual Images
If your images have text, you can translate them into other languages
so that albums can be generated in other languages. For example, you
can create a Dutch "More.gif" image and put it in 'lang/nl/More.gif'
in the theme (nl is the language code for Dutch).
When the user runs album in Dutch (album -lang nl) then the theme
will use the Dutch image if found. Themes/Blue has a simple example.
The currently "translated" images are:
More, Back, Next, Prev and Icon
You can create an HTML table that shows the translations immediately
available to themes with -list_html_trans:
% album -list_html_trans > trans.html
Then view trans.html in a browser. Unfortunately different languages
have different charsets, and an HTML page can only have one. The
output is in utf-8, but you can edit the "charset=utf-8" to properly
view language characters in different charsets (such as hebrew).
If you need more words translated for themes, let me know, and if you
create any new language images for a theme, please send them to me!
ITEM: From scratch, Theme API
This is a much heavier job - you need to have a very clear idea of
how you want album to place the images on your page. It might be
a good idea to start with modifying existing themes first to get
an idea of what most themes do. Also look at existing themes
for code examples (see suggestions above).
Themes are directories that contain at the minimum an 'album.th' file.
This is the album page theme template. Often they also contain an 'image.th'
which is the image theme template, and any graphics/css used by the theme.
Album pages contain thumbnails and image pages show full/medium sized images.
The .th files are ePerl, which is perl embedded inside of HTML. They
end up looking a great deal like the actual album and image HTML themselves.
To write a theme, you'll need to understand the ePerl syntax. You can
find more information from the actual ePerl tool available at MarginalHacks
(though this tool is not needed to use themes in album).
There are a plethora of support routines available, but often only
a fraction of these are necessary - it may help to look at other themes
to see how they are generally constructed.
Function table:
Required Functions
Meta() Must be called in the section of HTML
Credit() Gives credit ('this album created by..')
Must be called in the section of HTML
Body_Tag() Called inside the actual tag.
Paths and Options
Option($name) Get the value of an option/configuration setting
Version() Return the album version
Version_Num() Return the album version as just a number (i.e. "3.14")
Path($type) Returns path info for $type of:
album_name The name of this album
dir Current working album directory
album_file Full path to the album index.html
album_path The path of parent directories
theme Full path to the theme directory
img_theme Full path to the theme directory from image pages
page_post_url The ".html" to add onto image pages
parent_albums Array of parent albums (album_path split up)
Image_Page() 1 if we're generating an image page, 0 for album page.
Page_Type() Either 'image_page' or 'album_page'
Theme_Path() The filesystem path to the theme files
Theme_URL() The URL path to the theme files
Header and Footer
isHeader(), pHeader() Test for and print the header
isFooter(), pFooter() Same for the footer
Generally you loop through the images and directories using local variables:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
This will print the name of each image. Our object types are either 'pics'
for images or 'dirs' for the child directories. Here are the object functions:
Objects (type is either 'pics' (default) or 'dirs')
First($type) Get the first image or sub-album object.
Last($type) Last object
Next($obj) Given an object, return the next object
Next($obj,1) Same, loop past end to beginning.
Prev($obj), Prev($obj,1) Similar to Next()
num('pics') or just num() Total number of images in this album
num('dirs') Total number of children/sub-albums
Also:
num('parent_albums') Total number of parents leading up to this album.
Object lookup:
get_obj($num, $type, $loop)
Finds object by number ('pics' or 'dirs').
If $loop is set than the count will wrap around.
Object Properties
Each object (image or child albums) has properties.
Some properties are accessed by a single field:
Get($obj,$field) Get a single field of an object
Field Description
----- ----------
type What type of object? Either 'pics' or 'dirs'
is_movie Boolean: is this a movie?
name Name (cleaned and optionally from captions)
cap Image caption
capfile Optional caption file
alt Alt tag
num_pics [directories only, -dir_thumbs] Num of pics in directory
num_dirs [directories only, -dir_thumbs] Num of dirs in directory
Some properties are accessed by a field and subfield. For example,
each image has information for different sizes: full, medium and thumb
(though 'medium' is optional).
Get($obj,$size,$field) Get a property for a given size
Size Field Description
---- ----- ----------
$size x Width
$size y Height
$size file Filename (without path)
$size path Filename (full path)
$size filesize Filesize in bytes
full tag The tag (either 'image' or 'embed') - only for 'full'
We also have URL information which is access according to the
page it's coming 'from' and the image/page it's pointing 'to':
Get($obj,'URL',$from,$to) Get a URL for an object from -> to
Get($obj,'href',$from,$to) Same but wraps it in an 'href' string.
Get($obj,'link',$from,$to) Same but wraps the object name inside the href link.
From To Description
---- -- ----------
album_page image Image_URL from album_page
album_page thumb Thumbnail from album_page
image_page image Image_URL from image_page
image_page image_page This image page from another image page
image_page image_src The <img src> URL for the image page
image_page thumb Thumbnail from image_page
Directory objects also have:
From To Description
---- -- ----------
album_page dir URL to the directory from it's parent album page
Parent Albums
Parent_Album($num) Get a parent album string (including the href)
Parent_Albums() Return a list of the parent albums strings (including href)
Parent_Album($str) A join($str) call of Parent_Albums()
Back() The URL to go back or up one page.
Images
This_Image The image object for an image page
Image($img,$type) The <img> tags for type of medium,full,thumb
Image($num,$type) Same, but by image number
Name($img) The clean or captioned name for an image
Caption($img) The caption for an image
Child Albums
Name($alb)
Caption($img) The caption for an image
Convenience Routines
Pretty($str,$html,$lines) Pretty formats a name.
If $html then HTML is allowed (i.e., use 0 for <title> and the like)
Currently just puts prefix dates in a smaller font (i.e. '2004-12-03.Folder')
If $lines then multilines are allowed
Currently just follows dates with a 'br' line break.
New_Row($obj,$cols,$off) Should we start a new row after this object?
Use $off if the first object is offset from 1
Image_Array($src,$x,$y,$also,$alt)
Returns an <img> tag given $src, $x,...
Image_Ref($ref,$also,$alt)
Like Image_Array, but $ref can be a hash of
Image_Arrays keyed by language ('_' is default).
album picks the Image_Array by what languages are set.
Border($img,$type,$href,@border)
Border($str,$x,$y,@border)
Create the full bordered image.
See 'Borders' for more information.
If you're creating a theme from scratch, consider adding support for -slideshow.
The easiest way to do this is to cut/paste the "slideshow" code out of an
existing theme.
ITEM: Submitting Themes
Have a custom theme? I'd love to see it, even if it's totally site-specific.
If you have a new theme you'd like to offer the public, feel free to send
it to me and/or a URL where I can see how it looks. Be sure to set the CREDIT
file properly and let me know if you are donating it to MarginalHacks for
everyone to use or if you want it under a specific license.
ITEM: Converting v2.0 Themes to v3.0 Themes
album v2.0 introduced a theme interface which has been rewritten. Most
2.0 themes (especially those that don't use many of the global variables)
will still work, but the interface is deprecated and may disappear in
the near future.
It's not difficult to convert from v2.0 to v3.0 themes.
The v2.0 themes used global variables for many things. These are now
deprecated In v3.0 you should keep track of images and directories in
variables and use the 'iterators' that are supplied, for example:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
Will loop through all the images and print their names.
The chart below shows you how to rewrite the old style calls which
used a global variable with the new style which uses a local variable,
but to use these calls you need to rewrite your loops as above.
Here is a conversion chart for helping convert v2.0 themes to v3.0:
# Global vars shouldn't be used
# ALL DEPRECATED - See new local variable loop methods above
$PARENT_ALBUM_CNT Rewrite with: Parent_Album($num) and Parent_Albums($join)
$CHILD_ALBUM_CNT Rewrite with: my $dir = First('dirs'); $dir=Next($dir);
$IMAGE_CNT Rewrite with: my $img = First('pics'); $pics=Next($pics);
@PARENT_ALBUMS Can instead use: @{Path('parent_albums')}
@CHILD_ALBUMS, @CHILD_ALBUM_NAMES, @CHILD_ALBUM_URLS, ...
# Old global variable modifiers:
# ALL DEPRECATED - See new local variable loop methods above
Next_Image(), Images_Left(), Image_Cnt(), Image_Prev(), Image_Next()
Set_Image_Prev(), Set_Image_Next(), Set_Image_This()
Next_Child_Album(), Child_Album_Cnt(), Child_Albums_Left()
# Paths and stuff
pAlbum_Name() Path('album_name')
Album_Filename() Path('album_file')
pFile($file) print read_file($file)
Get_Opt($option) Option($option)
Index() Option('index')
pParent_Album($str) print Parent_Album($str)
# Parent Albums
Parent_Albums_Left Deprecated, see '$PARENT_ALBUM_CNT' above
Parent_Album_Cnt Deprecated, see '$PARENT_ALBUM_CNT' above
Next_Parent_Album Deprecated, see '$PARENT_ALBUM_CNT' above
pJoin_Parent_Albums print Parent_Albums(\@_)
# Images, using variable '$img'
pImage() Use $img instead and:
print Get($img,'href','image');
print Get($img,'thumb') if Get($img,'thumb');
print Name($img), "</a>";
pImage_Src() print Image($img,'full')
Image_Src() Image($img,'full')
pImage_Thumb_Src() print Image($img,'thumb')
Image_Name() Name($img)
Image_Caption() Caption($img)
pImage_Caption() print Get($img,'Caption')
Image_Thumb() Get($img,'URL','thumb')
Image_Is_Pic() Get($img,'thumb')
Image_Alt() Get($img,'alt')
Image_Filesize() Get($img,'full','filesize')
Image_Path() Get($img,'full','path')
Image_Width() Get($img,'medium','x') || Get($img,'full','x')
Image_Height() Get($img,'medium','y') || Get($img,'full','y')
Image_Filename() Get($img,'full','file')
Image_Tag() Get($img,'full','tag')
Image_URL() Get($img,'URL','image')
Image_Page_URL() Get($img,'URL','image_page','image_page') || Back()
# Child album routines, using variable '$alb'
pChild_Album($nobr) print Get($alb,'href','dir');
my $name = Name($alb);
$name =~ s/<br>//g if $nobr;
print $name,"</a>";
Child_Album_Caption() Caption($alb,'dirs')
pChild_Album_Caption() print Child_Album_Caption($alb)
Child_Album_URL() Get($alb,'URL','dir')
Child_Album_Name() Name($alb)
# Unchanged
Meta() Meta()
Credit() Credit()
album-4.17/Docs/it/Section_7.html 0000644 0000000 0000000 00000061027 12661460265 015305 0 ustar root root
MarginalHacks album - Plugins, Usage, Creation,..
- Documentation
A l b u m
S e v e n - - P l u g i n s , U s a g e , C r e a t i o n , . .
1: What are Plugins?
Plugins are snippets of code that allow you to modify the behavior
of album. They can be as simple as a new way to create EXIF captions,
to something as complex as creating the album based on a database of
images instead of using the filesystem hierarchy.
2: Installing Plugins and plugin support
There are a number of plugins available with the standard installation of
album. If you are upgrading album with plugins from an earlier version
of album that did not have plugins (pre v3.10), you may need to once do:
% album -configure
You will not need to do this with future upgrades of album.
This will install the current plugins into one of the default
plugin directories - album will look for plugins in a number of
locations, the default locations are:
/etc/album/plugins/
/usr/share/album/plugins/
$HOME/.album/plugins/
In reality, these are 'plugins' directories found in the set of
locations specified by '--data_path' - hence the defaults are:
/etc/album/
/usr/share/album/
$HOME/.album/
You can specify a new location with --data_path and then add a 'plugins'
directory to that location, or use the --plugin_path option.
Plugins usually end with the ".alp" prefix, but you do not need
to specify this prefix when using plugins. For example, if you
have a plugin installed at:
/etc/album/plugins/utils/mv.alp
Then you would specify the plugin as: utils/mv3: Loading/Unloading Plugins
To list all the currently installed plugins:
% album -list_plugins
To show information about a specific plugin (using 'utils/mv' as an example):
% album -plugin_info utils/mv
Plugins will be saved in the configuration for a given album, so
they don't need to be respecified every time (excluding one-time
plugins such as 'utils/mv')
You can use -no_plugin and -clear_plugin to turn off plugins that have
been saved in an album configuration. As with normal album options,
-no_plugin will turn off a specific plugin, and -clear_plugin will
turn off all plugins. Any saved plugin options for that plugin will be
erased as well.
4: Plugin Options
A few plugins may be able to take command-line options, to view usage
for these plugins:
% album -plugin_usage utils/mv
But when specifying plugin options, you need to tell album which plugin
the option belongs to. Instead of specifying as a normal album option:
% album -some_option
You prefix the option with the plugin name followed by a colon:
% album -some_plugin:some_option
For example, you can specify the generated 'index' created by
the 'utils/capindex' plugin.
% album -plugin utils/capindex -utils/capindex:index blah.html
That's a bit unwieldy. You can shorten the name of the plugin as
long as it doesn't conflict with another plugin you've loaded (by
the same name):
% album -plugin utils/capindex -capindex:index
Obviously the other types of options (strings, numbers and arrays) are
possible and use the same convention. They are saved in album configuration
the same as normal album options.
One caveat: As mentioned, once we use a plugin on an album it is saved
in the configuration. If you want to add options to an album that is
already configured to use a plugin, you either need to mention the plugin
again, or else use the full name when specifying the options (otherwise
we won't know what the shortened option belongs to).
For example, consider an imaginary plugin:
% album -plugin some/example/thumbGen Photos/Spain
After that, let's say we want to use the thumbGen boolean option "fast".
This will not work:
% album -thumbGen:fast Photos/Spain
But either of these will work:
% album -plugin some/example/thumbGen -thumbGen:fast blah.html Photos/Spain% album -some/example/thumbGen:fast Photos/Spain5: Writing Plugins
Plugins are small perl modules that register "hooks" into the album code.
There are hooks for most of the album functionality, and the plugin hook
code can often either replace or supplement the album code. More hooks
may be added to future versions of album as needed.
You can see a list of all the hooks that album allows:
% album -list_hooks
And you can get specific information about a hook:
% album -hook_info <hook_name>
We can use album to generate our plugin framework for us:
% album -create_plugin
For this to work, you need to understand album hooks and album options.
We can also write the plugin by hand, it helps to use an already
written plugin as a base to work off of.
In our plugin we register the hook by calling the album::hook() function.
To call functions in the album code, we use the album namespace.
As an example, to register code for the clean_name hook our plugin calls:
album::hook($opt,'clean_name',\&my_clean);
Then whenever album does a clean_name it will also call the plugin
subroutine called my_clean (which we need to provide).
To write my_clean let's look at the clean_name hook info:
Args: ($opt, 'clean_name', $name, $iscaption)
Description: Clean a filename for printing.
The name is either the filename or comes from the caption file.
Returns: Clean name
The args that the my_clean subroutine get are specified on the first line.
Let's say we want to convert all names to uppercase. We could use:
sub my_clean {
my ($opt, $hookname, $name, $iscaption) = @_;
return uc($name);
}
Here's an explanation of the arguments:
$opt This is the handle to all of album's options.
We didn't use it here. Sometimes you'll need it if you
call any of albums internal functions. This is also true
if a $data argument is supplied.
$hookname In this case it will be 'clean_name'. This allows us
to register the same subroutine to handle different hooks.
$name This is the name we are going to clean.
$iscaption This tells us whether the name came from a caption file.
To understand any of the options after the $hookname you
may need to look at the corresponding code in album.
In this case we only needed to use the supplied $name, we called
the perl uppercase routine and returned that. The code is done, but now
we need to create the plugin framework.
Some hooks allow you to replace the album code. For example, you
could write plugin code that can generate thumbnails for pdf files
(using 'convert' is one way to do this). We can register code for
the 'thumbnail' hook, and just return 'undef' if we aren't looking
at a pdf file, but when we see a pdf file, we create a thumbnail
and then return that. When album gets back a thumbnail, then it
will use that and skip it's own thumbnail code.
Now let's finish writing our uppercase plugin. A plugin must do the following:
1) Supply a 'start_plugin' routine. This is where you will likely
register hooks and specify any command-line options for the plugin.
2) The 'start_plugin' routine must return the plugin info
hash, which needs the following keys defined:
author => The author name
href => A URL (or mailto, of course) for the author
version => Version number for this plugin
description => Text description of the plugin
3) End the plugin code by returning '1' (similar to a perl module).
Here is our example clean_name plugin code in a complete plugin:
sub start_plugin {
my ($opt) = @_;
album::hook($opt,'clean_name',\&my_clean);
return {
author => 'David Ljung Madison',
href => 'http://MarginalHacks.com/',
version => '1.0',
description => "Conver image names to uppercase",
};
}
sub my_clean {
return uc($name);
}
1;
Finally, we need to save this somewhere. Plugins are organized in the
plugin directory hierarchy, we could save this in a plugin directory as:
captions/formatting/NAME.alp
In fact, if you look in examples/formatting/NAME.alp you'll find that
there's a plugin already there that does essentially the same thing.
If you want your plugin to accept command-line options, use 'add_option.'
This must be done in the start_plugin code. Some examples:
album::add_option(1,"fast",album::OPTION_BOOL, usage=>"Do it fast");
album::add_option(1,"name", album::OPTION_STR, usage=>"Your name");
album::add_option(1,"colors",album::OPTION_ARR, usage=>"Color list");
For more info, see the 'add_option' code in album and see all of the uses
of it (at the top of album and in plugins that use 'add_option')
To read an option that the user may have set, we use option():
my $fast = album::option($opt, "fast");
If the user gave a bad value for an option, you can call usage():
album::usage("-colors array can only include values [red, green, blue]");
If your plugin needs to load modules that are not part of the
standard Perl distribution, please do this conditionally. For
an example of this, see plugins/extra/rss.alp.
You can also call any of the routines found in the album script
using the album:: namespace. Make sure you know what you are doing.
Some useful routines are:
album::add_head($opt,$data, "<meta name='add_this' content='to the <head>'>");
album::add_header($opt,$data, "<p>This gets added to the album header");
album::add_footer($opt,$data, "<p>This gets added to the album footer");
The best way to figure out how to write plugins is to look at other
plugins, possibly copying one that is similar to yours and working
off of that. Plugin development tools may be created in the future.
Again, album can help create the plugin framework for you:
% album -create_plugin
1: Using languages
(Requires album v4.0 or higher)
Album comes prepackaged with language files (we're in need of translation
help, see below!). The language files will alter most of album's output
messages, as well as any HTML output that isn't generated by the theme.
Altering any text in a theme to match your language is as simple as editing
the Theme files - there is an example of this with the "simple-Czech" theme.
To use a language, add the "lang" option to your main album.conf, or else
specify it the first time you generate an album (it will be saved with that
album afterwards).
Languages can be cleared like any code/array option with:
% album -clear_lang ...
You can specify multiple languages, which can matter if a language is
incomplete, but you'd like to default to another language than english.
So, for example, if you wanted Dutch as the primary language, with the
backup being Swedish Chef, you could do:
% album -lang swedish_chef -lang nl ...
If you specify a sublanguage (such as es-bo for Spanish, Bolivia), then
album will attempt 'es' first as a backup.
Note that because of a known bug, you should specify all the desired
languages at the same time instead of over multiple invocations of album.
To see what languages are available:
% album -list_langs
Sadly, most of the (real) languages are barely complete, but this
is a chance for people to help out by becoming a..
2: Translation Volunteers
The album project is in need of volunteers to do translations,
specifically of:
1) The Mini How-To. Please translate from the source.
2) album messages, as explained below.
If you are willing to do the translation of either one or both
of these items, please contact me!
If you're feeling particularly ambitious, feel free to translate any
of the other Documentation sources as well, just let me know!
3: Documentation Translation
The most important document to translate is the "Mini How-To".
Please translate from the text source.
Also be sure to let me know how you want to be credited,
by your name, name and email, or name and website.
And please include the proper spelling and capitalization of the
name of your language in your language. For example, "franais"
instead of "French"
I am open to suggestions for what charset to use. Current options are:
1) HTML characters such as [é]] (though they only work in browsers)
2) Unicode (UTF-8) such as [é] (only in browsers and some terminals)
3) ASCII code, where possible, such as [] (works in text editors, though
not currently in this page because it's set to unicode)
4) Language specific iso such as iso-8859-8-I for Hebrew.
Currently Unicode (utf-8) seems best for languages that aren't covered
by iso-8859-1, because it covers all languages and helps us deal with
incomplete translations (which would otherwise require multiple charsets,
which is a disaster). Any iso code that is a subset of utf-8 can be used.
If the main terminal software for a given language is in an iso charset
instead of utf, then that could be a good exception to use non-utf.
4: Album messages
album handles all text messages using it's own language support
system, similar to the system used by the perl module Locale::Maketext.
(More info on the inspiration for this is in TPJ13)
An error message, for example, may look like this:
No themes found in [[some directory]].
With a specific example being:
No themes found in /www/var/themes.
In Dutch, this would be:
Geen thema gevonden in /www/var/themes.
The "variable" in this case is "/www/var/themes" and it obviously
isn't translated. In album, the actual error message looks like:
'No themes found in [_1].'
# Args: [_1] = $dir
The translation (in Dutch) looks like:
'No themes found in [_1].' => 'Geen thema gevonden in [_1].'
After translating, album will replace [_1] with the directory.
Sometimes we'll have multiple variables, and they may change places:
Some example errors:
Need to specify -medium with -just_medium option.
Need to specify -theme_url with -theme option.
In Dutch, the first would be:
Met de optie -just_medium moet -medium opgegeven worden.
The actual error with it's Dutch translation is:
'Need to specify [_1] with [_2] option'
=> 'Met de optie [_2] moet [_1] opgegeven worden'
# Args: [_1]='-medium' [_2]='-just_medium'
Note that the variables have changed places.
There is also a special operator for quantities, for example,
we may wish to translate:
'I have 42 images'
Where the number 42 may change. In English, it is adequate to say:
0 images, 1 image, 2 images, 3 images...
Whereas in Dutch we would have:
0 afbeeldingen, 1 afbeelding, 2 afbeeldingen, 3 afbeeldingen..
But other languages (such as many slavic languages) may have special
rules as to whether "image" should be pluralized based on whether the
quantity is mod 2, 3 or 4, and so on! The simplest case is covered
by the [quant] operator:
[quant,_1,image]
This is similar to "[_1] image" except that "image" will be pluralized
if [_1] is 0 or greater than 1:
0 images, 1 image, 2 images, 3 images...
Pluralization is simply adding an 's' - if this isn't adequate, we can
specify the plural form:
[quant,_1,afbeelding,afbeeldingen]
Which gives us the Dutch count above.
And if we need a special form for 0, we can specify that:
[quant,_1,directory,directories,no directories]
Which would create:
no directories, 1 directory, 2 directories, ...
There is also a shorthand for [quant] using '*', so these are the same:
[quant,_1,image]
[*,_1,image]
So now an example translation for a number of images:
'[*,_1,image]'
=> '[*,_1,afbeelding,afbeeldingen]',
If you have something more complicated then you can use perl code, I
can help you write this if you let me know how the translation should work:
'[*,_1,image]'
=> \&russian_quantity; # This is a sub defined elsewhere..
Since the translation strings are (generally) placed in single-quotes (')
and due to the special [bracket] codes, we need to quote these correctly.
Single-quotes in the string need to be preceded by a slash (\):
'I can\'t find any images'
And square brackets are quoted using (~):
'Problem with option ~[-medium~]'
Which unfortunately can get ugly if the thing inside the square brackets
is a variable:
'Problem with option ~[[_1]~]'
Just be careful and make sure all brackets are closed appropriately.
Furthermore, in almost all cases, the translation should have the
same variables as the original:
'Need to specify [_1] with [_2] option'
=> 'Met de optie [_2] moet' # <- Where did [_1] go?!?
Fortunately, most of the work is done for you. Language files are
saved in the -data_path (or -lang_path) where album keeps it's data.
They are essentially perl code, and they can be auto-generated by album:
% album -make_lang sw
Will create a new, empty language file called 'sw' (Swedish). Go ahead
and edit that file, adding translations as you can. It's okay to leave
translations blank, they just won't get used. Some of the more important
translations (such as the ones that go into HTML pages) are at the top
and should probably be done first.
You will need to pick a charset, this is tricky, as it should be based
on what charsets you think people will be likely to have available
in their terminal as well as in their browser.
If you want to build a new language file, using translations from
a previous file (for example, to update a language with whatever
new messages have been added to album), you should load the language first:
% album -lang sw -make_lang sw
Any translations in the current Swedish language file will be copied
over to the new file (though comments and other code will not be copied!)
For the really long lines of text, don't worry about adding any newline
characters (\n) except where they exist in the original. album will
do word wrap appropriately for the longer sections of text.
Please contact me when you are starting translation work so I can
be sure that we don't have two translators working on the same parts,
and be sure to send me updates of language files as the progress, even
incomplete language files are useful!
If you have any questions about how to read the syntax of the language
file, please let me know.
5: Why am I still seeing English?
After choosing another language, you can still sometimes see English:
1) Option names are still in English. (-geometry is still -geometry)
2) The usage strings are not currently translated.
3) Plugin output is unlikely to be translated.
4) Language files aren't always complete, and will only translate what they know.
5) album may have new output that the language file doesn't know about yet.
6) Most themes are in English.
Fortunately the last one is the easiest to change, just edit the theme
and replace the HTML text portions with whatever language you like, or
create new graphics in a different language for icons with English.
If you create a new theme, I'd love to hear about it!
album-4.17/Docs/it/txt_8 0000655 0000000 0000000 00000022224 11615154173 013550 0 ustar root root Language Support
ITEM: Using languages
(Requires album v4.0 or higher)
Album comes prepackaged with language files (we're in need of translation
help, see below!). The language files will alter most of album's output
messages, as well as any HTML output that isn't generated by the theme.
Altering any text in a theme to match your language is as simple as editing
the Theme files - there is an example of this with the "simple-Czech" theme.
To use a language, add the "lang" option to your main album.conf, or else
specify it the first time you generate an album (it will be saved with that
album afterwards).
Languages can be cleared like any code/array option with:
% album -clear_lang ...
You can specify multiple languages, which can matter if a language is
incomplete, but you'd like to default to another language than english.
So, for example, if you wanted Dutch as the primary language, with the
backup being Swedish Chef, you could do:
% album -lang swedish_chef -lang nl ...
If you specify a sublanguage (such as es-bo for Spanish, Bolivia), then
album will attempt 'es' first as a backup.
Note that because of a known bug, you should specify all the desired
languages at the same time instead of over multiple invocations of album.
To see what languages are available:
% album -list_langs
Sadly, most of the (real) languages are barely complete, but this
is a chance for people to help out by becoming a..
ITEM: Translation Volunteers
The album project is in need of volunteers to do translations,
specifically of:
1) The Mini How-To. Please translate from the source.
2) album messages, as explained below.
If you are willing to do the translation of either one or both
of these items, please contact me!
If you're feeling particularly ambitious, feel free to translate any
of the other Documentation sources as well, just let me know!
ITEM: Documentation Translation
The most important document to translate is the "Mini How-To".
Please translate from the text source.
Also be sure to let me know how you want to be credited,
by your name, name and email, or name and website.
And please include the proper spelling and capitalization of the
name of your language in your language. For example, "franais"
instead of "French"
I am open to suggestions for what charset to use. Current options are:
1) HTML characters such as [é]] (though they only work in browsers)
2) Unicode (UTF-8) such as [é] (only in browsers and some terminals)
3) ASCII code, where possible, such as [] (works in text editors, though
not currently in this page because it's set to unicode)
4) Language specific iso such as iso-8859-8-I for Hebrew.
Currently Unicode (utf-8) seems best for languages that aren't covered
by iso-8859-1, because it covers all languages and helps us deal with
incomplete translations (which would otherwise require multiple charsets,
which is a disaster). Any iso code that is a subset of utf-8 can be used.
If the main terminal software for a given language is in an iso charset
instead of utf, then that could be a good exception to use non-utf.
ITEM: Album messages
album handles all text messages using it's own language support
system, similar to the system used by the perl module Locale::Maketext.
(More info on the inspiration for this is in TPJ13)
An error message, for example, may look like this:
No themes found in [[some directory]].
With a specific example being:
No themes found in /www/var/themes.
In Dutch, this would be:
Geen thema gevonden in /www/var/themes.
The "variable" in this case is "/www/var/themes" and it obviously
isn't translated. In album, the actual error message looks like:
'No themes found in [_1].'
# Args: [_1] = $dir
The translation (in Dutch) looks like:
'No themes found in [_1].' => 'Geen thema gevonden in [_1].'
After translating, album will replace [_1] with the directory.
Sometimes we'll have multiple variables, and they may change places:
Some example errors:
Need to specify -medium with -just_medium option.
Need to specify -theme_url with -theme option.
In Dutch, the first would be:
Met de optie -just_medium moet -medium opgegeven worden.
The actual error with it's Dutch translation is:
'Need to specify [_1] with [_2] option'
=> 'Met de optie [_2] moet [_1] opgegeven worden'
# Args: [_1]='-medium' [_2]='-just_medium'
Note that the variables have changed places.
There is also a special operator for quantities, for example,
we may wish to translate:
'I have 42 images'
Where the number 42 may change. In English, it is adequate to say:
0 images, 1 image, 2 images, 3 images...
Whereas in Dutch we would have:
0 afbeeldingen, 1 afbeelding, 2 afbeeldingen, 3 afbeeldingen..
But other languages (such as many slavic languages) may have special
rules as to whether "image" should be pluralized based on whether the
quantity is mod 2, 3 or 4, and so on! The simplest case is covered
by the [quant] operator:
[quant,_1,image]
This is similar to "[_1] image" except that "image" will be pluralized
if [_1] is 0 or greater than 1:
0 images, 1 image, 2 images, 3 images...
Pluralization is simply adding an 's' - if this isn't adequate, we can
specify the plural form:
[quant,_1,afbeelding,afbeeldingen]
Which gives us the Dutch count above.
And if we need a special form for 0, we can specify that:
[quant,_1,directory,directories,no directories]
Which would create:
no directories, 1 directory, 2 directories, ...
There is also a shorthand for [quant] using '*', so these are the same:
[quant,_1,image]
[*,_1,image]
So now an example translation for a number of images:
'[*,_1,image]'
=> '[*,_1,afbeelding,afbeeldingen]',
If you have something more complicated then you can use perl code, I
can help you write this if you let me know how the translation should work:
'[*,_1,image]'
=> \&russian_quantity; # This is a sub defined elsewhere..
Since the translation strings are (generally) placed in single-quotes (')
and due to the special [bracket] codes, we need to quote these correctly.
Single-quotes in the string need to be preceded by a slash (\):
'I can\'t find any images'
And square brackets are quoted using (~):
'Problem with option ~[-medium~]'
Which unfortunately can get ugly if the thing inside the square brackets
is a variable:
'Problem with option ~[[_1]~]'
Just be careful and make sure all brackets are closed appropriately.
Furthermore, in almost all cases, the translation should have the
same variables as the original:
'Need to specify [_1] with [_2] option'
=> 'Met de optie [_2] moet' # <- Where did [_1] go?!?
Fortunately, most of the work is done for you. Language files are
saved in the -data_path (or -lang_path) where album keeps it's data.
They are essentially perl code, and they can be auto-generated by album:
% album -make_lang sw
Will create a new, empty language file called 'sw' (Swedish). Go ahead
and edit that file, adding translations as you can. It's okay to leave
translations blank, they just won't get used. Some of the more important
translations (such as the ones that go into HTML pages) are at the top
and should probably be done first.
You will need to pick a charset, this is tricky, as it should be based
on what charsets you think people will be likely to have available
in their terminal as well as in their browser.
If you want to build a new language file, using translations from
a previous file (for example, to update a language with whatever
new messages have been added to album), you should load the language first:
% album -lang sw -make_lang sw
Any translations in the current Swedish language file will be copied
over to the new file (though comments and other code will not be copied!)
For the really long lines of text, don't worry about adding any newline
characters (\n) except where they exist in the original. album will
do word wrap appropriately for the longer sections of text.
Please contact me when you are starting translation work so I can
be sure that we don't have two translators working on the same parts,
and be sure to send me updates of language files as the progress, even
incomplete language files are useful!
If you have any questions about how to read the syntax of the language
file, please let me know.
ITEM: Why am I still seeing English?
After choosing another language, you can still sometimes see English:
1) Option names are still in English. (-geometry is still -geometry)
2) The usage strings are not currently translated.
3) Plugin output is unlikely to be translated.
4) Language files aren't always complete, and will only translate what they know.
5) album may have new output that the language file doesn't know about yet.
6) Most themes are in English.
Fortunately the last one is the easiest to change, just edit the theme
and replace the HTML text portions with whatever language you like, or
create new graphics in a different language for icons with English.
If you create a new theme, I'd love to hear about it!
album-4.17/Docs/it/index.html 0000644 0000000 0000000 00000046405 12661460265 014565 0 ustar root root
MarginalHacks album - Documentation
album-4.17/Docs/it/conf 0000655 0000000 0000000 00000031623 12661457776 013453 0 ustar root root Table_Of_Contents = Table Of Contents
# Document conf file for 'make_faq'
#
New_Chunk = ITEM:
# Name of the short index, just links to the chapters
Short_Index = Short.html
# Name of the long index, links to chapters and chunks/questions
Long_Index = index.html
# Our list of text files (can use glob characters)
# Just make sure the filename ends with the section number.
Text_Files = txt_*
# Header
Header = "conf(my_doctype)
MarginalHacks album - $TOPIC - Documentation
conf(my_head_head)
SPACE_OUT($NUMBER -- $TOPIC)
conf(my_head_head2)
"
# Footer
Footer = "
"
# Header for short index
Short_Header = "conf(my_doctype)
MarginalHacks album - Documentation
conf(my_head_head)
SPACE_OUT(Documentation)
conf(my_head_head2)
Not all sections have been translated.
"
# Footer for short index
Short_Footer = conf(Footer)
Long_Header = conf(Short_Header)
Long_Footer = conf(Short_Footer)
##################################################
# Local variables for the conf file (used in conf(..) constructs)
##################################################
#
my_doctype = "
include_file(langhtml)
"
my_head_head = "
"
album-4.17/Docs/it/txt_5 0000655 0000000 0000000 00000010020 11076703643 013537 0 ustar root root Feature Requests, Bugs, Patches and Troubleshooting
ITEM: Feature Requests
If there's something you want added to album, first make sure
it doesn't already exist! Check the man page or the usage:
% man album% album -h
Also see -more and -usage options.
If you don't see it there, consider writing a patch or a plugin.
ITEM: Bug reports
Before you submit a bug, please make sure you have the most current release of album!
When submitting a bug, I need to know at least:
1) Your operating system
2) The exact problem and the exact error messages
I'd also like to know, if possible:
1) The exact album command you ran
2) The output from the command
And I generally also need the debug output of album:
% album -d
Finally, make sure that you've got the most current
version of album, and the most current themes as well.
ITEM: Writing Patches, Modifying album
If you want to modify album, you might want to check with me
first to make sure it's not already on my development plate.
If not, then consider writing it as a plugin instead of patching
the album source. This avoids adding complexity to album for
features that may not be globally used.
If it needs to go into album (for example, if it's a bug), then
please make sure to first download the most recent copy of album
first, then patch that and send me either a diff, a patch, or the
full script. If you comment off the changes you make that'd be great too.
ITEM: Known Bugs
v3.11: -clear_* and -no_* doesn't clear out parent directory options.
v3.10: Burning CDs doesn't quite work with theme absolute paths.
v3.00: Array and code options are saved backwards, for example:
"album -lang aa .. ; album -lang bb .." will still use language 'aa'
Also, in some cases array/code options in sub-albums will not
be ordered right the first time album adds them and you may
need to rerun album. For example:
"album -exif A photos/ ; album -exif B photos/sub"
Will have "B A" for the sub album, but "A B" after: "album photos/sub"
ITEM: PROBLEM: My index pages are too large!
I get many requests to break up the index pages after reaching a certain
threshold of images.
The problem is that this is hard to manage - unless the index pages are
treated just like sub-albums, then you now have three major components
on a page, more indexes, more albums, and thumbnails. And not only is
that cumbersome, but it would require updating all the themes.
Hopefully the next major release of album will do this, but until then
there is another, easier solution - just break the images up into
subdirectories before running album.
I have a tool that will move new images into subdirectories for you and
then runs album:
in_album
ITEM: ERROR: no delegate for this image format (./album)
You have the album script in your photo directory and it can't make
a thumbnail of itself! Either:
1) Move album out of the photo directory (suggested)
2) Run album with -known_images
ITEM: ERROR: no delegate for this image format (some_non_image_file)
Don't put non-images in your photo directory, or else run with -known_images.
ITEM: ERROR: no delegate for this image format (some.jpg)
ITEM: ERROR: identify: JPEG library is not available (some.jpg)
Your ImageMagick installation isn't complete and doesn't know how
to handle the given image type.
ITEM: ERROR: Can't get [some_image] size from -verbose output.
ImageMagick doesn't know the size of the image specified. Either:
1) Your ImageMagick installation isn't complete and can't handle the image type.
2) You are running album on a directory with non-images in it without
using the -known_images option.
If you're a gentoo linux user and you see this error, then run this command
as root (thanks Alex Pientka):
USE="avi gif jpeg mpeg png quicktime tiff" emerge imagemagick
album-4.17/Docs/it/Section_3.html 0000644 0000000 0000000 00000075216 12661460265 015306 0 ustar root root
MarginalHacks album - Running album / Basic Options
- Documentation
A l b u m
T h r e e - - R u n n i n g a l b u m / B a s i c O p t i o n s
1: Basic execution
Create a directory with nothing but images in it. The album script and
other tools should not go here. Then run album specifying that directory:
% album /example/path/to/images/
Or, if you're in the /example/path/to directory:
% album images/
When it's done, you'll have a photo album inside that directory starting
with images/index.html.
If that path is in your web server, then you can view it with your
browser. If you can't find it, talk to your sysadmin.
2: Options
There are three types of options. Boolean options, string/num options
and array options. Boolean options can be turned off by prepending -no_:
% album -no_image_pages
String and number values are specified after a string option:
% album -type gif
% album -columns 5
Array options can be specified two ways, with one argument at a time:
% album -exif hi -exif there
Or multiple arguments using the '--' form:
% album --exif hi there --
You can remove specific array options with -no_<option>
and clear all the array options with -clear_<option>.
To clear out array options (say, from the previous album run):
% album -clear_exif -exif "new exif"
(The -clear_exif will clear any previous exif settings and then the
following -exif option will add a new exif comment)
And finally, you can remove specific array options with 'no_':
% album -no_exif hi
Which could remove the 'hi' exif value and leave the 'there' value intact.
Also see the section on Saving Options.
To see a brief usage:
% album -h
To see more options:
% album -more
And even more full list of options:
% album -usage=2
You can specify numbers higher than 2 to see even more options (up to about 100)
Plugins can also have options with their own usage.
3: Themes
Themes are an essential part of what makes album compelling.
You can customize the look of your photo album by downloading a
theme from MarginalHacks or even writing your own theme to match
your website.
To use a theme, download the theme .tar or .zip and unpack it.
Themes are found according to the -theme_path setting, which is
a list of places to look for themes. Those paths need to be somewhere
under the top of your web directory, but not inside a photo album
directory. It needs to be accessible from a web browser.
You can either move the theme into one of the theme_paths that album
is already using, or make a new one and specify it with the -theme_path
option. (-theme_path should point to the directory the theme is in,
not the actual theme directory itself)
Then call album with the -theme option, with or without -theme_path:
% album -theme Dominatrix6 my_photos/
% album -theme Dominatrix6 -theme_path /home/httpd/album/Themes/ my_photos/
You can also create your own themes pretty easily, this is covered
later in this documentation.
4: Sub-albums
Make directories inside your first directory and put images in that.
Run album again, and it will run through all the child directories
and create sub-albums of the first album.
If you make changes to just a sub-album, you can run album on that
and it will keep track of all the parent links.
If you don't want to traverse down the tree of directories, you
can limit it with the depth option. Example:
% album images/ -depth 1
Will only generate photo albums for the images directory.
If you have many sub-albums, and you want to add a new sub-album
without regenerating all the previous sub-albums, then you can use -add:
% album -add images/new_album/
Which will add the new_album to the HTML for 'images/' and then
generate the thumbs and HTML for everything inside 'images/new_album/'
5: Avoiding Thumbnail Regeneration
album tries to avoid unnecessary work. It only creates thumbnails if
they don't exist and haven't changed. This speeds up successive runs
of album.
This can cause a problem if you change the size or cropping of your
thumbnails, because album won't realize that the thumbnails have changed.
You can use the force option to force album to regenerate thumbnails:
% album -force images/
But you shouldn't need to use -force every time.
6: Cleaning Out The Thumbnails
If you remove images from an album then you'll have leftover thumbs and HTML.
You can remove them by running album once with the -clean option:
% album -clean images/7: Medium size images
When you click on an album thumbnail you're taken to an 'image_page.'
The image_page shows, by default, the full size image (as well as
navigation buttons and captions and such). When you click on the
image on the image_page, you'll be taken to the URL for just the full
size image.
If you want a medium size image on the image_page, use the -medium
option and specify a geometry for the medium size image. You can
specify any geometry that ImageMagick can use (see their man page
for more info). Some examples:
# An image that is half the full size
% album -medium 50%
# An image that fits inside 640x480 (maximum size)
% album -medium 640x480
# An image that is shrunk to fit inside 640x480
# (but won't be enlarged if it's smaller than 640x480)
% album -medium '640x480>'
You need the 'quotes' on the last example with most shells because
of the '>' character.
8: Captions
Images and thumbnails can have names and captions. There are a number
of ways to specify/change names and captions in your photo albums.
The name is linked to the image or image_page,
and the caption follows underneath.
The default name is the filename cleaned up:
"Kodi_Cow.gif" => "Kodi Cow"
One way to specify a caption is in a .txt file
with the same name as the image. For this example,
"Kodi_Cow.txt" could contain "Kodi takes down a cow!"
You can rename your images and specify captions in bulk
for an album directory with a captions.txt file.
Each line of the file should be an image or directory filename,
followed by a tab, followed by the new name. You can also
specify (separated by tabs), an optional caption and then an optional
image ALT tag. (To skip a field, use 'tab' 'space' 'tab')
Example:
001.gif My first photo
002.gif Mom and Dad My parents in the grand canyon
003.gif Ani DiFranco My fiancee Yowsers!
The images and directories will also be sorted in the order they are found
in the caption file. You can override this with '-sort date' and '-sort name'
If your editor doesn't handle tabs very well, then you can separate the
fields by double-colons, but only if the caption line doesn't contain any
tabs at all:
003.gif :: Ani DiFranco :: My fiancee :: Yowsers!
If you only want captions on image pages (not on album pages) use:
% album -no_album_captions
If you want web access to create/edit your captions, look at the
caption_edit.cgi CGI script (but be sure to limit access to the
script or anyone can change your captions!)
9: EXIF Captions
You can also specify captions that are based off of EXIF information
(Exchangeable Image File Format) which most digital cameras add to images.
First you need 'jhead' installed. You should be able to run jhead
on a JPG file and see the comments and information.
EXIF captions are added after the normal captions and are specified with -exif:
% album -exif "<br>File: %File name% taken with %Camera make%"
Any %tags% found will be replaced with EXIF information. If any %tags%
aren't found in the EXIF information, then that EXIF caption string is
thrown out. Because of this you can specify multiple -exif strings:
% album -exif "<br>File: %File name% " -exif "taken with %Camera make%"
This way if the 'Camera make' isn't found you can still get the 'File name'
caption.
Like any of the array style options you can use --exif as well:
% album --exif "<br>File: %File name% " "taken with %Camera make%" --
Note that, as above, you can include HTML in your EXIF tags:
% album -exif "<br>Aperture: %Aperture%"
To see the possible EXIF tags (Resolution, Date/Time, Aperture, etc..)
run a program like 'jhead' on an digital camera image.
You can also specify EXIF captions only for album or image pages, see
the -exif_album and -exif_image options.
10: Headers and Footers
In each album directory you can have text files header.txt and footer.txt
These will be copied verbatim into the header and footer of your album (if
it's supported by the theme).
11: Hiding Files/Directories
Any files that album does not recognize as image types are ignored.
To display these files, use -no_known_images. (-known_images is default)
You can mark an image as a non-image by creating an empty file with
the same name with .not_img added to the end.
You can ignore a file completely by creating an empty file with
the same name with .hide_album on the end.
You can avoid running album on a directory (but still include it in your
list of directories) by creating a file <dir>/.no_album
You can ignore directories completely by creating a file <dir>/.hide_album
The Windows version of album doesn't use dots for no_album, hide_album
and not_img because it's difficult to create .files in Windows.
12: Cropping Images
If your images are of a large variety of aspect ratios (i.e., other than
just landscape/portrait) or if your theme only allows one orientation,
then you can have your thumbnails cropped so they all fit the same geometry:
% album -crop
The default cropping is to crop the image to center. If you don't
like the centered-cropping method that the album uses to generate
thumbnails, you can give directives to album to specify where to crop
specific images. Just change the filename of the image so it has a
cropping directive before the filetype. You can direct album to crop
the image at the top, bottom, left or right. As an example, let's
say you have a portrait "Kodi.gif" that you want cropped on top for
the thumbnail. Rename the file to "Kodi.CROPtop.gif" and this will
be done for you (you might want to -clean out the old thumbnail).
The "CROP" string will be removed from the name that is printed in
the HTML.
The default geometry is 133x133. This way landscape images will
create 133x100 thumbnails and portrait images will create 100x133
thumbnails. If you are using cropping and you still want your
thumbnails to have that digital photo aspect ratio, then try 133x100:
% album -crop -geometry 133x100
Remember that if you change the -crop or -geometry settings on a
previously generated album, you will need to specify -force once
to regenerate all your thumbnails.
13: Video
album can generate snapshot thumbnails of many video formats if you
install ffmpeg
If you are running linux on an x86, then you can just grab the binary,
otherwise get the whole package from ffmpeg.org (it's an easy install).
14: Burning CDs (using file://)
If you are using album to burn CDs or you want to access your albums with
file://, then you don't want album to assume "index.html" as the default
index page since the browser probably won't. Furthermore, if you use
themes, you must use relative paths. You can't use -theme_url because
you don't know what the final URL will be. On Windows the theme path
could end up being "C:/Themes" or on UNIX or OSX it could be something
like "/mnt/cd/Themes" - it all depends on where the CD is mounted.
To deal with this, use the -burn option:
% album -burn ...
This requires that the paths from the album to the theme don't change.
The best way to do this is take the top directory that you're going to
burn and put the themes and the album in that directory, then specify
the full path to the theme. For example, create the directories:
myISO/Photos/
myISO/Themes/Blue
Then you can run:
% album -burn -theme myISO/Themes/Blue myISO/Photos
Then you can make a CD image from the myISO directory (or higher).
If you are using 'galbum' (the GUI front end) then you can't specify
the full path to the theme, so you'll need to make sure that the version
of the theme you want to burn is the first one found in the theme_path
(which is likely based off the data_path). In the above example you
could add 'myISO' to the top of the data_path, and it should
use the 'myISO/Themes/Blue' path for the Blue theme.
You can also look at shellrun for windows users, you can have it
automatically launch the album in a browser. (Or see winopen)
15: Indexing your entire album
To navigate an entire album on one page use the caption_index tool.
It uses the same options as album (though it ignores many
of them) so you can just replace your call to "album" with "caption_index"
The output is the HTML for a full album index.
See an example index
for one of my example photo albums16: Updating Albums With CGI
First you need to be able to upload the photo to the album directory.
I suggest using ftp for this. You could also write a javascript that
can upload files, if someone could show me how to do this I'd love to know.
Then you need to be able to remotely run album. To avoid abuse, I
suggest setting up a CGI script that touches a file (or they can just
ftp this file in), and then have a cron job that checks for that
file every few minutes, and if it finds it it removes it and runs album.
[unix only] (You will probably need to set $PATH or use absolute paths
in the script for convert)
If you want immediate gratification, you can run album from a CGI script
such as this one.
If your photos are not owned by the webserver user, then you
need to run through a setud script which you run from a CGI [unix only].
Put the setuid script in a secure place, change it's ownership to be the
same as the photos, and then run "chmod ug+s" on it. Here are example
setuid and CGI scripts. Be sure to edit them.
Also look at caption_edit.cgi which allows you (or others) to edit
captions/names/headers/footers through the web.
1: Methods
There are easy ways and complicated ways to create a custom theme,
depending on what you want to be able to do.
2: Editing current theme HTML
If you just want to slightly change the theme to match the output
of your site, it might make sense to edit a current theme.
In the theme directory there are two *.th files. album.th is
the template for album pages (the thumbnail pages) and image.th
is the template for image pages (where you can see medium or full
size images). The files are very similar to HTML except for
some embedded <: ePerl :> code. Even if you don't know perl or
ePerl you can still edit the HTML to make simple changes.
Good starting themes:
Any simmer_theme is going to be up to date and clean, such as "Blue" or
"Maste." If you only need 4 corner thumbnail borders then take a look
at "Eddie Bauer." If you want overlay/transparent borders, see FunLand.
If you want something demonstrating a minimal amount of code, try "simple"
but be warned that I haven't touched the theme in a long time.
3: The easy way, simmer_theme from graphics.
Most themes have the same basic form, show a bunch of thumbnails
for directories and then for images, with a graphic border, line and
background. If this is what you want, but you want to create new
graphics, then there is a tool that will build your themes for you.
If you create a directory with the images and a CREDIT file as well
as a Font or Style.css file, then simmer_theme will create theme for you.
Files:
Font/Style.css
This determines the fonts used by the theme. The "Font" file is the
older system, documented below. Create a Style.css file and define
styles for: body, title, main, credit and anything else you like.
See FunLand for a simple example.
Alternatively, use a font file. An example Font file is:
--------------------------------------------------
$TITLE_FONT = "size='4' color='#ffffff' face='Times New Roman,Georgia,Times'";
$MAIN_FONT = "face='Times New Roman,Georgia,Times'";
$CREDIT_FONT = "size='-1' face='Verdana' color='#ffffff'";
$BODY = "background='$PATH/bkgrnd.gif' link='#0099FF'">
--------------------------------------------------
CREDIT
The credit file is two lines and is used for the theme index at MarginalHacks.
If you're never submitting your theme to us, then you don't need this file.
(But please do!) If so, the two lines (and only two lines) are:
1) A short description of the theme (keep it all on one line)
2) Your name (can be inside a mailto: or href link)
Null.gif
Each simmer theme needs a spacer image, this is a 1x1 transparent gif.
You can just copy this from another simmer theme.
Optional image files:
Bar Images
The bar is composed of Bar_L.gif, Bar_R.gif and Bar_M.gif in the middle.
The middle is stretched. If you need a middle piece that isn't stretched, use:
Bar_L.gif, Bar_ML.gif, Bar_M.gif, Bar_MR.gif, Bar_R.gif
And then the Bar_ML.gif and Bar_MR.gif will be stretched. (See the
Craftsman theme for an example of this).
Locked.gif
A lock image for any directories that have .htaccess
Background image
If you want a background image, specify it in the Font file in the $BODY
section, as in the example above. The $PATH variable will be replaced
with the path to the theme files:
More.gif
When an album page has sub-albums to list, it first shows the 'More.gif'
image.
Next.gif, Prev.gif, Back.gif
For the next and previous arrows and the back button
Icon.gif
Shown at the top left by the parent albums, this is often just the text "Photos"
Border Images
There are many ways to slice up a border, from simple to complex, depending on
the complexity of the border and how much you want to be able to stretch it:
4 pieces Uses Bord_L.gif, Bord_R.gif, Bord_T.gif, Bord_B.gif
(The corners go with the left and right images)
4 piece borders usually don't stretch well so they don't work well on
image_pages. Generally you can cut the corners out of the left and
right images to make:
8 pieces Also includes Bord_TL.gif, Bord_TR.gif, Bord_BL.gif, Bord_BR.gif
8 piece borders allow you to stretch to handle most sized images
12 pieces Also includes Bord_LT.gif, Bord_RT.gif, Bord_LB.gif, Bord_RB.gif
12 pieces allow stretching of borders that have more complex corners (such
as Dominatrix6 or Ivy)
Overlay Borders Can use transparent images that can be partially
overlaying your thumbnail. See below.
Here's how the normal border pieces are laid out:
12 piece borders
TL T TR 8 piece borders 4 piece borders
LT RT TL T TR TTTTTTT
L IMG R L IMG R L IMG R
LB RB BL B BR BBBBBBB
BL B BR
Note that every row of images must be the same height, though the
widths do not have to line up. (i.e., height TL = height T = height TR)
(This is not true about overlay borders!)
Once you've created these files, you can run the simmer_theme tool
(an optional tool download at MarginalHacks.com) and your theme will
then be ready to use!
If you need different borders for the image pages, then use the same
filenames prefixed by 'I' - such as IBord_LT.gif, IBord_RT.gif,...
Overlay borders allow for really fantastic effects with image borders.
Currently there's no support for different overlay borders for images.
For using Overlay borders, create images:
Over_TL.png Over_T.png Over_TR.png
Over_L.png Over_R.png
Over_BL.png Over_B.png Over_BR.png
Then figure out how many pixels of the borders are padding (outside photo)
Then put those values in files: Over_T.pad Over_R.pad Over_B.pad Over_L.pad
See "Themes/FunLand" for a simple example
Multi-lingual Images
If your images have text, you can translate them into other languages
so that albums can be generated in other languages. For example, you
can create a Dutch "More.gif" image and put it in 'lang/nl/More.gif'
in the theme (nl is the language code for Dutch).
When the user runs album in Dutch (album -lang nl) then the theme
will use the Dutch image if found. Themes/Blue has a simple example.
The currently "translated" images are:
More, Back, Next, Prev and Icon
You can create an HTML table that shows the translations immediately
available to themes with -list_html_trans:
% album -list_html_trans > trans.html
Then view trans.html in a browser. Unfortunately different languages
have different charsets, and an HTML page can only have one. The
output is in utf-8, but you can edit the "charset=utf-8" to properly
view language characters in different charsets (such as hebrew).
If you need more words translated for themes, let me know, and if you
create any new language images for a theme, please send them to me!
4: From scratch, Theme API
This is a much heavier job - you need to have a very clear idea of
how you want album to place the images on your page. It might be
a good idea to start with modifying existing themes first to get
an idea of what most themes do. Also look at existing themes
for code examples (see suggestions above).
Themes are directories that contain at the minimum an 'album.th' file.
This is the album page theme template. Often they also contain an 'image.th'
which is the image theme template, and any graphics/css used by the theme.
Album pages contain thumbnails and image pages show full/medium sized images.
The .th files are ePerl, which is perl embedded inside of HTML. They
end up looking a great deal like the actual album and image HTML themselves.
To write a theme, you'll need to understand the ePerl syntax. You can
find more information from the actual ePerl tool available at MarginalHacks
(though this tool is not needed to use themes in album).
There are a plethora of support routines available, but often only
a fraction of these are necessary - it may help to look at other themes
to see how they are generally constructed.
Function table:
Required Functions
Meta() Must be called in the section of HTML
Credit() Gives credit ('this album created by..')
Must be called in the section of HTML
Body_Tag() Called inside the actual tag.
Paths and Options
Option($name) Get the value of an option/configuration setting
Version() Return the album version
Version_Num() Return the album version as just a number (i.e. "3.14")
Path($type) Returns path info for $type of:
album_name The name of this album
dir Current working album directory
album_file Full path to the album index.html
album_path The path of parent directories
theme Full path to the theme directory
img_theme Full path to the theme directory from image pages
page_post_url The ".html" to add onto image pages
parent_albums Array of parent albums (album_path split up)
Image_Page() 1 if we're generating an image page, 0 for album page.
Page_Type() Either 'image_page' or 'album_page'
Theme_Path() The filesystem path to the theme files
Theme_URL() The URL path to the theme files
Header and Footer
isHeader(), pHeader() Test for and print the header
isFooter(), pFooter() Same for the footer
Generally you loop through the images and directories using local variables:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
This will print the name of each image. Our object types are either 'pics'
for images or 'dirs' for the child directories. Here are the object functions:
Objects (type is either 'pics' (default) or 'dirs')
First($type) Get the first image or sub-album object.
Last($type) Last object
Next($obj) Given an object, return the next object
Next($obj,1) Same, loop past end to beginning.
Prev($obj), Prev($obj,1) Similar to Next()
num('pics') or just num() Total number of images in this album
num('dirs') Total number of children/sub-albums
Also:
num('parent_albums') Total number of parents leading up to this album.
Object lookup:
get_obj($num, $type, $loop)
Finds object by number ('pics' or 'dirs').
If $loop is set than the count will wrap around.
Object Properties
Each object (image or child albums) has properties.
Some properties are accessed by a single field:
Get($obj,$field) Get a single field of an object
Field Description
----- ----------
type What type of object? Either 'pics' or 'dirs'
is_movie Boolean: is this a movie?
name Name (cleaned and optionally from captions)
cap Image caption
capfile Optional caption file
alt Alt tag
num_pics [directories only, -dir_thumbs] Num of pics in directory
num_dirs [directories only, -dir_thumbs] Num of dirs in directory
Some properties are accessed by a field and subfield. For example,
each image has information for different sizes: full, medium and thumb
(though 'medium' is optional).
Get($obj,$size,$field) Get a property for a given size
Size Field Description
---- ----- ----------
$size x Width
$size y Height
$size file Filename (without path)
$size path Filename (full path)
$size filesize Filesize in bytes
full tag The tag (either 'image' or 'embed') - only for 'full'
We also have URL information which is access according to the
page it's coming 'from' and the image/page it's pointing 'to':
Get($obj,'URL',$from,$to) Get a URL for an object from -> to
Get($obj,'href',$from,$to) Same but wraps it in an 'href' string.
Get($obj,'link',$from,$to) Same but wraps the object name inside the href link.
From To Description
---- -- ----------
album_page image Image_URL from album_page
album_page thumb Thumbnail from album_page
image_page image Image_URL from image_page
image_page image_page This image page from another image page
image_page image_src The <img src> URL for the image page
image_page thumb Thumbnail from image_page
Directory objects also have:
From To Description
---- -- ----------
album_page dir URL to the directory from it's parent album page
Parent Albums
Parent_Album($num) Get a parent album string (including the href)
Parent_Albums() Return a list of the parent albums strings (including href)
Parent_Album($str) A join($str) call of Parent_Albums()
Back() The URL to go back or up one page.
Images
This_Image The image object for an image page
Image($img,$type) The <img> tags for type of medium,full,thumb
Image($num,$type) Same, but by image number
Name($img) The clean or captioned name for an image
Caption($img) The caption for an image
Child Albums
Name($alb)
Caption($img) The caption for an image
Convenience Routines
Pretty($str,$html,$lines) Pretty formats a name.
If $html then HTML is allowed (i.e., use 0 for <title> and the like)
Currently just puts prefix dates in a smaller font (i.e. '2004-12-03.Folder')
If $lines then multilines are allowed
Currently just follows dates with a 'br' line break.
New_Row($obj,$cols,$off) Should we start a new row after this object?
Use $off if the first object is offset from 1
Image_Array($src,$x,$y,$also,$alt)
Returns an <img> tag given $src, $x,...
Image_Ref($ref,$also,$alt)
Like Image_Array, but $ref can be a hash of
Image_Arrays keyed by language ('_' is default).
album picks the Image_Array by what languages are set.
Border($img,$type,$href,@border)
Border($str,$x,$y,@border)
Create the full bordered image.
See 'Borders' for more information.
If you're creating a theme from scratch, consider adding support for -slideshow.
The easiest way to do this is to cut/paste the "slideshow" code out of an
existing theme.
5: Submitting Themes
Have a custom theme? I'd love to see it, even if it's totally site-specific.
If you have a new theme you'd like to offer the public, feel free to send
it to me and/or a URL where I can see how it looks. Be sure to set the CREDIT
file properly and let me know if you are donating it to MarginalHacks for
everyone to use or if you want it under a specific license.
6: Converting v2.0 Themes to v3.0 Themes
album v2.0 introduced a theme interface which has been rewritten. Most
2.0 themes (especially those that don't use many of the global variables)
will still work, but the interface is deprecated and may disappear in
the near future.
It's not difficult to convert from v2.0 to v3.0 themes.
The v2.0 themes used global variables for many things. These are now
deprecated In v3.0 you should keep track of images and directories in
variables and use the 'iterators' that are supplied, for example:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
Will loop through all the images and print their names.
The chart below shows you how to rewrite the old style calls which
used a global variable with the new style which uses a local variable,
but to use these calls you need to rewrite your loops as above.
Here is a conversion chart for helping convert v2.0 themes to v3.0:
# Global vars shouldn't be used
# ALL DEPRECATED - See new local variable loop methods above
$PARENT_ALBUM_CNT Rewrite with: Parent_Album($num) and Parent_Albums($join)
$CHILD_ALBUM_CNT Rewrite with: my $dir = First('dirs'); $dir=Next($dir);
$IMAGE_CNT Rewrite with: my $img = First('pics'); $pics=Next($pics);
@PARENT_ALBUMS Can instead use: @{Path('parent_albums')}
@CHILD_ALBUMS, @CHILD_ALBUM_NAMES, @CHILD_ALBUM_URLS, ...
# Old global variable modifiers:
# ALL DEPRECATED - See new local variable loop methods above
Next_Image(), Images_Left(), Image_Cnt(), Image_Prev(), Image_Next()
Set_Image_Prev(), Set_Image_Next(), Set_Image_This()
Next_Child_Album(), Child_Album_Cnt(), Child_Albums_Left()
# Paths and stuff
pAlbum_Name() Path('album_name')
Album_Filename() Path('album_file')
pFile($file) print read_file($file)
Get_Opt($option) Option($option)
Index() Option('index')
pParent_Album($str) print Parent_Album($str)
# Parent Albums
Parent_Albums_Left Deprecated, see '$PARENT_ALBUM_CNT' above
Parent_Album_Cnt Deprecated, see '$PARENT_ALBUM_CNT' above
Next_Parent_Album Deprecated, see '$PARENT_ALBUM_CNT' above
pJoin_Parent_Albums print Parent_Albums(\@_)
# Images, using variable '$img'
pImage() Use $img instead and:
print Get($img,'href','image');
print Get($img,'thumb') if Get($img,'thumb');
print Name($img), "</a>";
pImage_Src() print Image($img,'full')
Image_Src() Image($img,'full')
pImage_Thumb_Src() print Image($img,'thumb')
Image_Name() Name($img)
Image_Caption() Caption($img)
pImage_Caption() print Get($img,'Caption')
Image_Thumb() Get($img,'URL','thumb')
Image_Is_Pic() Get($img,'thumb')
Image_Alt() Get($img,'alt')
Image_Filesize() Get($img,'full','filesize')
Image_Path() Get($img,'full','path')
Image_Width() Get($img,'medium','x') || Get($img,'full','x')
Image_Height() Get($img,'medium','y') || Get($img,'full','y')
Image_Filename() Get($img,'full','file')
Image_Tag() Get($img,'full','tag')
Image_URL() Get($img,'URL','image')
Image_Page_URL() Get($img,'URL','image_page','image_page') || Back()
# Child album routines, using variable '$alb'
pChild_Album($nobr) print Get($alb,'href','dir');
my $name = Name($alb);
$name =~ s/<br>//g if $nobr;
print $name,"</a>";
Child_Album_Caption() Caption($alb,'dirs')
pChild_Album_Caption() print Child_Album_Caption($alb)
Child_Album_URL() Get($alb,'URL','dir')
Child_Album_Name() Name($alb)
# Unchanged
Meta() Meta()
Credit() Credit()
album-4.17/Docs/hu/txt_2 0000655 0000000 0000000 00000015133 11012410266 013530 0 ustar root root MINI HOW-TO
ITEM: Egyszerű album
Az album program telepítése után próbáljuk ki
a következő egyszerű példákat! Probléma esetén vegyük
igénybe a telepítési útmutató segítségét!
A sablonok (theme-ek) és a fotóalbum tárolásához hozzunk létre
egy könyvtárat, ebben a leírásban a /home/httpd/test könyvtárat
fogjuk használni. Olyan könyvtárat kell választanunk, amelyet a
web szerver is megtalál. Példánkban a http://myserver/test címet fogjuk
használni, itt éri el a web szerver a "test" könyvtárunkat.
Először hozzunk létre egy könyvtárat, és másoljuk bele a képeket!
Legyen ez a könyvtár a /home/httpd/test/Photos.
A képek neve a példában 'IMG_001.jpg', ..., 'IMG_004.jpg'.
A legegyszerűbb album létrehozásához adjuk ki a következő utasítást:
% album /home/httpd/test/Photos
Ezek után a a fényképalbumot egy web böngészővel a következő címen
érhetjük el:
http://myserver/test/Photos
ITEM: A fotók feliratozása
Készítsük el a /home/httpd/test/Photos/captions.txt fájlt a
következő tartalommal (használjuk a "tab" gombot a " [tab] "
helyén):
-- captions.txt ---------
IMG_001.jpg [tab] Az első kép neve
IMG_002.jpg [tab] Második kép
IMG_003.jpg [tab] Újabb kép [tab] micsoda felirat!
IMG_004.jpg [tab] Utolsó kép [tab] újabb felirat.
-------------------------
Ezután futtassuk újra az album programot:
% album /home/httpd/test/Photos
és íme, a feliratok megjelentek.
Most készítsük el a /home/httpd/test/Photos/header.txt fájlt,
benne tetszőleges szöveggel. Az album program futtatása után
a felirat megjelenik az oldal tetején.
ITEM: Képek elrejtése
Képek, fájlok vagy könyvtárak többféleképpen is elrejthetők. Most
a captions.txt fájl segítségével mutatjuk be képek elrejtését.
A "#" jelet írjuk be valamelyik sor elejére:
-- captions.txt ---------
IMG_001.jpg [tab] Az első kép neve
#IMG_002.jpg [tab] Második kép
IMG_003.jpg [tab] Újabb kép [tab] micsoda felirat!
IMG_004.jpg [tab] Utolsó kép [tab] újabb felirat.
-------------------------
Az album program futtatása után látható, hogy az IMG_002.jpg nevű
kép hiányzik. Ha ezt az album program első futtatása előtt csináltuk
volna, akkor a közepes és a kis méretű képeket (ikonokat) nem is
készítette volna el a program. Ezek a most már felesleges képek
utólag is eltávolíthatók a -clean kapcsoló használatával:
% album -clean /home/httpd/test/Photos
ITEM: Sablonok használata
Amennyiben a sablonok megfelelően telepítve vannak, és
theme_path a sablonok helyét jelzi, akkor a sablonok
használhatók a következőképpen:
% album -theme Blue /home/httpd/test/Photos
Ekkor a kész fotóalbum a Blue nevű sablont használja. Ha az
albumban meg nem jelenített képeket találunk, akkor valószínűleg
olyan könyvtárba lett telepítve a sablon, amelyet a böngészőprogram
nem ér el, a részletekért l. a telepítési útmutatót.
A program futáskor elmenti az alkalmazott beállításokat, így ha a
következő alkalommal futtatjuk a programot:
% album /home/httpd/test/Photos
még mindig a Blue sablont használja. A sablon kikapcsolásához a
következő parancsot használjuk:
% album -no_theme /home/httpd/test/Photos
ITEM: Közepes méretű képek
A teljes méretű fényképek rendszerint túl nagyok egy webes albumhoz,
ezért az album oldalakon közepes méretű képeket használunk:
% album -medium 33% /home/httpd/test/Photos
A teljes méretű képek nem vesznek el, alapesetben
a közepes méretű képre kattintva
tekinthetjük meg őket, vagy az
% album -just_medium /home/httpd/test/Photos
parancs alkalmazásával elérhetjük, hogy a teljes méretű képekre ne
helyezzen el linket a program (feltéve, hogy előtte a -medium kapcsolóval
hívtuk a programot valamikor).
ITEM: EXIF feliratok használata
Megadhatjuk például, hogy a fénykép készítésekor alkalmazott apertúra
belekerüljön a képek feliratába:
% album -exif "<br>apertúra=%Aperture%" /home/httpd/test/Photos
Ez a parancs csak azon képek feliratához írja hozzá az apertúrára vonatkozó információt,
amelyek exif információjában szerepel az "Aperture" kulcsszó (a "%" jelek közti
rész jelenik meg a feliratban). Az előző parancsban szereplő <br>
hatására az exif információ a kép feliratában új sorban jelenik meg.
Egyéb exif információ is elhelyezhető a feliratban, pl:
% album -exif "<br>fókusz: %FocalLength%" /home/httpd/test/Photos
Mivel az előző futtatáskor a program elmentette a beállításokat, most
mindkét exif információ megjelenik a képek feliratában: az apertúra és a
fókusztávolság is. Ha törölni akarjuk az apertúrára vonatkozó részt:
% album -no_exif "<br>aperture=%Aperture%" /home/httpd/test/Photos
A "-no_exif" kapcsolónak pontosan meg kell egyeznie a korábban megadott
-exif kapcsolónál megadott résszel, különben a program figyelmen kívül hagyja.
A program által elmentett konfigurációs állományt is szabadon meg lehet változtatni:
/home/httpd/test/Photos/album.conf
Itt is lehet törölni a kérdéses részt.
ITEM: További albumok hozzáadása
Tegyük fel, hogy a spanyolországi nyaralás során készült képeket a
/home/httpd/test/Photos/Spain/
könyvtárban helyeztük el. Futtassuk most az album programot az
összes képet tartalmazó könyvtárra:
% album /home/httpd/test/Photos
Ez a parancs elkészíti az albumot a Photos könyvtárban, majd készít egy linket a
Spain könyvtárra, és ugyanazon beállításokkal, sablonnal elkészíti az
albumot a Spain alkönyvtárban is.
Újabb utazást követően a képeket a következő könyvtárba tesszük:
/home/httpd/test/Photos/Italy/
Újra futtatva a programot az összes képet tartalmazó könyvtárra:
% album /home/httpd/test/Photos
Ez a parancs újra feldolgozza a Spain könyvtárat is, ami nem változott.
Az album program nem készít újabb HTML oldalakat vagy kis méretű
képeket, ha azokat már korábban elkészítette, de a feleslegesen feldolgozott
könyvtárak így is feleslegesen töltik az időt, különösen nagy albumok
esetén. Ennek elkerülésére megadhatjuk, hogy csak az új könyvtárat
dolgozza fel:
% album -add /home/httpd/test/Photos/Italy
Ez az eredeti albumhoz hozzáadja a linket az új albumhoz, és elkészíti
az Italy albumot.
ITEM: Fordította:
György Károlyi [http://www.me.bme.hu/~karolyi/indexe.html]
album-4.17/Docs/hu/Section_5.html 0000644 0000000 0000000 00000047523 12661460265 015310 0 ustar root root
MarginalHacks album - Feature Requests, Bugs, Patches and Troubleshooting
- Documentation
A l b u m
F i v e - - F e a t u r e R e q u e s t s , B u g s , P a t c h e s a n d T r o u b l e s h o o t i n g
1: Feature Requests
If there's something you want added to album, first make sure
it doesn't already exist! Check the man page or the usage:
% man album% album -h
Also see -more and -usage options.
If you don't see it there, consider writing a patch or a plugin.
2: Bug reports
Before you submit a bug, please make sure you have the most current release of album!
When submitting a bug, I need to know at least:
1) Your operating system
2) The exact problem and the exact error messages
I'd also like to know, if possible:
1) The exact album command you ran
2) The output from the command
And I generally also need the debug output of album:
% album -d
Finally, make sure that you've got the most current
version of album, and the most current themes as well.
3: Writing Patches, Modifying album
If you want to modify album, you might want to check with me
first to make sure it's not already on my development plate.
If not, then consider writing it as a plugin instead of patching
the album source. This avoids adding complexity to album for
features that may not be globally used.
If it needs to go into album (for example, if it's a bug), then
please make sure to first download the most recent copy of album
first, then patch that and send me either a diff, a patch, or the
full script. If you comment off the changes you make that'd be great too.
4: Known Bugs
v3.11: -clear_* and -no_* doesn't clear out parent directory options.
v3.10: Burning CDs doesn't quite work with theme absolute paths.
v3.00: Array and code options are saved backwards, for example:
"album -lang aa .. ; album -lang bb .." will still use language 'aa'
Also, in some cases array/code options in sub-albums will not
be ordered right the first time album adds them and you may
need to rerun album. For example:
"album -exif A photos/ ; album -exif B photos/sub"
Will have "B A" for the sub album, but "A B" after: "album photos/sub"
5: PROBLEM: My index pages are too large!
I get many requests to break up the index pages after reaching a certain
threshold of images.
The problem is that this is hard to manage - unless the index pages are
treated just like sub-albums, then you now have three major components
on a page, more indexes, more albums, and thumbnails. And not only is
that cumbersome, but it would require updating all the themes.
Hopefully the next major release of album will do this, but until then
there is another, easier solution - just break the images up into
subdirectories before running album.
I have a tool that will move new images into subdirectories for you and
then runs album:
in_album6:ERROR: no delegate for this image format (./album)
You have the album script in your photo directory and it can't make
a thumbnail of itself! Either:
1) Move album out of the photo directory (suggested)
2) Run album with -known_images
7:ERROR: no delegate for this image format (some_non_image_file)
Don't put non-images in your photo directory, or else run with -known_images.
8:ERROR: no delegate for this image format (some.jpg)9:ERROR: identify: JPEG library is not available (some.jpg)
Your ImageMagick installation isn't complete and doesn't know how
to handle the given image type.
10:ERROR: Can't get [some_image] size from -verbose output.
ImageMagick doesn't know the size of the image specified. Either:
1) Your ImageMagick installation isn't complete and can't handle the image type.
2) You are running album on a directory with non-images in it without
using the -known_images option.
If you're a gentoo linux user and you see this error, then run this command
as root (thanks Alex Pientka):
USE="avi gif jpeg mpeg png quicktime tiff" emerge imagemagick
1: Configuration Files
Album behavior can be controlled through command-line options, such as:
% album -no_known_images% album -geometry 133x100% album -exif "File: %File name% " -exif "taken with %Camera make%"
But these options can also be specified in a configuration file:
# Example configuration file # comments are ignored
known_images 0 # known_images=0 is same as no_known_images
geometry 133x100
exif "File: %File name% "
exif "taken with %Camera make%"
The configuration file format is one option per line optionally followed
by whitespace and the option value. Boolean options can be set without
the option value or can be cleared/set with 0 and 1.
2: Location Of Configuration Files
album looks for configuration files in a few locations, in order:
/etc/album/conf System-wide settings
/etc/album.conf System-wide settings
$BASENAME/album.conf In the 'album' install directory
$HOME/.albumrc User specific settings
$HOME/.album.conf User specific settings
$DOT/album.conf User specific (I keep my dot files elsewhere)
$USERPROFILE/album.conf For Windows (C:\Documents and Settings\TheUser)
album also looks for album.conf files inside the photo album directories.
Sub-albums can also have album.conf which will alter the settings
from parent directories (this allows you to, for example, have a
different theme for part of your photo album). Any album.conf files
in your photo album directories will configure the album and any sub-albums
unless overridden by any album.conf settings found in a sub-album.
As an example, consider a conf for a photo album at 'images/album.conf':
theme Dominatrix6
columns 3
And another conf inside 'images/europe/album.conf':
theme Blue
crop
album will use the Dominatrix6 theme for the images/ album and all of
it's sub-albums except for the images/europe/ album which will use
the Blue theme. All of the images/ album and sub-albums will have
3 columns since that wasn't changed in the images/europe/ album, however
all of the thumbnails in images/europe/ and all of it's sub-albums
will be cropped due to the 'crop' configuration setting.
3: Saving Options
Whenever you run an album, the command-line options are saved in
an album.conf inside the photo album directory. If an album.conf
already exists it will be modified not overwritten, so it is safe
to edit this file in a text editor.
This makes it easy to make subsequent calls to album. If you
first generate an album with:
% album -crop -no_known_images -theme Dominatrix6 -sort date images/
Then the next time you call album you can just:
% album images/
This works for sub-albums as well:
% album images/africa/
Will also find all of the saved options.
Some 'one-time only' options are not saved for obvious reasons, such
as -add, -clean, -force, -depth, etc..
Running album multiple times on the same directories can
get confusing if you don't understand how options are saved.
Here are some examples.
Premises:
1) Command-line options are processed before conf options found
in the album directory.
2) Album should run the same the next time you call it if you
don't specify any options.
For example, consider running album twice on a directory:
% album -exif "comment 1" photos/spain% album photos/spain
The second time you run album you'll still get the "comment 1"
exif comment in your photos directory.
3) Album shouldn't end up with multiple copies of the same array
options if you keep calling it with the same command-line
For example:
% album -exif "comment 1" photos/spain% album -exif "comment 1" photos/spain
The second time you run album you will NOT end up with multiple
copies of the "comment 1" exif comment.
However, please note that if you re-specify the same options
each time, album may run slower because it thinks it needs to
regenerate your html!
As an example, if you run:
% album -medium 640x640 photos/spain
(then later...)
% album -medium 640x640 photos/spain
Then the second time will unnecessarily regenerate all your
medium images. This is much slower.
It's better to specify command-line options only the first time
and let them get saved, such as:
% album -medium 640x640 photos/spain
(then later...)
% album photos/spain
Unfortunately these constraints mean that any new array options will
be put at the beginning of your list of -exif options.
For example:
% album -exif "comment 1" photos/spain% album -exif "comment 2" photos/spain
The comments will actually be ordered "comment 2" then "comment 1"
To specify exact ordering, you may need to re-specify all options.
Either specify "comment 1" to put it back on top:
% album -exif "comment 1" photos/spain
Or just specify all the options in the order you want:
% album -exif "comment 1" -exif "comment 2" photos/spain
Sometimes it may be easier to merely edit the album.conf file directly
to make any changes.
Finally, this only allows us to accumulate options.
We can delete options using -no and -clear, see the section on Options,
these settings (or clearings) will also be saved from run to run.
1: Egyszerű album
Az album program telepítése után próbáljuk ki
a következő egyszerű példákat! Probléma esetén vegyük
igénybe a telepítési útmutató segítségét!
A sablonok (theme-ek) és a fotóalbum tárolásához hozzunk létre
egy könyvtárat, ebben a leírásban a /home/httpd/test könyvtárat
fogjuk használni. Olyan könyvtárat kell választanunk, amelyet a
web szerver is megtalál. Példánkban a http://myserver/test címet fogjuk
használni, itt éri el a web szerver a "test" könyvtárunkat.
Először hozzunk létre egy könyvtárat, és másoljuk bele a képeket!
Legyen ez a könyvtár a /home/httpd/test/Photos.
A képek neve a példában 'IMG_001.jpg', ..., 'IMG_004.jpg'.
A legegyszerűbb album létrehozásához adjuk ki a következő utasítást:
% album /home/httpd/test/Photos
Ezek után a a fényképalbumot egy web böngészővel a következő címen
érhetjük el:
http://myserver/test/Photos
2: A fotók feliratozása
Készítsük el a /home/httpd/test/Photos/captions.txt fájlt a
következő tartalommal (használjuk a "tab" gombot a " [tab] "
helyén):
-- captions.txt ---------
IMG_001.jpg [tab] Az első kép neve
IMG_002.jpg [tab] Második kép
IMG_003.jpg [tab] Újabb kép [tab] micsoda felirat!
IMG_004.jpg [tab] Utolsó kép [tab] újabb felirat.
-------------------------
Ezután futtassuk újra az album programot:
% album /home/httpd/test/Photos
és íme, a feliratok megjelentek.
Most készítsük el a /home/httpd/test/Photos/header.txt fájlt,
benne tetszőleges szöveggel. Az album program futtatása után
a felirat megjelenik az oldal tetején.
3: Képek elrejtése
Képek, fájlok vagy könyvtárak többféleképpen is elrejthetők. Most
a captions.txt fájl segítségével mutatjuk be képek elrejtését.
A "#" jelet írjuk be valamelyik sor elejére:
-- captions.txt ---------
IMG_001.jpg [tab] Az első kép neve
#IMG_002.jpg [tab] Második kép
IMG_003.jpg [tab] Újabb kép [tab] micsoda felirat!
IMG_004.jpg [tab] Utolsó kép [tab] újabb felirat.
-------------------------
Az album program futtatása után látható, hogy az IMG_002.jpg nevű
kép hiányzik. Ha ezt az album program első futtatása előtt csináltuk
volna, akkor a közepes és a kis méretű képeket (ikonokat) nem is
készítette volna el a program. Ezek a most már felesleges képek
utólag is eltávolíthatók a -clean kapcsoló használatával:
% album -clean /home/httpd/test/Photos4: Sablonok használata
Amennyiben a sablonok megfelelően telepítve vannak, és
theme_path a sablonok helyét jelzi, akkor a sablonok
használhatók a következőképpen:
% album -theme Blue /home/httpd/test/Photos
Ekkor a kész fotóalbum a Blue nevű sablont használja. Ha az
albumban meg nem jelenített képeket találunk, akkor valószínűleg
olyan könyvtárba lett telepítve a sablon, amelyet a böngészőprogram
nem ér el, a részletekért l. a telepítési útmutatót.
A program futáskor elmenti az alkalmazott beállításokat, így ha a
következő alkalommal futtatjuk a programot:
% album /home/httpd/test/Photos
még mindig a Blue sablont használja. A sablon kikapcsolásához a
következő parancsot használjuk:
% album -no_theme /home/httpd/test/Photos5: Közepes méretű képek
A teljes méretű fényképek rendszerint túl nagyok egy webes albumhoz,
ezért az album oldalakon közepes méretű képeket használunk:
% album -medium 33% /home/httpd/test/Photos
A teljes méretű képek nem vesznek el, alapesetben
a közepes méretű képre kattintva
tekinthetjük meg őket, vagy az
% album -just_medium /home/httpd/test/Photos
parancs alkalmazásával elérhetjük, hogy a teljes méretű képekre ne
helyezzen el linket a program (feltéve, hogy előtte a -medium kapcsolóval
hívtuk a programot valamikor).
6: EXIF feliratok használata
Megadhatjuk például, hogy a fénykép készítésekor alkalmazott apertúra
belekerüljön a képek feliratába:
% album -exif "<br>apertúra=%Aperture%" /home/httpd/test/Photos
Ez a parancs csak azon képek feliratához írja hozzá az apertúrára vonatkozó információt,
amelyek exif információjában szerepel az "Aperture" kulcsszó (a "%" jelek közti
rész jelenik meg a feliratban). Az előző parancsban szereplő <br>
hatására az exif információ a kép feliratában új sorban jelenik meg.
Egyéb exif információ is elhelyezhető a feliratban, pl:
% album -exif "<br>fókusz: %FocalLength%" /home/httpd/test/Photos
Mivel az előző futtatáskor a program elmentette a beállításokat, most
mindkét exif információ megjelenik a képek feliratában: az apertúra és a
fókusztávolság is. Ha törölni akarjuk az apertúrára vonatkozó részt:
% album -no_exif "<br>aperture=%Aperture%" /home/httpd/test/Photos
A "-no_exif" kapcsolónak pontosan meg kell egyeznie a korábban megadott
-exif kapcsolónál megadott résszel, különben a program figyelmen kívül hagyja.
A program által elmentett konfigurációs állományt is szabadon meg lehet változtatni:
/home/httpd/test/Photos/album.conf
Itt is lehet törölni a kérdéses részt.
7: További albumok hozzáadása
Tegyük fel, hogy a spanyolországi nyaralás során készült képeket a
/home/httpd/test/Photos/Spain/
könyvtárban helyeztük el. Futtassuk most az album programot az
összes képet tartalmazó könyvtárra:
% album /home/httpd/test/Photos
Ez a parancs elkészíti az albumot a Photos könyvtárban, majd készít egy linket a
Spain könyvtárra, és ugyanazon beállításokkal, sablonnal elkészíti az
albumot a Spain alkönyvtárban is.
Újabb utazást követően a képeket a következő könyvtárba tesszük:
/home/httpd/test/Photos/Italy/
Újra futtatva a programot az összes képet tartalmazó könyvtárra:
% album /home/httpd/test/Photos
Ez a parancs újra feldolgozza a Spain könyvtárat is, ami nem változott.
Az album program nem készít újabb HTML oldalakat vagy kis méretű
képeket, ha azokat már korábban elkészítette, de a feleslegesen feldolgozott
könyvtárak így is feleslegesen töltik az időt, különösen nagy albumok
esetén. Ennek elkerülésére megadhatjuk, hogy csak az új könyvtárat
dolgozza fel:
% album -add /home/httpd/test/Photos/Italy
Ez az eredeti albumhoz hozzáadja a linket az új albumhoz, és elkészíti
az Italy albumot.
8: Fordította:
György Károlyi [http://www.me.bme.hu/~karolyi/indexe.html]
1: Minimum Requirements
1) The album perl script
2) ImageMagick tools (specifically 'convert')
Put the 'album' script and the ImageMagick tools somewhere in your PATH,
or else call 'album' by it's full path (and specify the full path to
convert either in the album script or in the album configuration files.
2: Initial Configuration
The first time you run album it will ask you a few questions to
setup the configuration for you. If you're on UNIX/OSX, then you
can run the first time as root so that it sets up the global configuration
and themes for everyone instead of just the current user.
3: Optional Installation
3) Themes
4) ffmpeg (for movie thumbnails)
5) jhead (for reading EXIF info)
6) plugins
7) Various tools available at MarginalHacks.com
4: UNIX
Most UNIX distros come with ImageMagick and perl, so just download
the album script and themes (#1 and #3 above) and you're done.
To test your install, run the script on a directory with images:
% album /path/to/my/photos/5: Debian UNIX
album is in debian stable, though right now it's a bit stale.
I recommend getting the latest version from MarginalHacks.
You can save the .deb package, and then, as root, run:
% dpkg -i album.deb6: Macintosh OSX
It works fine on OSX, but you have to run it from a terminal window. Just
install the album script and ImageMagick tools, and type in the path to album,
any album options you want, and then the path to the directory with the
photos in them (all separated by spaces), such as:
% album -theme Blue /path/to/my/photos/7: Win95, Win98, Win2000/Win2k, WinNT, WinXP
(Windows 95, Windows 98, Windows 2000, Windows NT, Windows XP)
There are two methods to run perl scripts on Windows, either using ActivePerl
or Cygwin.
ActivePerl is simpler and allows you to run album from a DOS prompt,
though I've heard that it doesn't work with themes.
Cygwin is a bulkier but more robust package that gives you access to
a bunch of UNIX like utilities, and album is run from a bash (UNIX shell)
prompt.
Cygwin method
-------------
1) Install Cygwin
Choose packages: perl, ImageMagick, bash
Do not use the normal ImageMagick install! You must use the Cygwin ImageMagick packages!
2) Install album in bash path or call using absolute path:
bash% album /some/path/to/photos
3) If you want exif info in your captions, you need the Cygwin version of jheadActivePerl method
-----------------
1) Install ImageMagick for Windows
2) Install ActivePerl, Full install (no need for PPM profile)
Choose: "Add perl to PATH" and "Create Perl file extension association"
3) If Win98: Install tcap in path
4) Save album as album.pl in windows path
5) Use dos command prompt to run:
C:> album.pl C:\some\path\to\photosNote: Some versions of Windows (2000/NT at least) have their
own "convert.exe" in the c:\windows\system32 directory (an NTFS utility?).
If you have this, then you either need to edit your path variable,
or else just specify the full path to convert in your album script.
8: How do I edit the Windows path?Windows NT4 Users
Right Click on My Computer, select Properties.
Select Environment tab.
In System Variables box select Path.
In Value edit box add the new paths separated by semicolons
Press OK/Set, press OK again.
Windows 2000 Users
Right Click My Computer, select Properties.
Select Advanced tab.
Click Environment Variables.
In System Variables box select double-click Path
In Value edit box add the new paths separated by semicolons
Press OK/Set, press OK again.
Windows XP Users
Click My Computer, select Change a Setting.
Double click System.
Select Advanced tab.
Select Environment Variables.
In System Variables box select double-click Path
In Value edit box add the new paths separated by semicolons
Press OK.
9: Macintosh OS9
I don't have any plans to port this to OS9 - I don't know what
the state of shells and perl is for pre-OSX. If you have it working
on OS9, let me know.
album-4.17/Docs/hu/txt_4 0000655 0000000 0000000 00000000000 10313504407 017500 1album-4.17/Docs/it/txt_4 ustar root root album-4.17/Docs/hu/txt_3 0000655 0000000 0000000 00000000000 12475152364 017512 1album-4.17/Docs/it/txt_3 ustar root root album-4.17/Docs/hu/latin2.txt_2 0000644 0000000 0000000 00000014267 11010325161 014722 0 ustar root root MINI HOW-TO
ITEM: Egyszer album
Az album program teleptse utn prbljuk ki
a kvetkez egyszer pldkat! Problma esetn vegyk
ignybe a teleptsi tmutat segtsgt!
A sablonok (theme-ek) s a fotalbum trolshoz hozzunk ltre
egy knyvtrat, ebben a lersban a /home/httpd/test knyvtrat
fogjuk hasznlni. Olyan knyvtrat kell vlasztanunk, amelyet a
web szerver is megtall. Pldnkban a http://myserver/test cmet fogjuk
hasznlni, itt ri el a web szerver a "test" knyvtrunkat.
Elszr hozzunk ltre egy knyvtrat, s msoljuk bele a kpeket!
Legyen ez a knyvtr a /home/httpd/test/Photos.
A kpek neve a pldban 'IMG_001.jpg', ..., 'IMG_004.jpg'.
A legegyszerbb album ltrehozshoz adjuk ki a kvetkez utastst:
% album /home/httpd/test/Photos
Ezek utn a a fnykpalbumot egy web bngszvel a kvetkez cmen
rhetjk el:
http://myserver/test/Photos
ITEM: A fotk feliratozsa
Ksztsk el a /home/httpd/test/Photos/captions.txt fjlt a
kvetkez tartalommal (hasznljuk a "tab" gombot a " [tab] "
helyn):
-- captions.txt ---------
IMG_001.jpg [tab] Az els kp neve
IMG_002.jpg [tab] Msodik kp
IMG_003.jpg [tab] jabb kp [tab] micsoda felirat!
IMG_004.jpg [tab] Utols kp [tab] jabb felirat.
-------------------------
Ezutn futtassuk jra az album programot:
% album /home/httpd/test/Photos
s me, a feliratok megjelentek.
Most ksztsk el a /home/httpd/test/Photos/header.txt fjlt,
benne tetszleges szveggel. Az album program futtatsa utn
a felirat megjelenik az oldal tetejn.
ITEM: Kpek elrejtse
Kpek, fjlok vagy knyvtrak tbbflekppen is elrejthetk. Most
a captions.txt fjl segtsgvel mutatjuk be kpek elrejtst.
A "#" jelet rjuk be valamelyik sor elejre:
-- captions.txt ---------
IMG_001.jpg [tab] Az els kp neve
#IMG_002.jpg [tab] Msodik kp
IMG_003.jpg [tab] jabb kp [tab] micsoda felirat!
IMG_004.jpg [tab] Utols kp [tab] jabb felirat.
-------------------------
Az album program futtatsa utn lthat, hogy az IMG_002.jpg nev
kp hinyzik. Ha ezt az album program els futtatsa eltt csinltuk
volna, akkor a kzepes s a kis mret kpeket (ikonokat) nem is
ksztette volna el a program. Ezek a most mr felesleges kpek
utlag is eltvolthatk a -clean kapcsol hasznlatval:
% album -clean /home/httpd/test/Photos
ITEM: Sablonok hasznlata
Amennyiben a sablonok megfelelen teleptve vannak, s
theme_path a sablonok helyt jelzi, akkor a sablonok
hasznlhatk a kvetkezkppen:
% album -theme Blue /home/httpd/test/Photos
Ekkor a ksz fotalbum a Blue nev sablont hasznlja. Ha az
albumban meg nem jelentett kpeket tallunk, akkor valsznleg
olyan knyvtrba lett teleptve a sablon, amelyet a bngszprogram
nem r el, a rszletekrt l. a teleptsi tmutatt.
A program futskor elmenti az alkalmazott belltsokat, gy ha a
kvetkez alkalommal futtatjuk a programot:
% album /home/httpd/test/Photos
mg mindig a Blue sablont hasznlja. A sablon kikapcsolshoz a
kvetkez parancsot hasznljuk:
% album -no_theme /home/httpd/test/Photos
ITEM: Kzepes mret kpek
A teljes mret fnykpek rendszerint tl nagyok egy webes albumhoz,
ezrt az album oldalakon kzepes mret kpeket hasznlunk:
% album -medium 33% /home/httpd/test/Photos
A teljes mret kpek nem vesznek el, alapesetben
a kzepes mret kpre kattintva
tekinthetjk meg ket, vagy az
% album -just_medium /home/httpd/test/Photos
parancs alkalmazsval elrhetjk, hogy a teljes mret kpekre ne
helyezzen el linket a program (feltve, hogy eltte a -medium kapcsolval
hvtuk a programot valamikor).
ITEM: EXIF feliratok hasznlata
Megadhatjuk pldul, hogy a fnykp ksztsekor alkalmazott apertra
belekerljn a kpek feliratba:
% album -exif "<br>apertra=%Aperture%" /home/httpd/test/Photos
Ez a parancs csak azon kpek felirathoz rja hozz az apertrra vonatkoz informcit,
amelyek exif informcijban szerepel az "Aperture" kulcssz (a "%" jelek kzti
rsz jelenik meg a feliratban). Az elz parancsban szerepl <br>
hatsra az exif informci a kp feliratban j sorban jelenik meg.
Egyb exif informci is elhelyezhet a feliratban, pl:
% album -exif "<br>fkusz: %FocalLength%" /home/httpd/test/Photos
Mivel az elz futtatskor a program elmentette a belltsokat, most
mindkt exif informci megjelenik a kpek feliratban: az apertra s a
fkusztvolsg is. Ha trlni akarjuk az apertrra vonatkoz rszt:
% album -no_exif "<br>aperture=%Aperture%" /home/httpd/test/Photos
A "-no_exif" kapcsolnak pontosan meg kell egyeznie a korbban megadott
-exif kapcsolnl megadott rsszel, klnben a program figyelmen kvl hagyja.
A program ltal elmentett konfigurcis llomnyt is szabadon meg lehet vltoztatni:
/home/httpd/test/Photos/album.conf
Itt is lehet trlni a krdses rszt.
ITEM: Tovbbi albumok hozzadsa
Tegyk fel, hogy a spanyolorszgi nyarals sorn kszlt kpeket a
/home/httpd/test/Photos/Spain/
knyvtrban helyeztk el. Futtassuk most az album programot az
sszes kpet tartalmaz knyvtrra:
% album /home/httpd/test/Photos
Ez a parancs elkszti az albumot a Photos knyvtrban, majd kszt egy linket a
Spain knyvtrra, s ugyanazon belltsokkal, sablonnal elkszti az
albumot a Spain alknyvtrban is.
jabb utazst kveten a kpeket a kvetkez knyvtrba tesszk:
/home/httpd/test/Photos/Italy/
jra futtatva a programot az sszes kpet tartalmaz knyvtrra:
% album /home/httpd/test/Photos
Ez a parancs jra feldolgozza a Spain knyvtrat is, ami nem vltozott.
Az album program nem kszt jabb HTML oldalakat vagy kis mret
kpeket, ha azokat mr korbban elksztette, de a feleslegesen feldolgozott
knyvtrak gy is feleslegesen tltik az idt, klnsen nagy albumok
esetn. Ennek elkerlsre megadhatjuk, hogy csak az j knyvtrat
dolgozza fel:
% album -add /home/httpd/test/Photos/Italy
Ez az eredeti albumhoz hozzadja a linket az j albumhoz, s elkszti
az Italy albumot.
ITEM: Fordtotta:
Gyrgy Krolyi [http://www.me.bme.hu/~karolyi/indexe.html]
album-4.17/Docs/hu/utf8.txt_2 0000655 0000000 0000000 00000000000 11012410266 020355 1album-4.17/Docs/hu/txt_2 ustar root root album-4.17/Docs/hu/txt_6 0000655 0000000 0000000 00000000000 10670046152 017510 1album-4.17/Docs/it/txt_6 ustar root root album-4.17/Docs/hu/Section_7.html 0000644 0000000 0000000 00000061027 12661460265 015305 0 ustar root root
MarginalHacks album - Plugins, Usage, Creation,..
- Documentation
A l b u m
S e v e n - - P l u g i n s , U s a g e , C r e a t i o n , . .
1: What are Plugins?
Plugins are snippets of code that allow you to modify the behavior
of album. They can be as simple as a new way to create EXIF captions,
to something as complex as creating the album based on a database of
images instead of using the filesystem hierarchy.
2: Installing Plugins and plugin support
There are a number of plugins available with the standard installation of
album. If you are upgrading album with plugins from an earlier version
of album that did not have plugins (pre v3.10), you may need to once do:
% album -configure
You will not need to do this with future upgrades of album.
This will install the current plugins into one of the default
plugin directories - album will look for plugins in a number of
locations, the default locations are:
/etc/album/plugins/
/usr/share/album/plugins/
$HOME/.album/plugins/
In reality, these are 'plugins' directories found in the set of
locations specified by '--data_path' - hence the defaults are:
/etc/album/
/usr/share/album/
$HOME/.album/
You can specify a new location with --data_path and then add a 'plugins'
directory to that location, or use the --plugin_path option.
Plugins usually end with the ".alp" prefix, but you do not need
to specify this prefix when using plugins. For example, if you
have a plugin installed at:
/etc/album/plugins/utils/mv.alp
Then you would specify the plugin as: utils/mv3: Loading/Unloading Plugins
To list all the currently installed plugins:
% album -list_plugins
To show information about a specific plugin (using 'utils/mv' as an example):
% album -plugin_info utils/mv
Plugins will be saved in the configuration for a given album, so
they don't need to be respecified every time (excluding one-time
plugins such as 'utils/mv')
You can use -no_plugin and -clear_plugin to turn off plugins that have
been saved in an album configuration. As with normal album options,
-no_plugin will turn off a specific plugin, and -clear_plugin will
turn off all plugins. Any saved plugin options for that plugin will be
erased as well.
4: Plugin Options
A few plugins may be able to take command-line options, to view usage
for these plugins:
% album -plugin_usage utils/mv
But when specifying plugin options, you need to tell album which plugin
the option belongs to. Instead of specifying as a normal album option:
% album -some_option
You prefix the option with the plugin name followed by a colon:
% album -some_plugin:some_option
For example, you can specify the generated 'index' created by
the 'utils/capindex' plugin.
% album -plugin utils/capindex -utils/capindex:index blah.html
That's a bit unwieldy. You can shorten the name of the plugin as
long as it doesn't conflict with another plugin you've loaded (by
the same name):
% album -plugin utils/capindex -capindex:index
Obviously the other types of options (strings, numbers and arrays) are
possible and use the same convention. They are saved in album configuration
the same as normal album options.
One caveat: As mentioned, once we use a plugin on an album it is saved
in the configuration. If you want to add options to an album that is
already configured to use a plugin, you either need to mention the plugin
again, or else use the full name when specifying the options (otherwise
we won't know what the shortened option belongs to).
For example, consider an imaginary plugin:
% album -plugin some/example/thumbGen Photos/Spain
After that, let's say we want to use the thumbGen boolean option "fast".
This will not work:
% album -thumbGen:fast Photos/Spain
But either of these will work:
% album -plugin some/example/thumbGen -thumbGen:fast blah.html Photos/Spain% album -some/example/thumbGen:fast Photos/Spain5: Writing Plugins
Plugins are small perl modules that register "hooks" into the album code.
There are hooks for most of the album functionality, and the plugin hook
code can often either replace or supplement the album code. More hooks
may be added to future versions of album as needed.
You can see a list of all the hooks that album allows:
% album -list_hooks
And you can get specific information about a hook:
% album -hook_info <hook_name>
We can use album to generate our plugin framework for us:
% album -create_plugin
For this to work, you need to understand album hooks and album options.
We can also write the plugin by hand, it helps to use an already
written plugin as a base to work off of.
In our plugin we register the hook by calling the album::hook() function.
To call functions in the album code, we use the album namespace.
As an example, to register code for the clean_name hook our plugin calls:
album::hook($opt,'clean_name',\&my_clean);
Then whenever album does a clean_name it will also call the plugin
subroutine called my_clean (which we need to provide).
To write my_clean let's look at the clean_name hook info:
Args: ($opt, 'clean_name', $name, $iscaption)
Description: Clean a filename for printing.
The name is either the filename or comes from the caption file.
Returns: Clean name
The args that the my_clean subroutine get are specified on the first line.
Let's say we want to convert all names to uppercase. We could use:
sub my_clean {
my ($opt, $hookname, $name, $iscaption) = @_;
return uc($name);
}
Here's an explanation of the arguments:
$opt This is the handle to all of album's options.
We didn't use it here. Sometimes you'll need it if you
call any of albums internal functions. This is also true
if a $data argument is supplied.
$hookname In this case it will be 'clean_name'. This allows us
to register the same subroutine to handle different hooks.
$name This is the name we are going to clean.
$iscaption This tells us whether the name came from a caption file.
To understand any of the options after the $hookname you
may need to look at the corresponding code in album.
In this case we only needed to use the supplied $name, we called
the perl uppercase routine and returned that. The code is done, but now
we need to create the plugin framework.
Some hooks allow you to replace the album code. For example, you
could write plugin code that can generate thumbnails for pdf files
(using 'convert' is one way to do this). We can register code for
the 'thumbnail' hook, and just return 'undef' if we aren't looking
at a pdf file, but when we see a pdf file, we create a thumbnail
and then return that. When album gets back a thumbnail, then it
will use that and skip it's own thumbnail code.
Now let's finish writing our uppercase plugin. A plugin must do the following:
1) Supply a 'start_plugin' routine. This is where you will likely
register hooks and specify any command-line options for the plugin.
2) The 'start_plugin' routine must return the plugin info
hash, which needs the following keys defined:
author => The author name
href => A URL (or mailto, of course) for the author
version => Version number for this plugin
description => Text description of the plugin
3) End the plugin code by returning '1' (similar to a perl module).
Here is our example clean_name plugin code in a complete plugin:
sub start_plugin {
my ($opt) = @_;
album::hook($opt,'clean_name',\&my_clean);
return {
author => 'David Ljung Madison',
href => 'http://MarginalHacks.com/',
version => '1.0',
description => "Conver image names to uppercase",
};
}
sub my_clean {
return uc($name);
}
1;
Finally, we need to save this somewhere. Plugins are organized in the
plugin directory hierarchy, we could save this in a plugin directory as:
captions/formatting/NAME.alp
In fact, if you look in examples/formatting/NAME.alp you'll find that
there's a plugin already there that does essentially the same thing.
If you want your plugin to accept command-line options, use 'add_option.'
This must be done in the start_plugin code. Some examples:
album::add_option(1,"fast",album::OPTION_BOOL, usage=>"Do it fast");
album::add_option(1,"name", album::OPTION_STR, usage=>"Your name");
album::add_option(1,"colors",album::OPTION_ARR, usage=>"Color list");
For more info, see the 'add_option' code in album and see all of the uses
of it (at the top of album and in plugins that use 'add_option')
To read an option that the user may have set, we use option():
my $fast = album::option($opt, "fast");
If the user gave a bad value for an option, you can call usage():
album::usage("-colors array can only include values [red, green, blue]");
If your plugin needs to load modules that are not part of the
standard Perl distribution, please do this conditionally. For
an example of this, see plugins/extra/rss.alp.
You can also call any of the routines found in the album script
using the album:: namespace. Make sure you know what you are doing.
Some useful routines are:
album::add_head($opt,$data, "<meta name='add_this' content='to the <head>'>");
album::add_header($opt,$data, "<p>This gets added to the album header");
album::add_footer($opt,$data, "<p>This gets added to the album footer");
The best way to figure out how to write plugins is to look at other
plugins, possibly copying one that is similar to yours and working
off of that. Plugin development tools may be created in the future.
Again, album can help create the plugin framework for you:
% album -create_plugin
1: Using languages
(Requires album v4.0 or higher)
Album comes prepackaged with language files (we're in need of translation
help, see below!). The language files will alter most of album's output
messages, as well as any HTML output that isn't generated by the theme.
Altering any text in a theme to match your language is as simple as editing
the Theme files - there is an example of this with the "simple-Czech" theme.
To use a language, add the "lang" option to your main album.conf, or else
specify it the first time you generate an album (it will be saved with that
album afterwards).
Languages can be cleared like any code/array option with:
% album -clear_lang ...
You can specify multiple languages, which can matter if a language is
incomplete, but you'd like to default to another language than english.
So, for example, if you wanted Dutch as the primary language, with the
backup being Swedish Chef, you could do:
% album -lang swedish_chef -lang nl ...
If you specify a sublanguage (such as es-bo for Spanish, Bolivia), then
album will attempt 'es' first as a backup.
Note that because of a known bug, you should specify all the desired
languages at the same time instead of over multiple invocations of album.
To see what languages are available:
% album -list_langs
Sadly, most of the (real) languages are barely complete, but this
is a chance for people to help out by becoming a..
2: Translation Volunteers
The album project is in need of volunteers to do translations,
specifically of:
1) The Mini How-To. Please translate from the source.
2) album messages, as explained below.
If you are willing to do the translation of either one or both
of these items, please contact me!
If you're feeling particularly ambitious, feel free to translate any
of the other Documentation sources as well, just let me know!
3: Documentation Translation
The most important document to translate is the "Mini How-To".
Please translate from the text source.
Also be sure to let me know how you want to be credited,
by your name, name and email, or name and website.
And please include the proper spelling and capitalization of the
name of your language in your language. For example, "franais"
instead of "French"
I am open to suggestions for what charset to use. Current options are:
1) HTML characters such as [é]] (though they only work in browsers)
2) Unicode (UTF-8) such as [é] (only in browsers and some terminals)
3) ASCII code, where possible, such as [] (works in text editors, though
not currently in this page because it's set to unicode)
4) Language specific iso such as iso-8859-8-I for Hebrew.
Currently Unicode (utf-8) seems best for languages that aren't covered
by iso-8859-1, because it covers all languages and helps us deal with
incomplete translations (which would otherwise require multiple charsets,
which is a disaster). Any iso code that is a subset of utf-8 can be used.
If the main terminal software for a given language is in an iso charset
instead of utf, then that could be a good exception to use non-utf.
4: Album messages
album handles all text messages using it's own language support
system, similar to the system used by the perl module Locale::Maketext.
(More info on the inspiration for this is in TPJ13)
An error message, for example, may look like this:
No themes found in [[some directory]].
With a specific example being:
No themes found in /www/var/themes.
In Dutch, this would be:
Geen thema gevonden in /www/var/themes.
The "variable" in this case is "/www/var/themes" and it obviously
isn't translated. In album, the actual error message looks like:
'No themes found in [_1].'
# Args: [_1] = $dir
The translation (in Dutch) looks like:
'No themes found in [_1].' => 'Geen thema gevonden in [_1].'
After translating, album will replace [_1] with the directory.
Sometimes we'll have multiple variables, and they may change places:
Some example errors:
Need to specify -medium with -just_medium option.
Need to specify -theme_url with -theme option.
In Dutch, the first would be:
Met de optie -just_medium moet -medium opgegeven worden.
The actual error with it's Dutch translation is:
'Need to specify [_1] with [_2] option'
=> 'Met de optie [_2] moet [_1] opgegeven worden'
# Args: [_1]='-medium' [_2]='-just_medium'
Note that the variables have changed places.
There is also a special operator for quantities, for example,
we may wish to translate:
'I have 42 images'
Where the number 42 may change. In English, it is adequate to say:
0 images, 1 image, 2 images, 3 images...
Whereas in Dutch we would have:
0 afbeeldingen, 1 afbeelding, 2 afbeeldingen, 3 afbeeldingen..
But other languages (such as many slavic languages) may have special
rules as to whether "image" should be pluralized based on whether the
quantity is mod 2, 3 or 4, and so on! The simplest case is covered
by the [quant] operator:
[quant,_1,image]
This is similar to "[_1] image" except that "image" will be pluralized
if [_1] is 0 or greater than 1:
0 images, 1 image, 2 images, 3 images...
Pluralization is simply adding an 's' - if this isn't adequate, we can
specify the plural form:
[quant,_1,afbeelding,afbeeldingen]
Which gives us the Dutch count above.
And if we need a special form for 0, we can specify that:
[quant,_1,directory,directories,no directories]
Which would create:
no directories, 1 directory, 2 directories, ...
There is also a shorthand for [quant] using '*', so these are the same:
[quant,_1,image]
[*,_1,image]
So now an example translation for a number of images:
'[*,_1,image]'
=> '[*,_1,afbeelding,afbeeldingen]',
If you have something more complicated then you can use perl code, I
can help you write this if you let me know how the translation should work:
'[*,_1,image]'
=> \&russian_quantity; # This is a sub defined elsewhere..
Since the translation strings are (generally) placed in single-quotes (')
and due to the special [bracket] codes, we need to quote these correctly.
Single-quotes in the string need to be preceded by a slash (\):
'I can\'t find any images'
And square brackets are quoted using (~):
'Problem with option ~[-medium~]'
Which unfortunately can get ugly if the thing inside the square brackets
is a variable:
'Problem with option ~[[_1]~]'
Just be careful and make sure all brackets are closed appropriately.
Furthermore, in almost all cases, the translation should have the
same variables as the original:
'Need to specify [_1] with [_2] option'
=> 'Met de optie [_2] moet' # <- Where did [_1] go?!?
Fortunately, most of the work is done for you. Language files are
saved in the -data_path (or -lang_path) where album keeps it's data.
They are essentially perl code, and they can be auto-generated by album:
% album -make_lang sw
Will create a new, empty language file called 'sw' (Swedish). Go ahead
and edit that file, adding translations as you can. It's okay to leave
translations blank, they just won't get used. Some of the more important
translations (such as the ones that go into HTML pages) are at the top
and should probably be done first.
You will need to pick a charset, this is tricky, as it should be based
on what charsets you think people will be likely to have available
in their terminal as well as in their browser.
If you want to build a new language file, using translations from
a previous file (for example, to update a language with whatever
new messages have been added to album), you should load the language first:
% album -lang sw -make_lang sw
Any translations in the current Swedish language file will be copied
over to the new file (though comments and other code will not be copied!)
For the really long lines of text, don't worry about adding any newline
characters (\n) except where they exist in the original. album will
do word wrap appropriately for the longer sections of text.
Please contact me when you are starting translation work so I can
be sure that we don't have two translators working on the same parts,
and be sure to send me updates of language files as the progress, even
incomplete language files are useful!
If you have any questions about how to read the syntax of the language
file, please let me know.
5: Why am I still seeing English?
After choosing another language, you can still sometimes see English:
1) Option names are still in English. (-geometry is still -geometry)
2) The usage strings are not currently translated.
3) Plugin output is unlikely to be translated.
4) Language files aren't always complete, and will only translate what they know.
5) album may have new output that the language file doesn't know about yet.
6) Most themes are in English.
Fortunately the last one is the easiest to change, just edit the theme
and replace the HTML text portions with whatever language you like, or
create new graphics in a different language for icons with English.
If you create a new theme, I'd love to hear about it!
1: Basic execution
Create a directory with nothing but images in it. The album script and
other tools should not go here. Then run album specifying that directory:
% album /example/path/to/images/
Or, if you're in the /example/path/to directory:
% album images/
When it's done, you'll have a photo album inside that directory starting
with images/index.html.
If that path is in your web server, then you can view it with your
browser. If you can't find it, talk to your sysadmin.
2: Options
There are three types of options. Boolean options, string/num options
and array options. Boolean options can be turned off by prepending -no_:
% album -no_image_pages
String and number values are specified after a string option:
% album -type gif
% album -columns 5
Array options can be specified two ways, with one argument at a time:
% album -exif hi -exif there
Or multiple arguments using the '--' form:
% album --exif hi there --
You can remove specific array options with -no_<option>
and clear all the array options with -clear_<option>.
To clear out array options (say, from the previous album run):
% album -clear_exif -exif "new exif"
(The -clear_exif will clear any previous exif settings and then the
following -exif option will add a new exif comment)
And finally, you can remove specific array options with 'no_':
% album -no_exif hi
Which could remove the 'hi' exif value and leave the 'there' value intact.
Also see the section on Saving Options.
To see a brief usage:
% album -h
To see more options:
% album -more
And even more full list of options:
% album -usage=2
You can specify numbers higher than 2 to see even more options (up to about 100)
Plugins can also have options with their own usage.
3: Themes
Themes are an essential part of what makes album compelling.
You can customize the look of your photo album by downloading a
theme from MarginalHacks or even writing your own theme to match
your website.
To use a theme, download the theme .tar or .zip and unpack it.
Themes are found according to the -theme_path setting, which is
a list of places to look for themes. Those paths need to be somewhere
under the top of your web directory, but not inside a photo album
directory. It needs to be accessible from a web browser.
You can either move the theme into one of the theme_paths that album
is already using, or make a new one and specify it with the -theme_path
option. (-theme_path should point to the directory the theme is in,
not the actual theme directory itself)
Then call album with the -theme option, with or without -theme_path:
% album -theme Dominatrix6 my_photos/
% album -theme Dominatrix6 -theme_path /home/httpd/album/Themes/ my_photos/
You can also create your own themes pretty easily, this is covered
later in this documentation.
4: Sub-albums
Make directories inside your first directory and put images in that.
Run album again, and it will run through all the child directories
and create sub-albums of the first album.
If you make changes to just a sub-album, you can run album on that
and it will keep track of all the parent links.
If you don't want to traverse down the tree of directories, you
can limit it with the depth option. Example:
% album images/ -depth 1
Will only generate photo albums for the images directory.
If you have many sub-albums, and you want to add a new sub-album
without regenerating all the previous sub-albums, then you can use -add:
% album -add images/new_album/
Which will add the new_album to the HTML for 'images/' and then
generate the thumbs and HTML for everything inside 'images/new_album/'
5: Avoiding Thumbnail Regeneration
album tries to avoid unnecessary work. It only creates thumbnails if
they don't exist and haven't changed. This speeds up successive runs
of album.
This can cause a problem if you change the size or cropping of your
thumbnails, because album won't realize that the thumbnails have changed.
You can use the force option to force album to regenerate thumbnails:
% album -force images/
But you shouldn't need to use -force every time.
6: Cleaning Out The Thumbnails
If you remove images from an album then you'll have leftover thumbs and HTML.
You can remove them by running album once with the -clean option:
% album -clean images/7: Medium size images
When you click on an album thumbnail you're taken to an 'image_page.'
The image_page shows, by default, the full size image (as well as
navigation buttons and captions and such). When you click on the
image on the image_page, you'll be taken to the URL for just the full
size image.
If you want a medium size image on the image_page, use the -medium
option and specify a geometry for the medium size image. You can
specify any geometry that ImageMagick can use (see their man page
for more info). Some examples:
# An image that is half the full size
% album -medium 50%
# An image that fits inside 640x480 (maximum size)
% album -medium 640x480
# An image that is shrunk to fit inside 640x480
# (but won't be enlarged if it's smaller than 640x480)
% album -medium '640x480>'
You need the 'quotes' on the last example with most shells because
of the '>' character.
8: Captions
Images and thumbnails can have names and captions. There are a number
of ways to specify/change names and captions in your photo albums.
The name is linked to the image or image_page,
and the caption follows underneath.
The default name is the filename cleaned up:
"Kodi_Cow.gif" => "Kodi Cow"
One way to specify a caption is in a .txt file
with the same name as the image. For this example,
"Kodi_Cow.txt" could contain "Kodi takes down a cow!"
You can rename your images and specify captions in bulk
for an album directory with a captions.txt file.
Each line of the file should be an image or directory filename,
followed by a tab, followed by the new name. You can also
specify (separated by tabs), an optional caption and then an optional
image ALT tag. (To skip a field, use 'tab' 'space' 'tab')
Example:
001.gif My first photo
002.gif Mom and Dad My parents in the grand canyon
003.gif Ani DiFranco My fiancee Yowsers!
The images and directories will also be sorted in the order they are found
in the caption file. You can override this with '-sort date' and '-sort name'
If your editor doesn't handle tabs very well, then you can separate the
fields by double-colons, but only if the caption line doesn't contain any
tabs at all:
003.gif :: Ani DiFranco :: My fiancee :: Yowsers!
If you only want captions on image pages (not on album pages) use:
% album -no_album_captions
If you want web access to create/edit your captions, look at the
caption_edit.cgi CGI script (but be sure to limit access to the
script or anyone can change your captions!)
9: EXIF Captions
You can also specify captions that are based off of EXIF information
(Exchangeable Image File Format) which most digital cameras add to images.
First you need 'jhead' installed. You should be able to run jhead
on a JPG file and see the comments and information.
EXIF captions are added after the normal captions and are specified with -exif:
% album -exif "<br>File: %File name% taken with %Camera make%"
Any %tags% found will be replaced with EXIF information. If any %tags%
aren't found in the EXIF information, then that EXIF caption string is
thrown out. Because of this you can specify multiple -exif strings:
% album -exif "<br>File: %File name% " -exif "taken with %Camera make%"
This way if the 'Camera make' isn't found you can still get the 'File name'
caption.
Like any of the array style options you can use --exif as well:
% album --exif "<br>File: %File name% " "taken with %Camera make%" --
Note that, as above, you can include HTML in your EXIF tags:
% album -exif "<br>Aperture: %Aperture%"
To see the possible EXIF tags (Resolution, Date/Time, Aperture, etc..)
run a program like 'jhead' on an digital camera image.
You can also specify EXIF captions only for album or image pages, see
the -exif_album and -exif_image options.
10: Headers and Footers
In each album directory you can have text files header.txt and footer.txt
These will be copied verbatim into the header and footer of your album (if
it's supported by the theme).
11: Hiding Files/Directories
Any files that album does not recognize as image types are ignored.
To display these files, use -no_known_images. (-known_images is default)
You can mark an image as a non-image by creating an empty file with
the same name with .not_img added to the end.
You can ignore a file completely by creating an empty file with
the same name with .hide_album on the end.
You can avoid running album on a directory (but still include it in your
list of directories) by creating a file <dir>/.no_album
You can ignore directories completely by creating a file <dir>/.hide_album
The Windows version of album doesn't use dots for no_album, hide_album
and not_img because it's difficult to create .files in Windows.
12: Cropping Images
If your images are of a large variety of aspect ratios (i.e., other than
just landscape/portrait) or if your theme only allows one orientation,
then you can have your thumbnails cropped so they all fit the same geometry:
% album -crop
The default cropping is to crop the image to center. If you don't
like the centered-cropping method that the album uses to generate
thumbnails, you can give directives to album to specify where to crop
specific images. Just change the filename of the image so it has a
cropping directive before the filetype. You can direct album to crop
the image at the top, bottom, left or right. As an example, let's
say you have a portrait "Kodi.gif" that you want cropped on top for
the thumbnail. Rename the file to "Kodi.CROPtop.gif" and this will
be done for you (you might want to -clean out the old thumbnail).
The "CROP" string will be removed from the name that is printed in
the HTML.
The default geometry is 133x133. This way landscape images will
create 133x100 thumbnails and portrait images will create 100x133
thumbnails. If you are using cropping and you still want your
thumbnails to have that digital photo aspect ratio, then try 133x100:
% album -crop -geometry 133x100
Remember that if you change the -crop or -geometry settings on a
previously generated album, you will need to specify -force once
to regenerate all your thumbnails.
13: Video
album can generate snapshot thumbnails of many video formats if you
install ffmpeg
If you are running linux on an x86, then you can just grab the binary,
otherwise get the whole package from ffmpeg.org (it's an easy install).
14: Burning CDs (using file://)
If you are using album to burn CDs or you want to access your albums with
file://, then you don't want album to assume "index.html" as the default
index page since the browser probably won't. Furthermore, if you use
themes, you must use relative paths. You can't use -theme_url because
you don't know what the final URL will be. On Windows the theme path
could end up being "C:/Themes" or on UNIX or OSX it could be something
like "/mnt/cd/Themes" - it all depends on where the CD is mounted.
To deal with this, use the -burn option:
% album -burn ...
This requires that the paths from the album to the theme don't change.
The best way to do this is take the top directory that you're going to
burn and put the themes and the album in that directory, then specify
the full path to the theme. For example, create the directories:
myISO/Photos/
myISO/Themes/Blue
Then you can run:
% album -burn -theme myISO/Themes/Blue myISO/Photos
Then you can make a CD image from the myISO directory (or higher).
If you are using 'galbum' (the GUI front end) then you can't specify
the full path to the theme, so you'll need to make sure that the version
of the theme you want to burn is the first one found in the theme_path
(which is likely based off the data_path). In the above example you
could add 'myISO' to the top of the data_path, and it should
use the 'myISO/Themes/Blue' path for the Blue theme.
You can also look at shellrun for windows users, you can have it
automatically launch the album in a browser. (Or see winopen)
15: Indexing your entire album
To navigate an entire album on one page use the caption_index tool.
It uses the same options as album (though it ignores many
of them) so you can just replace your call to "album" with "caption_index"
The output is the HTML for a full album index.
See an example index
for one of my example photo albums16: Updating Albums With CGI
First you need to be able to upload the photo to the album directory.
I suggest using ftp for this. You could also write a javascript that
can upload files, if someone could show me how to do this I'd love to know.
Then you need to be able to remotely run album. To avoid abuse, I
suggest setting up a CGI script that touches a file (or they can just
ftp this file in), and then have a cron job that checks for that
file every few minutes, and if it finds it it removes it and runs album.
[unix only] (You will probably need to set $PATH or use absolute paths
in the script for convert)
If you want immediate gratification, you can run album from a CGI script
such as this one.
If your photos are not owned by the webserver user, then you
need to run through a setud script which you run from a CGI [unix only].
Put the setuid script in a secure place, change it's ownership to be the
same as the photos, and then run "chmod ug+s" on it. Here are example
setuid and CGI scripts. Be sure to edit them.
Also look at caption_edit.cgi which allows you (or others) to edit
captions/names/headers/footers through the web.
1: Methods
There are easy ways and complicated ways to create a custom theme,
depending on what you want to be able to do.
2: Editing current theme HTML
If you just want to slightly change the theme to match the output
of your site, it might make sense to edit a current theme.
In the theme directory there are two *.th files. album.th is
the template for album pages (the thumbnail pages) and image.th
is the template for image pages (where you can see medium or full
size images). The files are very similar to HTML except for
some embedded <: ePerl :> code. Even if you don't know perl or
ePerl you can still edit the HTML to make simple changes.
Good starting themes:
Any simmer_theme is going to be up to date and clean, such as "Blue" or
"Maste." If you only need 4 corner thumbnail borders then take a look
at "Eddie Bauer." If you want overlay/transparent borders, see FunLand.
If you want something demonstrating a minimal amount of code, try "simple"
but be warned that I haven't touched the theme in a long time.
3: The easy way, simmer_theme from graphics.
Most themes have the same basic form, show a bunch of thumbnails
for directories and then for images, with a graphic border, line and
background. If this is what you want, but you want to create new
graphics, then there is a tool that will build your themes for you.
If you create a directory with the images and a CREDIT file as well
as a Font or Style.css file, then simmer_theme will create theme for you.
Files:
Font/Style.css
This determines the fonts used by the theme. The "Font" file is the
older system, documented below. Create a Style.css file and define
styles for: body, title, main, credit and anything else you like.
See FunLand for a simple example.
Alternatively, use a font file. An example Font file is:
--------------------------------------------------
$TITLE_FONT = "size='4' color='#ffffff' face='Times New Roman,Georgia,Times'";
$MAIN_FONT = "face='Times New Roman,Georgia,Times'";
$CREDIT_FONT = "size='-1' face='Verdana' color='#ffffff'";
$BODY = "background='$PATH/bkgrnd.gif' link='#0099FF'">
--------------------------------------------------
CREDIT
The credit file is two lines and is used for the theme index at MarginalHacks.
If you're never submitting your theme to us, then you don't need this file.
(But please do!) If so, the two lines (and only two lines) are:
1) A short description of the theme (keep it all on one line)
2) Your name (can be inside a mailto: or href link)
Null.gif
Each simmer theme needs a spacer image, this is a 1x1 transparent gif.
You can just copy this from another simmer theme.
Optional image files:
Bar Images
The bar is composed of Bar_L.gif, Bar_R.gif and Bar_M.gif in the middle.
The middle is stretched. If you need a middle piece that isn't stretched, use:
Bar_L.gif, Bar_ML.gif, Bar_M.gif, Bar_MR.gif, Bar_R.gif
And then the Bar_ML.gif and Bar_MR.gif will be stretched. (See the
Craftsman theme for an example of this).
Locked.gif
A lock image for any directories that have .htaccess
Background image
If you want a background image, specify it in the Font file in the $BODY
section, as in the example above. The $PATH variable will be replaced
with the path to the theme files:
More.gif
When an album page has sub-albums to list, it first shows the 'More.gif'
image.
Next.gif, Prev.gif, Back.gif
For the next and previous arrows and the back button
Icon.gif
Shown at the top left by the parent albums, this is often just the text "Photos"
Border Images
There are many ways to slice up a border, from simple to complex, depending on
the complexity of the border and how much you want to be able to stretch it:
4 pieces Uses Bord_L.gif, Bord_R.gif, Bord_T.gif, Bord_B.gif
(The corners go with the left and right images)
4 piece borders usually don't stretch well so they don't work well on
image_pages. Generally you can cut the corners out of the left and
right images to make:
8 pieces Also includes Bord_TL.gif, Bord_TR.gif, Bord_BL.gif, Bord_BR.gif
8 piece borders allow you to stretch to handle most sized images
12 pieces Also includes Bord_LT.gif, Bord_RT.gif, Bord_LB.gif, Bord_RB.gif
12 pieces allow stretching of borders that have more complex corners (such
as Dominatrix6 or Ivy)
Overlay Borders Can use transparent images that can be partially
overlaying your thumbnail. See below.
Here's how the normal border pieces are laid out:
12 piece borders
TL T TR 8 piece borders 4 piece borders
LT RT TL T TR TTTTTTT
L IMG R L IMG R L IMG R
LB RB BL B BR BBBBBBB
BL B BR
Note that every row of images must be the same height, though the
widths do not have to line up. (i.e., height TL = height T = height TR)
(This is not true about overlay borders!)
Once you've created these files, you can run the simmer_theme tool
(an optional tool download at MarginalHacks.com) and your theme will
then be ready to use!
If you need different borders for the image pages, then use the same
filenames prefixed by 'I' - such as IBord_LT.gif, IBord_RT.gif,...
Overlay borders allow for really fantastic effects with image borders.
Currently there's no support for different overlay borders for images.
For using Overlay borders, create images:
Over_TL.png Over_T.png Over_TR.png
Over_L.png Over_R.png
Over_BL.png Over_B.png Over_BR.png
Then figure out how many pixels of the borders are padding (outside photo)
Then put those values in files: Over_T.pad Over_R.pad Over_B.pad Over_L.pad
See "Themes/FunLand" for a simple example
Multi-lingual Images
If your images have text, you can translate them into other languages
so that albums can be generated in other languages. For example, you
can create a Dutch "More.gif" image and put it in 'lang/nl/More.gif'
in the theme (nl is the language code for Dutch).
When the user runs album in Dutch (album -lang nl) then the theme
will use the Dutch image if found. Themes/Blue has a simple example.
The currently "translated" images are:
More, Back, Next, Prev and Icon
You can create an HTML table that shows the translations immediately
available to themes with -list_html_trans:
% album -list_html_trans > trans.html
Then view trans.html in a browser. Unfortunately different languages
have different charsets, and an HTML page can only have one. The
output is in utf-8, but you can edit the "charset=utf-8" to properly
view language characters in different charsets (such as hebrew).
If you need more words translated for themes, let me know, and if you
create any new language images for a theme, please send them to me!
4: From scratch, Theme API
This is a much heavier job - you need to have a very clear idea of
how you want album to place the images on your page. It might be
a good idea to start with modifying existing themes first to get
an idea of what most themes do. Also look at existing themes
for code examples (see suggestions above).
Themes are directories that contain at the minimum an 'album.th' file.
This is the album page theme template. Often they also contain an 'image.th'
which is the image theme template, and any graphics/css used by the theme.
Album pages contain thumbnails and image pages show full/medium sized images.
The .th files are ePerl, which is perl embedded inside of HTML. They
end up looking a great deal like the actual album and image HTML themselves.
To write a theme, you'll need to understand the ePerl syntax. You can
find more information from the actual ePerl tool available at MarginalHacks
(though this tool is not needed to use themes in album).
There are a plethora of support routines available, but often only
a fraction of these are necessary - it may help to look at other themes
to see how they are generally constructed.
Function table:
Required Functions
Meta() Must be called in the section of HTML
Credit() Gives credit ('this album created by..')
Must be called in the section of HTML
Body_Tag() Called inside the actual tag.
Paths and Options
Option($name) Get the value of an option/configuration setting
Version() Return the album version
Version_Num() Return the album version as just a number (i.e. "3.14")
Path($type) Returns path info for $type of:
album_name The name of this album
dir Current working album directory
album_file Full path to the album index.html
album_path The path of parent directories
theme Full path to the theme directory
img_theme Full path to the theme directory from image pages
page_post_url The ".html" to add onto image pages
parent_albums Array of parent albums (album_path split up)
Image_Page() 1 if we're generating an image page, 0 for album page.
Page_Type() Either 'image_page' or 'album_page'
Theme_Path() The filesystem path to the theme files
Theme_URL() The URL path to the theme files
Header and Footer
isHeader(), pHeader() Test for and print the header
isFooter(), pFooter() Same for the footer
Generally you loop through the images and directories using local variables:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
This will print the name of each image. Our object types are either 'pics'
for images or 'dirs' for the child directories. Here are the object functions:
Objects (type is either 'pics' (default) or 'dirs')
First($type) Get the first image or sub-album object.
Last($type) Last object
Next($obj) Given an object, return the next object
Next($obj,1) Same, loop past end to beginning.
Prev($obj), Prev($obj,1) Similar to Next()
num('pics') or just num() Total number of images in this album
num('dirs') Total number of children/sub-albums
Also:
num('parent_albums') Total number of parents leading up to this album.
Object lookup:
get_obj($num, $type, $loop)
Finds object by number ('pics' or 'dirs').
If $loop is set than the count will wrap around.
Object Properties
Each object (image or child albums) has properties.
Some properties are accessed by a single field:
Get($obj,$field) Get a single field of an object
Field Description
----- ----------
type What type of object? Either 'pics' or 'dirs'
is_movie Boolean: is this a movie?
name Name (cleaned and optionally from captions)
cap Image caption
capfile Optional caption file
alt Alt tag
num_pics [directories only, -dir_thumbs] Num of pics in directory
num_dirs [directories only, -dir_thumbs] Num of dirs in directory
Some properties are accessed by a field and subfield. For example,
each image has information for different sizes: full, medium and thumb
(though 'medium' is optional).
Get($obj,$size,$field) Get a property for a given size
Size Field Description
---- ----- ----------
$size x Width
$size y Height
$size file Filename (without path)
$size path Filename (full path)
$size filesize Filesize in bytes
full tag The tag (either 'image' or 'embed') - only for 'full'
We also have URL information which is access according to the
page it's coming 'from' and the image/page it's pointing 'to':
Get($obj,'URL',$from,$to) Get a URL for an object from -> to
Get($obj,'href',$from,$to) Same but wraps it in an 'href' string.
Get($obj,'link',$from,$to) Same but wraps the object name inside the href link.
From To Description
---- -- ----------
album_page image Image_URL from album_page
album_page thumb Thumbnail from album_page
image_page image Image_URL from image_page
image_page image_page This image page from another image page
image_page image_src The <img src> URL for the image page
image_page thumb Thumbnail from image_page
Directory objects also have:
From To Description
---- -- ----------
album_page dir URL to the directory from it's parent album page
Parent Albums
Parent_Album($num) Get a parent album string (including the href)
Parent_Albums() Return a list of the parent albums strings (including href)
Parent_Album($str) A join($str) call of Parent_Albums()
Back() The URL to go back or up one page.
Images
This_Image The image object for an image page
Image($img,$type) The <img> tags for type of medium,full,thumb
Image($num,$type) Same, but by image number
Name($img) The clean or captioned name for an image
Caption($img) The caption for an image
Child Albums
Name($alb)
Caption($img) The caption for an image
Convenience Routines
Pretty($str,$html,$lines) Pretty formats a name.
If $html then HTML is allowed (i.e., use 0 for <title> and the like)
Currently just puts prefix dates in a smaller font (i.e. '2004-12-03.Folder')
If $lines then multilines are allowed
Currently just follows dates with a 'br' line break.
New_Row($obj,$cols,$off) Should we start a new row after this object?
Use $off if the first object is offset from 1
Image_Array($src,$x,$y,$also,$alt)
Returns an <img> tag given $src, $x,...
Image_Ref($ref,$also,$alt)
Like Image_Array, but $ref can be a hash of
Image_Arrays keyed by language ('_' is default).
album picks the Image_Array by what languages are set.
Border($img,$type,$href,@border)
Border($str,$x,$y,@border)
Create the full bordered image.
See 'Borders' for more information.
If you're creating a theme from scratch, consider adding support for -slideshow.
The easiest way to do this is to cut/paste the "slideshow" code out of an
existing theme.
5: Submitting Themes
Have a custom theme? I'd love to see it, even if it's totally site-specific.
If you have a new theme you'd like to offer the public, feel free to send
it to me and/or a URL where I can see how it looks. Be sure to set the CREDIT
file properly and let me know if you are donating it to MarginalHacks for
everyone to use or if you want it under a specific license.
6: Converting v2.0 Themes to v3.0 Themes
album v2.0 introduced a theme interface which has been rewritten. Most
2.0 themes (especially those that don't use many of the global variables)
will still work, but the interface is deprecated and may disappear in
the near future.
It's not difficult to convert from v2.0 to v3.0 themes.
The v2.0 themes used global variables for many things. These are now
deprecated In v3.0 you should keep track of images and directories in
variables and use the 'iterators' that are supplied, for example:
my $image = First('pics');
while ($image) {
print Name($image);
$image = Next($image);
}
Will loop through all the images and print their names.
The chart below shows you how to rewrite the old style calls which
used a global variable with the new style which uses a local variable,
but to use these calls you need to rewrite your loops as above.
Here is a conversion chart for helping convert v2.0 themes to v3.0:
# Global vars shouldn't be used
# ALL DEPRECATED - See new local variable loop methods above
$PARENT_ALBUM_CNT Rewrite with: Parent_Album($num) and Parent_Albums($join)
$CHILD_ALBUM_CNT Rewrite with: my $dir = First('dirs'); $dir=Next($dir);
$IMAGE_CNT Rewrite with: my $img = First('pics'); $pics=Next($pics);
@PARENT_ALBUMS Can instead use: @{Path('parent_albums')}
@CHILD_ALBUMS, @CHILD_ALBUM_NAMES, @CHILD_ALBUM_URLS, ...
# Old global variable modifiers:
# ALL DEPRECATED - See new local variable loop methods above
Next_Image(), Images_Left(), Image_Cnt(), Image_Prev(), Image_Next()
Set_Image_Prev(), Set_Image_Next(), Set_Image_This()
Next_Child_Album(), Child_Album_Cnt(), Child_Albums_Left()
# Paths and stuff
pAlbum_Name() Path('album_name')
Album_Filename() Path('album_file')
pFile($file) print read_file($file)
Get_Opt($option) Option($option)
Index() Option('index')
pParent_Album($str) print Parent_Album($str)
# Parent Albums
Parent_Albums_Left Deprecated, see '$PARENT_ALBUM_CNT' above
Parent_Album_Cnt Deprecated, see '$PARENT_ALBUM_CNT' above
Next_Parent_Album Deprecated, see '$PARENT_ALBUM_CNT' above
pJoin_Parent_Albums print Parent_Albums(\@_)
# Images, using variable '$img'
pImage() Use $img instead and:
print Get($img,'href','image');
print Get($img,'thumb') if Get($img,'thumb');
print Name($img), "</a>";
pImage_Src() print Image($img,'full')
Image_Src() Image($img,'full')
pImage_Thumb_Src() print Image($img,'thumb')
Image_Name() Name($img)
Image_Caption() Caption($img)
pImage_Caption() print Get($img,'Caption')
Image_Thumb() Get($img,'URL','thumb')
Image_Is_Pic() Get($img,'thumb')
Image_Alt() Get($img,'alt')
Image_Filesize() Get($img,'full','filesize')
Image_Path() Get($img,'full','path')
Image_Width() Get($img,'medium','x') || Get($img,'full','x')
Image_Height() Get($img,'medium','y') || Get($img,'full','y')
Image_Filename() Get($img,'full','file')
Image_Tag() Get($img,'full','tag')
Image_URL() Get($img,'URL','image')
Image_Page_URL() Get($img,'URL','image_page','image_page') || Back()
# Child album routines, using variable '$alb'
pChild_Album($nobr) print Get($alb,'href','dir');
my $name = Name($alb);
$name =~ s/<br>//g if $nobr;
print $name,"</a>";
Child_Album_Caption() Caption($alb,'dirs')
pChild_Album_Caption() print Child_Album_Caption($alb)
Child_Album_URL() Get($alb,'URL','dir')
Child_Album_Name() Name($alb)
# Unchanged
Meta() Meta()
Credit() Credit()
album-4.17/Docs/es/txt_2 0000644 0000000 0000000 00000013143 11076761657 013547 0 ustar root root MINI MANUAL
ITEM: Álbum sencillo
Después de instalar 'album' correctamente, se podrán hacer unos
casos sencillos. Si se produce algún error o tiene problemas en
esta sección, vea el manual de instalación.
Necesita un directorio de web para agregar temas y su álbum de fotos.
En este manual se usará /home/httpd/test. Es necesario que este
directorio sea visible por un servidor de web. En este ejemplo se
usará este URL:
http://myserver/test/
Cambie sus comandos/URLs debidamente.
Primero cree un directorio y agregue algunas imágenes. Lo llamaremos:
/home/http/test/Photos
Y agregaremos unas imágenes llamadas 'IMG_001.jpg' hasta 'IMG_004.jpg'
Para un caso sencillo, simplemente ejecute 'album':
% album /home/httpd/test/Photos
Ahora puede ver el álbum en un navegador de web en una dirección como:
http://myserver/test/Photos
ITEM: Agregar pies de foto
Cree un archivo /home/httpd/test/Photos/captions.txt con los
siguientes contenidos (use la tecla de tabulación donde vea " [tab] ")
-- captions.txt ---------
IMG_001.jpg [tab] Nombre de la primera imagen
IMG_002.jpg [tab] Segunda imagen
IMG_003.jpg [tab] Otra imagen [tab] con pie de foto!
IMG_004.jpg [tab] Última imagen [tab] con otro pie de foto.
-------------------------
Y ejectue 'album' de nuevo:
% album /home/httpd/test/Photos
Y verá cambiar los pies de foto.
Ahora cree un archivo con texto en: /home/httpd/test/Photos/header.txt
Y ejecute 'album' de nuevo. Verá ese texto en la parte superior de la página.
ITEM: Esconder fotos
Hay un par de maneras para esconder fotos/archivos/directorios, pero
usaremos el archivo de pies de foto. Intente comentar una imagen con
'#' en captions.txt:
-- captions.txt ---------
IMG_001.jpg [tab] Nombre de la primera imagen
#IMG_002.jpg [tab] Segunda imagen
IMG_003.jpg [tab] Otra imagen [tab] con pie de foto!
IMG_004.jpg [tab] Última imagen [tab] con otro pie de foto.
-------------------------
Ejecute 'album' de nuevo, y verá que el IMG_002.jpg está escondido.
Si esto se hubiera hecho al ejecutar 'album' por primera vez, no se
habrían generado ni fotos tamaño mediano ni las miniaturas. Si
gusta, los puede eliminar con '-clean':
% album -clean /home/httpd/test/Photos
ITEM: Usando un tema
Si los temas fueron correctamente instalado y están en su
'theme_path', entonces podrá usar un tema con su álbum:
% album -theme Blue /home/httpd/test/Photos
Ahora el álbum de fotos deberá estar usando el tema "Blue". Si el
albúm contiene imágenes rotas, entonces el tema no se ha instalado
en un directorio de web accesible, vea el manual de instalación.
'Album' guarda las opciones que utiliza, entonces la próxima vez que ejecute 'album':
% album /home/httpd/test/Photos
Seguirá usando el tema Blue. Para dejar de usar un tema, puede:
% album -no_theme /home/httpd/test/Photos
ITEM: Imágenes medianas
Imágenes de máxima resolución normalmente son demasiada grandes
para un álbum en la red, entonces usaremos imágenes medianss en las
páginas de imágenes:
% album -medium 33% /home/httpd/test/Photos
Todavía puede acceder a las imágenes de tamaño completo al hacer
clic en la imagen mediana, o:
% album -just_medium /home/httpd/test/Photos
Mantendrá la imagen de resolución máxima sin enlace (suponiendo
que se había ejecutado la opción -medium en algún momento).
ITEM: Agregar pies de foto EXIF
Vamos a agregar información de apertura a los pies de foto de cada imagen:
% album -exif "<br>aperture=%Aperture%" /home/httpd/test/Photos
Esto sólo agregará información de apertura a cualquier imagen que
tiene la etiqueta EXIF 'Aperture' especificada (la parte entre los
símbolos '%'). También agregamos la etiqueta <br> para que la
información aparezca en un nuevo renglón.
Podemos agregar más información EXIF:
% album -exif "<br>focal: %FocalLength%" /home/httpd/test/Photos
Ya que 'album' guardó las opciones antes, ahora obtenemos ambas
etiquetas EXIF para cualquier imagen que especifica 'Aperture' y
'FocalLength'. Vamos a eliminar apertura:
% album -no_exif "<br>aperture=%Aperture%" /home/httpd/test/Photos
La opción '-no_exif' tiene que corresponder exactamente a la cadena
de caracteres anterior o será ignorada. También se puede editar el
archivo de configuración que creó 'album':
/home/httpd/test/Photos/album.conf
Y borrar la opción ahí.
ITEM: Agregando más álbumes
Supongamos que hacemos un viaje a España. Tomamos algunas fotos y las ponemos en:
/home/httpd/test/Photos/Spain/
Ahora ejecute 'album' de nuevo al nivel superior:
% album /home/httpd/test/Photos
Esto arreglará 'Photos' para vincularlo a España y ejecutará
'album' para Spain/ también, con los mismos parámetros/temas ,
etc...
Ahora vayamos de viaje de nuevo, y creamos:
/home/httpd/test/Photos/Italy/
Podemos ejecutar 'album' al nivel superior:
% album /home/httpd/test/Photos
Pero esto escanearía de nuevo el directorio de España, el cual no ha cambiado.
'Album' normalmente no generará HTML o miniaturas de fotos si no se
necesita, pero todavía puede gastar tiempo, especialmente cuando los
álbumes sean más grandes.
Entonces podemos decirle que solo agregue el nuevo directorio:
% album -add /home/httpd/test/Photos/Italy
Esto arreglará el índice de nivel superior (en 'Photos') y
generará el álbum de Italia.
ITEM: Traducido por:
Stewart Goodman (goodman.stewart gmail com)
album-4.17/Docs/es/Section_5.html 0000644 0000000 0000000 00000047523 12661460265 015303 0 ustar root root
MarginalHacks album - Feature Requests, Bugs, Patches and Troubleshooting
- Documentation
A l b u m
F i v e - - F e a t u r e R e q u e s t s , B u g s , P a t c h e s a n d T r o u b l e s h o o t i n g
1: Feature Requests
If there's something you want added to album, first make sure
it doesn't already exist! Check the man page or the usage:
% man album% album -h
Also see -more and -usage options.
If you don't see it there, consider writing a patch or a plugin.
2: Bug reports
Before you submit a bug, please make sure you have the most current release of album!
When submitting a bug, I need to know at least:
1) Your operating system
2) The exact problem and the exact error messages
I'd also like to know, if possible:
1) The exact album command you ran
2) The output from the command
And I generally also need the debug output of album:
% album -d
Finally, make sure that you've got the most current
version of album, and the most current themes as well.
3: Writing Patches, Modifying album
If you want to modify album, you might want to check with me
first to make sure it's not already on my development plate.
If not, then consider writing it as a plugin instead of patching
the album source. This avoids adding complexity to album for
features that may not be globally used.
If it needs to go into album (for example, if it's a bug), then
please make sure to first download the most recent copy of album
first, then patch that and send me either a diff, a patch, or the
full script. If you comment off the changes you make that'd be great too.
4: Known Bugs
v3.11: -clear_* and -no_* doesn't clear out parent directory options.
v3.10: Burning CDs doesn't quite work with theme absolute paths.
v3.00: Array and code options are saved backwards, for example:
"album -lang aa .. ; album -lang bb .." will still use language 'aa'
Also, in some cases array/code options in sub-albums will not
be ordered right the first time album adds them and you may
need to rerun album. For example:
"album -exif A photos/ ; album -exif B photos/sub"
Will have "B A" for the sub album, but "A B" after: "album photos/sub"
5: PROBLEM: My index pages are too large!
I get many requests to break up the index pages after reaching a certain
threshold of images.
The problem is that this is hard to manage - unless the index pages are
treated just like sub-albums, then you now have three major components
on a page, more indexes, more albums, and thumbnails. And not only is
that cumbersome, but it would require updating all the themes.
Hopefully the next major release of album will do this, but until then
there is another, easier solution - just break the images up into
subdirectories before running album.
I have a tool that will move new images into subdirectories for you and
then runs album:
in_album6:ERROR: no delegate for this image format (./album)
You have the album script in your photo directory and it can't make
a thumbnail of itself! Either:
1) Move album out of the photo directory (suggested)
2) Run album with -known_images
7:ERROR: no delegate for this image format (some_non_image_file)
Don't put non-images in your photo directory, or else run with -known_images.
8:ERROR: no delegate for this image format (some.jpg)9:ERROR: identify: JPEG library is not available (some.jpg)
Your ImageMagick installation isn't complete and doesn't know how
to handle the given image type.
10:ERROR: Can't get [some_image] size from -verbose output.
ImageMagick doesn't know the size of the image specified. Either:
1) Your ImageMagick installation isn't complete and can't handle the image type.
2) You are running album on a directory with non-images in it without
using the -known_images option.
If you're a gentoo linux user and you see this error, then run this command
as root (thanks Alex Pientka):
USE="avi gif jpeg mpeg png quicktime tiff" emerge imagemagick
album-4.17/Docs/es/txt_1 0000644 0000000 0000000 00000012713 11077033173 013532 0 ustar root root Instalación
ITEM: Requisítos mínimos
1) El script en perl de album
2) Herramientas de ImageMagick (específicamente 'convert')
Ponga el script de 'album' y las herramientas de ImageMagick en alguna parte de su PATH,
o ejecute 'album' con su ruta completa (y especifique la ruta completa de 'convert'
ya sea en el script de 'album' o en los archivos de configuración en el álbum).
ITEM: Configuración inicial
La primera vez que ejecute el script de 'album' le pedirá algunas preguntas
para configurarlo. Si está usando UNIX/OSX, entonces puede ejecutarlo la primera
vez como 'root' para que haga la configuración global y los temas para todos
en vez del usuario actual.
ITEM: Instalación opcional
3) Temas
4) ffmpeg (para crear miniaturas de las imágenes)
5) jhead (para leer información EXIF)
6) plugins
7) Varias herramientas disponibles en MarginalHacks.com
ITEM: UNIX
Casi todas las distribuciones de UNIX incluyen ImageMagick y perl, entonces solo descargue
el script de 'album' y los temas (#1 and #3 más arriba) y es todo.
Para probar que se haya instalado correctamente, ejecute el script en un directorio con imágenes:
% album /path/to/my/photos/
ITEM: Debian UNIX
'album' se encuentra en debian estable, sin embargo por el momento está un poco viejo.
Recomiendo descargar la versión más reciente en MarginalHacks.
Puede guardar el paquete .deb, y luego, como root, ejecute:
% dpkg -i album.deb
ITEM: Macintosh OSX
Funciona muy bien en OSX, pero debe ser ejecutado a través de una terminal. Solamente
instale el script de 'album' y las herramientas de ImageMagick, y teclee la ruta de 'album',
cualquier opción que quiera, y luego la ruta del directorio con las imágenes
(separados por espacios), por ejemplo:
% album -theme Blue /path/to/my/photos/
ITEM: Win95, Win98, Win2000/Win2k, WinNT, WinXP
(Windows 95, Windows 98, Windows 2000, Windows NT, Windows XP)
Hay dos métodos para ejecutar scripts de perl en Windows: usando ActivePerl
o Cygwin.
ActivePerl es más simple y permite la ejecución de 'album' a través de una terminal de DOS,
sin embargo me han dicho que no funciona con temas.
Cygwin es más voluminoso pero también un paquete más robusto que da acceso
a muchas herramientas como en UNIX, y 'album' es ejecutado en una terminal bash (UNIX shell).
Método Cygwin
-------------
1) Instale Cygwin
Escoja los paquetes: perl, ImageMagick, bash
¡No utilice la instalación inicial ImageMagick! ¡Debe usar los paquetes de Cygwin de ImageMagick!
2) Instale album en una ruta bash o ejecútelo usando una ruta absoluta:
bash% album /some/path/to/photos
3) Si quere indormación exif en los pies de foto, necesita la versión de Cygwin jheadMétodo ActivePerl
-----------------
1) Instale ImageMagick para Windows
2) Instale ActivePerl, instalación completa (no se necesita un perfil para PPM)
Escoja: "Add perl to PATH" y "Create Perl file extension association"
3) En Win98: Instale tcap en la ruta
4) Guarde 'album' como album.pl en la ruta de Windows
5) Use una terminal de DOS para ejecutar:
C:> album.pl C:\some\path\to\photosAtención: Algunas versiones de Windows (por lo menos 2000/NT) tienen su
propio "convert.exe" en el directorio c:\windows\system32 (¿una utilidad para NTFS?).
Si lo tiene, entonces necesito editar el variable de la ruta,
or solamente especifique la ruta absoluta de 'convert' en el script de 'album'.
ITEM: ¿Cómo edito la ruta de Windows?
Usuarios de Windows NT4
Oprima el botón derecho en "My Computer", seleccione "Properties".
Seleccione la pestaña "Environment".
En "System Variables" seleccione "Path".
En "Value" agregue las rutas nuevas separados por puntos y coma
Oprima "OK/Set", oprima "OK" de nuevo.
Usuarios de Windows 2000
Oprima el botón derecho en "My Computer", seleccione "Properties".
Seleccione la pestaña "Advanced".
Oprima "Environment Variables".
En "System Variables" oprima dos veces en "Path"
En "Value" agregue las rutas nuevas separados por puntos y coma
Oprima "OK/Set", oprima "OK" de nuevo.
Windows XP Users
Abra "My Computer" y seleccione "Change a Setting".
Oprima dos veces "System".
Seleccione la pestaña "Advanced".
Seleccione "Environment Variables".
En "System Variables" oprima dos veces en "Path"
En "Value" agregue las rutas nuevas separados por puntos y coma
Oprima "OK".
ITEM: Macintosh OS9
No tengo planes de transferir 'album' a OS9 - no se en que estado están
las consolas y perl en pre-OSX. Si logra hacer que funcione
en OS9, avíseme.
ITEM: Traducido por:
Stewart Goodman (goodman.stewart gmail com)
album-4.17/Docs/es/flag.png 0000644 0000000 0000000 00000000507 11072326530 014162 0 ustar root root PNG
IHDR m?h bKGD tIME5 IDAT8픱N`[~J@f(|'F߀Ę &P0g×sOw #
h`H*`
'3T@;n,~gAWi>oc#a0uuX\{LrMQuUb=1s6¢7Je# /