The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WWW::MeGa - A MediaGallery

SYNOPSIS

 use WWW::MeGa;
 my $webapp = WWW::MeGa->new
 $webapp->run;

DESCRIPTION

WWW::MeGa is a web based media browser. It should be run from mod_perl or FastCGI (see examples/gallery.fcgi) because it uses some runtime caching.

Every file will be delievered by the CGI itself. So you don't have to care about setting up picture/thumb dirs.

FEATURES

  • on-the-fly image resizing (and orientation tag based autorotating)

  • video thumbnails

  • displays text files

  • reads exif tag

  • templating with HTML::Template::Compiled

CONFIG WWW::MeGa uses CGI::Application::Plugin::Config::Simple for config handling. You can specify the path to a (writable) config file in the new methode of WWW::MeGa:

   my $gallery = WWW::MeGa->new(PARAMS => { config => '/path/to/gallery.conf' })

It defaults to $RealBin/gallery.conf, see RealBin for more info. After the first run it will create a config containing the defaults.

Parameters

root

Path to your images

cache

Path where to store the thumbnails

thumb-type

Type of the thumbnails. WWW::MeGa uses Image::Magick for generating thumbnails. See convert -list format for file types supported by you ImageMagick installation.

sizes

A array of valid "thumbnail"/resized image sizes, defaults to [ 120, 600, 800 ]. The CGI parameter size is the index to that array.

debug

If set to 1, enabled debugging to your servers error log.

album_thumb

Specify the name of the image which will be used as a thumbnail for the containing album, defaults to THUMBNAIL.

So if you want to have the image foo.jpg be the thumbnail for the album bar, copy it to bar/THUMBNAIL (or use a symlink)

icons and templates

Path to the icons and templates, defaults to icons/ in the module's share dir as defined by Module::Install and File::ShareDir

METHODES

runmodes

the public runmodes, accessable via the rm parameter

image

shows a thumbnail

original

shows the original file

view

shows a album/folder

COPYRIGHT

Copyright 2008 by Johannes 'fish' Ziemke.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

CGI::Application

AUTHOR

Johannes 'fish' Ziemke <my nickname at cpan org>