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 | |
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
-rwxr-xr-x | renrot | 78 |
1 files changed, 17 insertions, 61 deletions
@@ -1577,2 +1577,11 @@ sub rotateThumbnail { sub usage { + # 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 ( @@ -1585,5 +1594,2 @@ Options: -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, ... @@ -1592,8 +1598,2 @@ 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 @@ -1603,5 +1603,2 @@ Rotating options: --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 @@ -1609,52 +1606,3 @@ Rotating options: -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 @@ -1668,4 +1616,12 @@ 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'; + } +} |