App-MaMGal

 view release on metacpan or  search on metacpan

mamgal  view on Meta::CPAN


=item *

runs as a single process, does not reexecute itself when recursing,

=item *

uses Perl calls and ImageMagick library to load and scale images, create and
delete files, rather than executing external shell commands to do this (mplayer
being the only exception).

=back

Here is some example data of processing 15GB worth of images (9100 files in a
tree of 528 directories), compared to imageindex(1):

=over

=item generating a gallery from scratch:

=over

=item imageindex:

3 hours, 96%CPU usage, 170K major + 227M minor pagefaults

=item mamgal:

1.5 hours, 92%CPU usage, 146K major + 102M minor pagefaults

=back

=item re-run on a freshly generated gallery:

=over

=item imageindex:

51 minutes, 89%CPU usage, 155K major + 103M minor pagefaults

=item mamgal:

3.5 minutes, 58%CPU usage, 115 major + 1.7M minor pagefaults

=back

=back

=head2 Name and History

MaMGal stands for "Marcin and Magda Gallery", as it was initially written to
create my and my then-fiancée's photo collection. In the past I had been using
imageindex(1) for that, but with time our collection grew too large to be
processed with it in a timely manner, as imageindex took its time to read each
picture on every run. Therefore I came up with an idea for a gallery program
that would only process pictures that changed since the last run, and had a
test suite that would make it safer to modify.

=head1 SECURITY

MaMGal trusts the files it reads. It currently does not properly escape all
input read from the images before embedding it in the files it produces,
potentially leading to XSS-like vulnerabilities, if the input files are coming
from an untrusted source. This will probably be improved in the future.

=head1 CAVEATS

=head2 Root directory

Note that the directory specified on the command line is treated as the root of
the gallery, that is a directory that has no links to its parent directory.
Therefore to refresh a gallery you always need to run mamgal with the root
directory as an argument. (Otherwise, the subdirectory you specify will itself
turn into a root directory.)

=head2 Duplicate Description Suppression

In the "index" view, if an entry's description is the same as its immediate
predecessor's description, then it is omitted. This way you can have identical
descriptions embedded in multiple images, but the index view is not cluttered
with them.

=head1 AUTHOR

MaMGal is Copyright 2007-2011 Marcin Owsiany <marcin@owsiany.pl>

=head1 SEE ALSO

mplayer(1), jhead(1), imageindex(1), Image::Info(3), Image::ExifTool(3)

=head1 LICENSE

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

Please see the README file for more copyright and license information.

=cut



( run in 1.735 second using v1.01-cache-2.11-cpan-9789f410c06 )