From 2e53ba7b84145064ed68d5b431b87119614fd2ea Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 3 Mar 2011 23:22:49 +0100 Subject: Documentation updates --- bin/dthumb | 9 ++++----- lib/App/Dthumb.pm | 35 ++++++++++++++++------------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/bin/dthumb b/bin/dthumb index c9cded8..60eba92 100755 --- a/bin/dthumb +++ b/bin/dthumb @@ -87,11 +87,10 @@ B will create an F with a list (thumbnails) of all images found in the current directory; the thumbnails will link to the images. -It uses a javascript lightbox called B (see -Ehttp://www.shadowbox-js.com/E) to display the images. To view the -images without the lightbox, either disable javascript, use the B<-L> -commandline switch or open images by clicking on the filename instead of the -thumbnail. +It uses a javascript lightbox (see +Ehttp://www.huddletogether.com/projects/lightbox/E) to display the +images. To view them without the lightbox, either disable it using the B<-L> +option or open images by clicking on the filename instead of the thumbnail. Note that recursion is not yet supported. diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm index 336e797..a180b0b 100755 --- a/lib/App/Dthumb.pm +++ b/lib/App/Dthumb.pm @@ -67,6 +67,12 @@ If true, prints a short help message to STDOUT and quits Default: false +=item B => I + +If true, unconditionally recreate all thumbnails. + +Default: false + =item B => I Maximum image size in pixels, either width or height (depending on image @@ -143,19 +149,10 @@ sub new { return bless($ref, $obj); } -=head1 INTERNALS - -The following methods are internal only and do not need to be called by -external scripts. This documentation is only for people working on -B itself. All of them are object-oriented, so need to be called -as $dthumb->something(). - - =head2 read_directories -Store all image files in the current directory in $self->{files} (arrayref), -and all files in F<.thumbs> which do not have a corresponding full-size image -in $self->{old_thumbnails}. $self->{files} is sorted case-insensitively. +Read in a list of all image files in the current directory and all files in +F<.thumbs> which do not have a corresponding full-size image. =cut @@ -195,9 +192,8 @@ sub read_directories { Makes sure the F<.thumbs> directory exists. -If $self->{conf}->{lightbox} is true (which is the default), also creates the -F<.dthumb> directory and fills it with F, F, -F and F. +Also, if lightbox is enabled (which is the default), creates the F<.dthumb> +directory and fills it with all required files. =cut @@ -228,8 +224,8 @@ sub create_files { =head2 delete_old_thumbnails -Unlink all no longer required thumbnails (those saved in -$self->{old_thumbnails}). +Unlink all no longer required thumbnails (as previously found by +B). =cut @@ -295,8 +291,9 @@ sub create_thumbnail_html { =head2 create_thumbnail_image($file) -Load F<$file> and save a resized version in F<.thumbs/$file>. Returns if the -thumbnail file already exists, so far it doesn't do any further checks. +Load F<$file> and save a resized version in F<.thumbs/$file>. Skips thumbnail +generation if the thumbnail already exists and has a more recent mtime than +the original file. =cut @@ -369,7 +366,7 @@ __END__ =head1 AUTHOR -Copyright (C) 2009-2011 by Daniel Friesel Ederf@chaosdorf.deE +Copyright (C) 2009-2011 by Daniel Friesel Ederf@chaosdorf.deE =head1 LICENSE -- cgit v1.2.3