====== Lazygal ====== ===== About ===== ''lazygal'' is another static web gallery generator written in [[http://python.org|Python]]. It can be summed up by the following features : * Commande line based (thus scriptable). * Reusable engine (to make a GUI for instance). * Lazy : do not build what's already there. * Recursive : generates subgalleries. * Does not change your original pictures directories (the source argument). * Tells you what should not be in your generated directories (and delete it if you want to). * Can generate multiple sizes to browse pictures according to your screen. * Sort pictures in the same directory by EXIF date if available, else file modification time. * Theming. * XHTML and CSS compliance for provided themes. * Support for per folder meta data. * RSS feed generation for your album updates. * Optional generation of ZIP archives of original pictures. * Output internationalization. * Optional breaking of big galleries (directories) on multiple pages. A huge gallery shows Lazygal in action : [[http://sousmonlit.dyndns.org/album/|Album]]. Another example using album images: [[http://photos.cihar.com/2007-japan/|Photos from Japan]]. ===== Requirements ===== ''lazygal'' requires : * [[http://python.org|Python]] >= 2.4. * [[http://www.pythonware.com/products/pil/|Python imaging library (PIL)]] >= 1.1.6. * [[http://tilloy.net/dev/pyexiv2/|pyexiv2]], a Python binding to [[http://exiv2.org/|exiv2]], a library to access image metadata. * [[http://genshi.edgewall.org/|Genshi]] >= 0.5, a //Python toolkit for generation of output for the web//. * [[http://effbot.org/zone/element-index.htm|Python ElementTree]] or Python >= 2.5 for RSS feed generation. Building a ''lazygal'' installation requires : * ''msgfmt'' for translations. ''intltool-update'' and ''xgettext'' are also needed to update translation files. All are included in the GNU ''gettext'' package. * ''xsltproc'' to build manpages from docbook sources. It is included in the [[http://xmlsoft.org/XSLT/xsltproc2.html|libxslt package]]. ===== Usage ===== Usage is straightforward : usage: lazygal [options] albumdir Options: -h, --help Show this help message and exit. --quiet Don't output anything except for errors. --debug Output everything that lazygal is doing. -o DEST_DIR, --output-directory=DEST_DIR Directory where web pages, slides and thumbs will be written (default is current directory). -t THEME, --theme=THEME Theme name (looked up in theme directory) or theme full path. --default-style=DEFAULT_STYLE Default style to apply to the theme. --template-vars=TPL_VARS Common variables to load all templates with. --clean-destination Clean destination directory of files that should not be there. -v, --version Display program version. --check-all-dirs Exhaustively go through all directories regardless of source modification time. -s IMAGE_SIZE, --image-size=IMAGE_SIZE Size of images, define as =x,..., eg. small=800x600,medium=1024x768. -T THUMBNAIL_SIZE, --thumbnail-size=THUMBNAIL_SIZE Size of thumbnails, define as x, eg. 150x113. -q QUALITY, --quality=QUALITY Quality of generated JPEG images (default is 85). -O, --original Include original photos in output. --puburl=PUB_URL Publication URL (only usefull for feed generation). -m, --generate-metadata Generate metadata description files where they don't exist. -n THUMBS_PER_PAGE, --thumbs-per-page=THUMBS_PER_PAGE Maximum number of thumbs per index page. This enables index pagination (0 is unlimited). -z, --make-dir-zip Make a zip archive of original pictures for each directory. --webalbum-pic-bg=WEBALBUMPIC_BG Webalbum picture background color. Default is transparent, and implies the PNG format. Any other value, e.g. red, white, blue, uses JPEG. If you want to force ''lazygal'' into checking a directory's contents, simply ''touch'' the source directory to modify its modification time : $ touch album_source/gallery_to_check ===== Download & Changelog ===== * [[http://sousmonlit.dyndns.org/~niol/reposnapshots/lazygal-0.4.tar.gz|Lazygal 0.4]] which can speak foreign languages. * [[http://sousmonlit.dyndns.org/~niol/reposnapshots/lazygal-0.3.1.tar.gz|Lazygal 0.3.1]] which fixes up some stuff. * [[http://sousmonlit.dyndns.org/~niol/reposnapshots/lazygal-0.3.tar.gz|Lazygal 0.3]] which brings messy directory pictures (the ones that are shown to represent a subgallery). * [[http://sousmonlit.dyndns.org/~niol/reposnapshots/lazygal-0.2.tar.gz|Lazygal 0.2]] which brings RSS feed generation and a real ''Makefile'' infrastructure. * [[http://sousmonlit.dyndns.org/~niol/reposnapshots/lazygal-0.1.tar.gz|Lazygal 0.1]] (full log of changes may be browsed in [[http://sousmonlit.dyndns.org/~niol/darcsweb/darcsweb.cgi?r=lazygal;a=summary|Lazygal's repository browser]]) Lazygal is part of [[http://debian.org|Debian]] (and thus [[http://ubuntu.com|Ubuntu]] universe), which should make it one ''aptitude install'' away if you use one of those. ===== Contributing ===== ==== Code ==== Code may be downloaded using [[http://darcs.net|darcs]] : darcs get --partial http://sousmonlit.dyndns.org/~niol/repository/lazygal/ It is browsable online in [[http://sousmonlit.dyndns.org/~niol/darcsweb/darcsweb.cgi?r=lazygal;a=summary|Lazygal's repository browser]]. There should be an up to date snapshot of the repository available in the [[http://sousmonlit.dyndns.org/~niol/reposnapshots/|Snapshots directory]]. Patches are very welcome and ''darcs'' makes it really easy to exchange changesets. ==== Translations ==== To start a new translation, for example ''cs_CZ'', you can proceed as follows. The first script requires ''intltool-update'' and ''xgettext'' from the GNU ''gettext'' package. $ devscripts/update-po $ cp locale/lazygal.pot locale/cz_CZ.po $ $EDITOR locale/cz_CZ.po (do not bother committing or sending in changes to ''lazygal.pot'', they contain a lot of noise because of changes in line numbers) Another side-note : in templates, translatable strings are declared in a character noisy way (I hope to fix this one day). As an example :

Parent

becomes

${_('Parent')}

===== Bugs & feature requests ===== This project has too few users/contributors to justify the use of a dedicated bug tracking application. For now, bug reports and feature requests may go in : * by e-mail, directly to (please put ''lazygal'' somewhere in the subject), * through the [[http://bugs.debian.org/lazygal|Debian Bug Tracking System]] to which I think I subscribed, * and even through ''darcs send'' as patches to a ''./TODO'' file in the source, preferably with ''TODO'' at the beginning of the commit message.