summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-03-03 23:22:49 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-03-03 23:22:49 +0100
commit2e53ba7b84145064ed68d5b431b87119614fd2ea (patch)
treed90f1d1cfa71521159844959762837e64fab54bc
parent717d7035f77b357908e886e70100ae0b59d1cdc7 (diff)
Documentation updates
-rwxr-xr-xbin/dthumb9
-rwxr-xr-xlib/App/Dthumb.pm35
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<dthumb> will create an F<index.xhtml> 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<shadowbox> (see
-E<gt>http://www.shadowbox-js.com/E<gt>) 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
+E<lt>http://www.huddletogether.com/projects/lightbox/E<gt>) 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<recreate> => I<bool>
+
+If true, unconditionally recreate all thumbnails.
+
+Default: false
+
=item B<size> => I<int>
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<App::Dthumb> 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<lightbox.js>, F<overlay.png>,
-F<loading.gif> and F<close.gif>.
+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<read_directories>).
=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 E<gt>derf@chaosdorf.deE<lt>
+Copyright (C) 2009-2011 by Daniel Friesel E<lt>derf@chaosdorf.deE<gt>
=head1 LICENSE