From: Marius Gavrilescu Date: Mon, 31 Jul 2017 14:10:06 +0000 (+0300) Subject: Initial commit X-Git-Tag: 0.001^0 X-Git-Url: http://git.ieval.ro/?p=app-gallery.git;a=commitdiff_plain;h=b1336dac94875a4cadbf13c040c7d439c386364c Initial commit --- b1336dac94875a4cadbf13c040c7d439c386364c diff --git a/Changes b/Changes new file mode 100644 index 0000000..8bfad70 --- /dev/null +++ b/Changes @@ -0,0 +1,4 @@ +Revision history for Perl extension App::Gallery. + +0.001 2017-07-31T22:10+08:00 + - Initial release diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..3a7eb96 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,10 @@ +Changes +gallery.pl +lib/App/Gallery.pm +Makefile.PL +MANIFEST +README +t/100x400.png +t/800x200.png +t/App-Gallery.t +t/example-tmpl diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..5b7e815 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,22 @@ +use 5.014000; +use ExtUtils::MakeMaker; + +WriteMakefile( + NAME => 'App::Gallery', + VERSION_FROM => 'lib/App/Gallery.pm', + ABSTRACT_FROM => 'lib/App/Gallery.pm', + AUTHOR => 'Marius Gavrilescu ', + EXE_FILES => ['gallery.pl'], + MIN_PERL_VERSION => '5.14.0', + LICENSE => 'perl', + SIGN => 1, + PREREQ_PM => { + qw/Image::Magick 0/, + }, + META_ADD => { + dynamic_config => 0, + resources => { + repository => 'https://git.ieval.ro/?p=app-gallery.git', + }, + } +); diff --git a/README b/README new file mode 100644 index 0000000..3a5a61a --- /dev/null +++ b/README @@ -0,0 +1,33 @@ +App-Gallery version 0.001 +========================= + +gallery.pl creates basic image galleries. Pass an output directory and +a list of images to the script. The images will be hard linked into +the directory (or copied if hard linking fails), then thumbnails will +be created for the images, and finally an F file linking +to all the images will be created in the directory. + +INSTALLATION + +To install this module type the following: + + perl Makefile.PL + make + make test + make install + +DEPENDENCIES + +This module requires these other modules and libraries: + +* Image::Magick + +COPYRIGHT AND LICENCE + +Copyright (C) 2017 by Marius Gavrilescu + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.24.2 or, +at your option, any later version of Perl 5 you may have available. + + diff --git a/gallery.pl b/gallery.pl new file mode 100755 index 0000000..15d0d45 --- /dev/null +++ b/gallery.pl @@ -0,0 +1,78 @@ +#!/usr/bin/perl -w +use v5.14; + +use App::Gallery; +use Getopt::Long; + +my %args; + +GetOptions ( + 'out|o=s' => \$args{out}, + 'tmpl=s' => \$args{tmpl}, + 'title=s' => \$args{title}, + 'width=i' => \$args{width}, + 'height=i' => \$args{height}, +); + +die "Argument --out PATH is mandatory\n" unless $args{out}; + +App::Gallery->run(\%args, @ARGV); + +__END__ + +=encoding utf-8 + +=head1 NAME + +gallery.pl - very basic image gallery script + +=head1 SYNOPSIS + + gallery.pl --out DIR [--tmpl TEMPLATE] + [--width PIXELS] [--height PIXELS] [--title TITLE] IMAGE... + +=head1 DESCRIPTION + +gallery.pl creates basic image galleries. Pass an output directory and +a list of images to the script. The images will be hard linked into +the directory (or copied if hard linking fails), then thumbnails will +be created for the images, and finally an F file linking +to all the images will be created in the directory. + +=head1 OPTIONS + +=over + +=item B<--out> I + +Directory to create everything in. Created if it does not exist. Mandatory. + +=item B<--tmpl> I