X-Git-Url: https://git.defcon.no/?p=plsgen;a=blobdiff_plain;f=plsgen;fp=plsgen;h=585ff8dbc5805a66b4bb3e1b73e63e7bdb1f1b53;hp=323e5c34682be7be5217f6700206cebe6be9e5e7;hb=ec495b35f1d9b9a100980c9a6f2a7561701d6070;hpb=16f2646e3b6851d6187eccb0b2c595ccc9fff873 diff --git a/plsgen b/plsgen index 323e5c3..585ff8d 100755 --- a/plsgen +++ b/plsgen @@ -7,10 +7,7 @@ use threads; use threads::shared; use strict; -# DONE: Config option for size of view/thumbnail -# DONE: Config option to disable arrow-up navigation -# DONE: Config option to disable image rescaling ? -# DONE: Consider multithreading +# DONE: Removed some default values in config, allowing empty options # TODO: Stripping of image suffix for HTML file w/config option? # TODO: Templating of EXIF # TODO: Priority/sorting of EXIF tags @@ -142,8 +139,8 @@ for ( my $i = 1; $i <= $imagecount; $i++) else { $indexfile = "index" . $indexcount . ".html"; } my $navscript = gen_navscript( $previous, $next, $indexfile ); my $position = $i . " of " . $imagecount; - my $prev_text = ""; - my $next_text = ""; + my $prev_text = "Previous image"; + my $next_text = "Next image"; my $cur_index_text = "" . $idx_ret_text . ""; my $current_display = $current; $current_display = "view/" . $current unless $disable_rescale; @@ -221,7 +218,7 @@ for ( my $i = 1; $i <= $imagecount; $i++) close HTML; # - - Append image thumbnail code to current index content - $thumbs .= $thumb_pre . "" . $thumb_post; + $thumbs .= $thumb_pre . "View " . $current . "" . $thumb_post; if ( $i % ($rows*$columns) == 0 ) { $thumbs .= ""; @@ -423,7 +420,7 @@ sub get_config CASE => 1, ERROR => \&cfg_error, GLOBAL => { - DEFAULT => "", + DEFAULT => "", ARGCOUNT => AppConfig::ARGCOUNT_ONE }, } @@ -462,21 +459,14 @@ sub get_config $cfg->disable_rescale(0); $cfg->define('thumb_pre'); - $cfg->thumb_pre("
"); $cfg->define('thumb_post'); - $cfg->thumb_post("
"); $cfg->define('comment_pre'); - $cfg->comment_pre("
"); $cfg->define('comment_post'); - $cfg->thumb_post("
"); $cfg->define('idx_prev_text'); - $cfg->idx_prev_text("← Back"); $cfg->define('idx_next_text'); - $cfg->idx_next_text("Next →"); $cfg->define('idx_ret_text'); - $cfg->idx_ret_text("To index"); $cfg->define('footer_tag'); $cfg->footer_tag('plsgen : Perl Simple Gallery Generator ' . $version);