]> git.donarmstrong.com Git - deb_pkgs/libapache-gallery-perl.git/commitdiff
* New upstream release
authorDon Armstrong <don@donarmstrong.com>
Sat, 26 Nov 2011 22:44:31 +0000 (22:44 +0000)
committerDon Armstrong <don@donarmstrong.com>
Sat, 26 Nov 2011 22:44:31 +0000 (22:44 +0000)
  + Added ignore file support (Closes: #619625)
  + Cache dir default (Closes: #337197)

git-svn-id: file:///srv/don_svn/deb_pkgs/libapache-gallery-perl/trunk@632 8f7917da-ec0b-0410-a553-b9b0e350d17e

Changes
META.yml
README
debian/changelog
lib/Apache/Gallery.pm

diff --git a/Changes b/Changes
index f72b901a4b0d538c91cf0a6b5a1462c2db3d0b22..e02c697a538b92d4ca495c8030f8358b3c230372 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,8 +1,25 @@
-$Author: mil $ $Rev: 324 $
-$Date: 2011-02-22 21:56:06 +0100 (Tue, 22 Feb 2011) $
+$Author: mil $ $Rev: 335 $
+$Date: 2011-06-08 20:47:46 +0200 (Wed, 08 Jun 2011) $
 
 Revision history for Perl extension Apache::Gallery.
 
+1.0.2 Wed Jun  8 20:47:16 CEST 2011
+
+       - Extended GalleryUnderscoresToSpaces to filenames as well.
+         (Debian bug #348724, Francesco Potortì)
+       - Added txt to GalleryDocFile, the code in Gallery.pm already
+         allowed it.  (Luca Capello)
+       - Added text-html.png and text-txt.png icons.
+         (Debian bug #423004, Luca Capello)
+       - Fixed counter typo for <directory>.folder in next directory
+         menu item.  (Luca Capello)
+       - Added support to ignore items through <directory|file>.ignore.
+         (Debian bug #619625, Luca Capello)
+       - Fixed spelling typos in Gallery.pm and README.  (Luca Capello)
+       - GalleryCacheDir defaults to /var/cache/www/ per the FHS-2.3.
+         (Debian bug #337197, Luca Capello)
+       - Fixed two minor POD errors (Michael Legart)
+
 1.0.1 Wed Feb 23 20:45:38 CET 2011
 
        - Added missing template files to MANIFEST
index 9541ad2c34851727c60d618dc3cab760be678e79..f0d16462068dfdebe1520ae05741ac55fab639c6 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Apache-Gallery
-version:            1.0.1
+version:            1.0.2
 abstract:           mod_perl handler to create an image gallery
 author:
     - Michael Legart <michael@legart.dk>
diff --git a/README b/README
index 85690f5dd990af1139f2990d549295f575952993..64361e841a14b777a14403bdb05c4c48442a48d0 100644 (file)
--- a/README
+++ b/README
@@ -19,7 +19,7 @@ CONFIGURATION
     The options are set in the httpd.conf/.htaccess file using the syntax:
     PerlSetVar OptionName 'value'
 
-    Example: PerlSetVar GalleryCacheDir '/var/tmp/Apache-Gallery/'
+    Example: PerlSetVar GalleryCacheDir '/var/cache/www/'
 
     GalleryAutoRotate
         Some cameras, like the Canon G3, can detect the orientation of a the
@@ -32,10 +32,9 @@ CONFIGURATION
 
     GalleryCacheDir
         Directory where Apache::Gallery should create its cache with scaled
-        pictures. The default is /var/tmp/Apache-Gallery/ . Here, a
-        directory for each virtualhost or location will be created
-        automaticly. Make sure your webserver has write access to the
-        CacheDir.
+        pictures. The default is /var/cache/www/ . Here, a directory for
+        each virtualhost or location will be created automatically. Make
+        sure your webserver has write access to the CacheDir.
 
     GalleryTemplateDir
         Full path to the directory where you placed the templates. This
@@ -139,7 +138,7 @@ CONFIGURATION
         GalleryInfo will be available to your templates as $EXIF_<KEYNAME>
         (in all uppercase). That means that with the default setting
         "Picture Taken => DateTimeOriginal, Flash => Flash" you will have
-        the variables $EXIF_DATETIMEORIGINAL and $EXIF_FLASH avilable to
+        the variables $EXIF_DATETIMEORIGINAL and $EXIF_FLASH available to
         your templates. You can place them anywhere you want.
 
     GalleryRootPath
@@ -165,8 +164,8 @@ CONFIGURATION
         Apache::Gallery but are not visible in the index.
 
         The default is
-        '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)
-        $'
+        '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|ogg|pdf|rtf|wav|dlt|txt|html?|csv|
+        eps)$'
 
     GalleryTTFDir
         To use the GalleryCopyrightText feature you must set this option to
@@ -235,22 +234,23 @@ CONFIGURATION
 
     GalleryUnderscoresToSpaces
         Set this option to 1 to convert underscores to spaces in the listing
-        of directory and file names, as well as in the alt attribute for HTML
-        <img> tags.
+        of directory and file names, as well as in the alt attribute for
+        HTML <img> tags.
 
     GalleryCommentExifKey
-    Set this option to e.g. ImageDescription to use this field as comments
-    for images.
+        Set this option to e.g. ImageDescription to use this field as
+        comments for images.
 
     GalleryEnableMediaRss
-    Set this option to 1 to enable generation of a media RSS feed. This can
-    be used e.g. together with the PicLens plugin from http://piclens.com
+        Set this option to 1 to enable generation of a media RSS feed. This
+        can be used e.g. together with the PicLens plugin from
+        http://piclens.com
 
 FEATURES
     Rotate images
         Some cameras, like the Canon G3, detects the orientation of a
         picture and adds this info to the EXIF header. Apache::Gallery
-        detects this and automaticly rotates images with this info.
+        detects this and automatically rotates images with this info.
 
         If your camera does not support this, you can rotate the images
         manually, This can also be used to override the rotate information
@@ -258,8 +258,8 @@ FEATURES
         with the GalleryAutoRotate option.
 
         To use this functionality you have to create file with the name of
-        the picture you want rotated appened with ".rotate". The file should
-        include a number where these numbers are supported:
+        the picture you want rotated appended with ".rotate". The file
+        should include a number where these numbers are supported:
 
                 "1", rotates clockwise by 90 degree
                 "2", rotates clockwise by 180 degrees
@@ -269,6 +269,10 @@ FEATURES
         would create a file in the same directory called
         "Picture1234.jpg.rotate" with the number 1 inside of it.
 
+    Ignore directories/files
+        To ignore a directory or a file (of any kind, not only images) you
+        create a <directory|file>.ignore file.
+
     Comments
         To include comments for a directory you create a <directory>.comment
         file where the first line can contain "TITLE: New title" which will
@@ -308,7 +312,7 @@ AUTHOR
     Michael Legart <michael@legart.dk>
 
 COPYRIGHT AND LICENSE
-    Copyright (C) 2001-2005 Michael Legart <michael@legart.dk>
+    Copyright (C) 2001-2011 Michael Legart <michael@legart.dk>
 
     Templates designed by Thomas Kjaer <tk@lnx.dk>
 
index 06e6b5b914b3d9d2fb2d6da18119ff2c86f9ce06..4133a8b147bd3b16d02d232cb4e417f149d01202 100644 (file)
@@ -1,3 +1,11 @@
+libapache-gallery-perl (1.0.2-1) unstable; urgency=low
+
+  * New upstream release
+    + Added ignore file support (Closes: #619625)
+    + Cache dir default (Closes: #337197)
+
+ -- Don Armstrong <don@debian.org>  Sat, 26 Nov 2011 14:42:09 -0800
+
 libapache-gallery-perl (1.0.1-3) unstable; urgency=low
 
   * Include default/navdirectory.tpl and new/navdirectory.tpl by copying
index 6e62182ff1cb3ac538792eb0ba7f988b2c6ad168..ee9f63af81e4c0ea3eaa09c7e11abdc556b9e366 100644 (file)
@@ -1,13 +1,13 @@
 package Apache::Gallery;
 
-# $Author: mil $ $Rev: 324 $
-# $Date: 2011-02-22 21:56:06 +0100 (Tue, 22 Feb 2011) $
+# $Author: mil $ $Rev: 335 $
+# $Date: 2011-06-08 20:47:46 +0200 (Wed, 08 Jun 2011) $
 
 use strict;
 
 use vars qw($VERSION);
 
-$VERSION = "1.0.1";
+$VERSION = "1.0.2";
 
 BEGIN {
 
@@ -75,7 +75,7 @@ sub handler {
        }
 
        $r->headers_out->{"X-Powered-By"} = "apachegallery.dk $VERSION - Hest design!";
-       $r->headers_out->{"X-Gallery-Version"} = '$Rev: 324 $ $Date: 2011-02-22 21:56:06 +0100 (Tue, 22 Feb 2011) $';
+       $r->headers_out->{"X-Gallery-Version"} = '$Rev: 335 $ $Date: 2011-06-08 20:47:46 +0200 (Wed, 08 Jun 2011) $';
 
        my $filename = $r->filename;
        $filename =~ s/\/$//;
@@ -351,7 +351,8 @@ sub handler {
 
                                my $fileurl = $uri."/".$file;
 
-                               if (-d $thumbfilename) {
+                               # Debian bug #619625 <http://bugs.debian.org/619625>
+                               if (-d $thumbfilename && ! -e $thumbfilename . ".ignore") {
                                        my $dirtitle = '';
                                        if (-e $thumbfilename . ".folder") {
                                                $dirtitle = get_filecontent($thumbfilename . ".folder");
@@ -367,7 +368,8 @@ sub handler {
                                                                           );
 
                                }
-                               elsif (-f $thumbfilename && $thumbfilename =~ /$doc_pattern/i && $thumbfilename !~ /$img_pattern/i) {
+                               # Debian bug #619625 <http://bugs.debian.org/619625>
+                               elsif (-f $thumbfilename && $thumbfilename =~ /$doc_pattern/i && $thumbfilename !~ /$img_pattern/i && ! -e $thumbfilename . ".ignore") {
                                        my $type = lc($1);
                                        my $stat = stat($thumbfilename);
                                        my $size = $stat->size;
@@ -400,7 +402,8 @@ sub handler {
                                                                               }
                                                                      );
                                }
-                               elsif (-f $thumbfilename) {
+                               # Debian bug #619625 <http://bugs.debian.org/619625>
+                               elsif (-f $thumbfilename && ! -e $thumbfilename . ".ignore") {
 
                                        my ($width, $height, $type) = imgsize($thumbfilename);
                                        next if $type eq 'Data stream is not a known image file format';
@@ -464,7 +467,8 @@ sub handler {
                                return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
                        }
        
-                       my @neighbour_directories = grep { !/^\./ && -d "$parent_filename/$_" } readdir (PARENT_DIR);
+                       # Debian bug #619625 <http://bugs.debian.org/619625>
+                       my @neighbour_directories = grep { !/^\./ && -d "$parent_filename/$_" && ! -e "$parent_filename/$_" . ".ignore" } readdir (PARENT_DIR);
                        my $dirsortby;
                        if (defined($r->dir_config('GalleryDirSortBy'))) {
                                $dirsortby=$r->dir_config('GalleryDirSortBy');
@@ -499,7 +503,7 @@ sub handler {
                                        }
                                        if ($neightbour_counter < scalar @neighbour_directories - 1) {
                                                my $linktext = $neighbour_directories[$neightbour_counter+1];
-                                               if (-e $parent_filename.'/'.$neighbour_directories[$neightbour_counter-1] . ".folder") {
+                                               if (-e $parent_filename.'/'.$neighbour_directories[$neightbour_counter+1] . ".folder") {
                                                        $linktext = get_filecontent($parent_filename.'/'.$neighbour_directories[$neightbour_counter+1] . ".folder");
                                                }
                                                my %info = (
@@ -616,7 +620,7 @@ sub handler {
                        show_error($r, 500, "Unable to access directory", "Unable to access directory $path");
                        return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
                }
-               my @pictures = grep { /$img_pattern/i } readdir (DATADIR);
+               my @pictures = grep { /$img_pattern/i && ! -e "$path/$_" . ".ignore" } readdir (DATADIR);
                closedir(DATADIR);
                @pictures = gallerysort($r, @pictures);
 
@@ -852,7 +856,7 @@ sub cache_dir {
 
        unless ($r->dir_config('GalleryCacheDir')) {
 
-               $cache_root = '/var/tmp/Apache-Gallery/';
+               $cache_root = '/var/cache/www/';
                if ($r->server->is_virtual) {
                        $cache_root = File::Spec->catdir($cache_root, $r->server->server_hostname);
                } else {
@@ -1659,7 +1663,7 @@ directories.
 The options are set in the httpd.conf/.htaccess file using the syntax:
 B<PerlSetVar OptionName 'value'>
 
-Example: B<PerlSetVar GalleryCacheDir '/var/tmp/Apache-Gallery/'>
+Example: B<PerlSetVar GalleryCacheDir '/var/cache/www/'>
 
 =over 4
 
@@ -1676,9 +1680,9 @@ to 0.
 =item B<GalleryCacheDir>
 
 Directory where Apache::Gallery should create its cache with scaled
-pictures. The default is /var/tmp/Apache-Gallery/ . Here, a directory
-for each virtualhost or location will be created automaticly. Make
-sure your webserver has write access to the CacheDir.
+pictures. The default is /var/cache/www/ . Here, a directory for each
+virtualhost or location will be created automatically. Make sure your
+webserver has write access to the CacheDir.
 
 =item B<GalleryTemplateDir>
 
@@ -1795,7 +1799,7 @@ If you set this option to 'variables' the items you configure in GalleryInfo
 will be available to your templates as $EXIF_<KEYNAME> (in all uppercase). 
 That means that with the default setting "Picture Taken => DateTimeOriginal, 
 Flash => Flash" you will have the variables $EXIF_DATETIMEORIGINAL and 
-$EXIF_FLASH avilable to your templates. You can place them
+$EXIF_FLASH available to your templates. You can place them
 anywhere you want.
 
 =item B<GalleryRootPath>
@@ -1913,6 +1917,8 @@ of directory and file names, as well as in the alt attribute for HTML
 
 =back
 
+=over 4
+
 =item B<GalleryCommentExifKey>
 
 Set this option to e.g. ImageDescription to use this field as comments
@@ -1923,6 +1929,8 @@ for images.
 Set this option to 1 to enable generation of a media RSS feed. This
 can be used e.g. together with the PicLens plugin from http://piclens.com
 
+=back
+
 =head1 FEATURES
 
 =over 4
@@ -1931,7 +1939,7 @@ can be used e.g. together with the PicLens plugin from http://piclens.com
 
 Some cameras, like the Canon G3, detects the orientation of a picture
 and adds this info to the EXIF header. Apache::Gallery detects this
-and automaticly rotates images with this info.
+and automatically rotates images with this info.
 
 If your camera does not support this, you can rotate the images 
 manually, This can also be used to override the rotate information
@@ -1939,7 +1947,7 @@ from a camera that supports that. You can also disable this behavior
 with the GalleryAutoRotate option.
 
 To use this functionality you have to create file with the name of the 
-picture you want rotated appened with ".rotate". The file should include 
+picture you want rotated appended with ".rotate". The file should include 
 a number where these numbers are supported:
 
        "1", rotates clockwise by 90 degree
@@ -1950,6 +1958,11 @@ So if we want to rotate "Picture1234.jpg" 90 degrees clockwise we would
 create a file in the same directory called "Picture1234.jpg.rotate" with
 the number 1 inside of it.
 
+=item B<Ignore directories/files>
+
+To ignore a directory or a file (of any kind, not only images) you
+create a <directory|file>.ignore file.
+
 =item B<Comments>
 
 To include comments for a directory you create a <directory>.comment
@@ -2009,7 +2022,7 @@ Michael Legart <michael@legart.dk>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2001-2005 Michael Legart <michael@legart.dk>
+Copyright (C) 2001-2011 Michael Legart <michael@legart.dk>
 
 Templates designed by Thomas Kjaer <tk@lnx.dk>