Finally!
The first release of my "MediaGallery" is feature-complete.
To see it in action, visit: [freigeist.org]
or http://sophiesfotos.de
It is a web based media gallery which shows images and videos with on-the-fly created thumbnails (via Image::Magick and ffmpeg). Furthermore it shows other files with icons based on the mime time. The content of text-files will be embedded in the page. It supports EXIF data and can be customized with HTML::Template(::Compiled)-Templates.
You can get the latest Release (and more info) in my CPAN-Page:
http://search.cpan.org/~fish/
Please try it and report any bugs or fuckups in the code so that i can release it soon. Atm its still a developer release, so you can't install it with 'cpan WWW::MeGa' or 'install WWW::MeGa' in the CPAN-shell. See INSTALLATION-Section for further info.
FEATURES
- on-the-fly image resizing (and orientation tag based autorotating)
- video thumbnails
- displays text files
- reads exif tag
- very easy to setup (change one path in the config and your done)
- templating with HTML::Template::Compiled
INSTALLATION
Install the package
Use your favorite way to install this CPAN-Package and make sure you
have ffmpeg somewhere in your path (or specify the path in the
config) if you want video thumbnails.
If you want to install it via the cpan-installer use:
cpan WWW::MeGa
To install a developer release of WWW::MeGa, use the CPAN-Shell:
perl -MCPAN -eshell
Now you can see all releases with ls fish and install the one you want: install FISH/WWW-MeGa-0.09_5.tar.gz
WARNING: Installation via cpan or the CPAN-Shell is only recommended
if you have a local administered perl installation. If you installed
perl from your packet manager you should use the packet manager to
install this package too. Have a look at g-cpan (Gentoo) and
dh-make-perl (Debian/Ubuntu).
Use FastCGI (preferred)
Copy examples/gallery.fcgi to some dir and configure your webserver to
use it as a FastCGI:
Example for lighttpd:
fastcgi.server = (
"/gallery" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/gallery" + PID + ".socket",
"check-local" => "disable",
"bin-path" => "/var/www/gallery.fcgi"
)
),
)
Use CGI
Copy examples/gallery.cgi to your cgi-bin/ directory and make
sure its executable. Now WWW::MeGa should have created a default config
file. Change 'root' to your images and you are done.
Config
Make sure the user under which the webserver is running has write
permission to the config file. The path to the config file defaults to
to 'gallery.conf' in the same dir as your script. In these cases:
/var/www/gallery.conf (FCGI) and
/path/to/your/cgi-bin/gallery.conf.
You can (and should, at least in the CGI case) specify a custom path to
the config by changing the scripts to pass:
PARAMS => { config => '/path/to/your/config' }
to the new method of the WWW::MeGa
modified gallery.fcgi
...
my $app = WWW::MeGa->new
(
QUERY => $q,
PARAMS => { cache => \%cache, config => '/path/to/your/config' },
);
...
modified gallery.cgi
...
my $webapp = WWW::MeGa->new(PARAMS => {config => '/path/to/your/config'});
...
Test it
Now visit the the URL to you script. (In these examples:
[example.com] (FastCGI) and
[example.com] (CGI)) and you
should see the example photos.