diff options
author | Andy Shevchenko <andy@smile.org.ua> | 2012-07-28 15:42:50 +0000 |
---|---|---|
committer | Andy Shevchenko <andy@smile.org.ua> | 2012-07-28 15:42:50 +0000 |
commit | d2dd2085024b382ee60c3fbdff8effcddda1d408 (patch) | |
tree | 8dad30d5e0f9428b258b6481309ac3db281a77df /renrot | |
parent | 5df75c0863c2d7516746be25309cd1e9045f3d2e (diff) | |
download | renrot-d2dd2085024b382ee60c3fbdff8effcddda1d408.tar.gz renrot-d2dd2085024b382ee60c3fbdff8effcddda1d408.tar.bz2 |
doc: use perldoc for quick help
The recipe is borrowed from the exiftool script.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
git-svn-id: file:///svnroot/renrot/trunk@613 fe2816f4-e837-0410-b10a-f608c9d244a1
Diffstat (limited to 'renrot')
-rwxr-xr-x | renrot | 80 |
1 files changed, 18 insertions, 62 deletions
@@ -1575,7 +1575,16 @@ sub rotateThumbnail { # usage() prints the instructions how to use the script # sub usage { - infomsg ( + # catch warnings if we have problems running perldoc + my $evalWarning; + local $SIG{'__WARN__'} = sub { $evalWarning = $_[0] }; + my $dummy = \*SAVEERR; # avoid "used only once" warning + unless ($^O eq 'os2') { + open SAVEERR, ">&STDERR"; + open STDERR, '>/dev/null'; + } + if (system('perldoc', $0)) { + infomsg ( "Usage: renrot <--extension EXTENSION> [--quiet] [--no-rotate] [--no-rename] [--name-template TPL] [--comment-file FILE] [--work-directory DIR] [[--] FILE1 FILE2 ...] @@ -1583,80 +1592,19 @@ sub usage { Options: -c, --config-file <FILE> configuration file to use -d, --work-directory <DIR> set working directory - --exclude <FILE> ... files exclude from processing; no wildcards - --sub-fileset <FILE> read names of the files to be processed from - FILE -e, --extension <EXTENSION> extension of files to process: JPG, jpeg, ... Renaming options: -n, --name-template <TPL> filename template (see manual for details) - --no-rename do not rename files (default is to rename) - --counter-fixed-field (*) set fixed field width for counter (used in - templates) - --counter-start <NUMBER> start value for the counter of renamed files - --counter-step <NUMBER> increment value for the counter of renamed - files Rotating options: -r, --rotate-angle <ANGLE> angle to rotate files and thumbnails by 90, 180, 270 --rotate-thumb <ANGLE> rotate only thumbnails by 90, 180, 270 - --only-orientation change Orientation tag (no real rotation) - --no-rotate do not rotate (default is to rotate) - --trim (*) pass -trim to jpegtran --mtime (*) set file mtime according to DateTimeOriginal tag -Keywordizing options: - --keywords (*) set Keywords tag - --keywords-replace (*) replace Keywords tag rather than add values to - it - -k, --keywords-file <FILE> read keywords from FILE - -Aggregating options: - --aggr-mode <MODE> run aggregation (MODE: none, delta, template) - --aggr-delta <INTERVAL> aggregation time delta - --aggr-directory <DIR> aggregation directory name - -a, --aggr-template <TPL> aggregation template (see manual for details) - --aggr-virtual (*) virtual aggregation (symlinks instead of files) - -Contact Sheet options (CS): - --cs (*) create the CS - --cs-tile <MxN> tile in montage - --cs-title set title of the montage - --cs-file <FILE> name of the montage files - --cs-dir <DIR> temporary montage DIR - --cs-thm montage files are thumbnails - --cs-bg <COLOR> background color (IM: -background) - --cs-bd <COLOR> border color (IM: -bordercolor) - --cs-mt <COLOR> frame color (IM: -mattecolor) - --cs-fn <STRING> text render font (IM: -font) - --cs-fl <COLOR> color to fill the text (IM: -fill) - --cs-lb <STRING> image label (IM: -label) - --cs-fr <NUMBER> thickness of border (IM: -frame) - --cs-pntsz <NUMBER> font point size (IM: -pointsize) - --cs-shadow set shadow (IM: -shadow) - --cs-thm-fl <STRING> generated thumbnail text fill color - --cs-thm-fn <STRING> generated thumbnail font - --cs-thm-grfr <COLOR> generated thumbnail background gradient - COLOR-from - --cs-thm-grto <COLOR> generated thumbnail background gradient - COLOR-to - --cs-thm-text <STRING> generated thumbnail text - --cs-rank to do CS ranking - --cs-rank-file <FILE> file with CS ranks - -Tag writing options: - --comment-file <FILE> file with text to put into Commentary tag - --user-comment <COMMENT> file with text to put into UserComment tag - -t, --tag <TAG> ... existing EXIF tag to set in renamed files - --no-tags do not write tags - -Colorizing options: - --use-color (*) colorized output - Misc options: - -g, --generate-thumb generation, writing or rewriting ThumbnailImage tag --dry-run do nothing, only print would have been done --use-ipc (*) rotate thumbnail via pipe, rather than via file -v increment debugging level by 1 @@ -1666,7 +1614,15 @@ Misc options: (*) The options marked with this sign do not take arguments and can be negated, i.e. prefixed by 'no'. E.g. '--mtime' sets file mtime value, while '--nomtime' or '--no-mtime' disables setting it. + +Consult the documentation for a full list of options. + "); + } + unless ($^O eq 'os2') { + close STDERR; + open STDERR, '>&SAVEERR'; + } } ######################################################################################## |