summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-03-27 21:43:06 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-03-27 21:43:06 +0200
commit8a3a3d1e723a0e5b803ebf9f122c28d1d1052208 (patch)
treeca437dec069f49bf4a2a073afa83cac040b21a75
parentd7607133e13621661a55efb65d6d20b02901ff40 (diff)
add quiet mode
-rwxr-xr-xbin/dthumb13
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/dthumb b/bin/dthumb
index 0c691c9..32931f9 100755
--- a/bin/dthumb
+++ b/bin/dthumb
@@ -27,6 +27,7 @@ GetOptions(
help|h
no-names|n
quality|q=i
+ quiet|Q
recreate|r
recursive|R
size|d=i
@@ -58,14 +59,18 @@ $timer->attr(
);
for my $file ( $dthumb->get_files ) {
- print STDERR $timer->report(
- "\r\e[KCreating Thumbnails: %p done, %L elapsed, %E remaining", $id++,
- );
+ if ( not $opt->{quiet} ) {
+ print STDERR $timer->report(
+ "\r\e[KCreating Thumbnails: %p done, %L elapsed, %E remaining",
+ $id++, );
+ }
$dthumb->create_thumbnail_html($file);
$dthumb->create_thumbnail_image($file);
}
-print "\n";
+if ( not $opt->{quiet} ) {
+ print "\n";
+}
$dthumb->write_out_html;