X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=mkgallery.pl;h=5c02e0b83995e8fbbe765854689865f2e67603d2;hp=1a3688439edf8acf58a7d031b90c9bf85b4f9974;hb=c4a12d60866fcb19955ab86faffd611491fb7b25;hpb=035d9a5f682feb8fc622ec5b3136bb98c91c3ef0 diff --git a/mkgallery.pl b/mkgallery.pl index 1a36884..5c02e0b 100755 --- a/mkgallery.pl +++ b/mkgallery.pl @@ -51,15 +51,35 @@ my $noasktitle = 0; charset("utf-8"); -GetOptions( 'incpath'=>\$incpath, +unless (GetOptions( + 'help'=>\&help, + 'incpath'=>\$incpath, 'asktitle'=>\$asktitle, 'noasktitle'=>\$noasktitle, - 'debug'=>\$debug); + 'debug'=>\$debug)) { + &help; +} my $term = new Term::ReadLine "Edit Title"; FsObj->new(getcwd)->iterate; +sub help { + + print STDERR <<__END__; +usage: $0 [options] + --help: print help message and exit + --incpath: do not try to find .include diretory upstream, use + specified path (absolute or relavive). Use with causion. + --debug: print a lot of debugging info to stdout as you run + --asktitle: ask to edit album titles even if there are ".title" files + --noasktitle: don't ask to enter album titles even where ".title" + files are absent. Use partial directory names as titles. +__END__ + + exit 1; +} + sub new { my $this = shift; my $class;