diff options
-rwxr-xr-x | renrot | 398 |
1 files changed, 217 insertions, 181 deletions
@@ -371,29 +371,35 @@ sub getOptions { | |||
371 | "keywords-file|k=s" => \$h_kw_opts{'file'}, | 371 | "keywords-file|k=s" => \$h_kw_opts{'file'}, |
372 | "keywords-replace!" => \$h_kw_opts{'replace'}, | 372 | "keywords-replace!" => \$h_kw_opts{'replace'}, |
373 | 373 | ||
374 | # OTHERS | 374 | # RENAMIMG |
375 | "backup!" => \$backup, | ||
376 | "comment-file=s" => \$comfile, | ||
377 | "config-file|c=s" => \$configFile, | ||
378 | "counter-fixed-field!" => \$countFF, | 375 | "counter-fixed-field!" => \$countFF, |
379 | "counter-start=i" => \$countStart, | 376 | "counter-start=i" => \$countStart, |
380 | "counter-step=i" => \$countStep, | 377 | "counter-step=i" => \$countStep, |
378 | "no-rename|norename" => \$noRename, | ||
379 | |||
380 | # ROTATIMG | ||
381 | "no-rotate|norotate" => \$noRotation, | ||
382 | "only-orientation" => \$orientTag, | ||
383 | "rotate-angle|r=i" => \$rotateAngle, | ||
384 | "rotate-thumb=i" => \$rotateThumbnail, | ||
385 | |||
386 | # TAG WRITER | ||
387 | "comment-file=s" => \$comfile, | ||
388 | "no-tags|notags" => \$noTags, | ||
389 | "tag|t=s" => \@tmpTags, | ||
390 | "user-comment=s" => \$userComment, | ||
391 | |||
392 | # OTHERS | ||
393 | "backup!" => \$backup, | ||
394 | "config-file|c=s" => \$configFile, | ||
381 | "dry-run" => \$dryRun, | 395 | "dry-run" => \$dryRun, |
382 | "exclude=s" => \@excludeList, | 396 | "exclude=s" => \@excludeList, |
383 | "extension|e=s" => \$extToProcess, | 397 | "extension|e=s" => \$extToProcess, |
384 | "generate-thumb|g" => \$gen_thm, | 398 | "generate-thumb|g" => \$gen_thm, |
385 | "help|?" => sub { usage(0, 2) }, | 399 | "help|?" => sub { usage(0, 2) }, |
386 | "no-rename|norename" => \$noRename, | ||
387 | "no-rotate|norotate" => \$noRotation, | ||
388 | "no-tags|notags" => \$noTags, | ||
389 | "no-renrot|nochg" => \$noRenRoTagMtm, | 400 | "no-renrot|nochg" => \$noRenRoTagMtm, |
390 | "only-orientation" => \$orientTag, | ||
391 | "quiet|q" => \$quiet, | 401 | "quiet|q" => \$quiet, |
392 | "rotate-angle|r=i" => \$rotateAngle, | ||
393 | "rotate-thumb=i" => \$rotateThumbnail, | ||
394 | "sub-fileset=s" => \$subFileSet, | 402 | "sub-fileset=s" => \$subFileSet, |
395 | "tag|t=s" => \@tmpTags, | ||
396 | "user-comment=s" => \$userComment, | ||
397 | "v+" => \$verbose, | 403 | "v+" => \$verbose, |
398 | "version" => sub { usage(0, 0) }, | 404 | "version" => sub { usage(0, 0) }, |
399 | "work-directory|d=s" => \$workDir, | 405 | "work-directory|d=s" => \$workDir, |
@@ -1946,148 +1952,53 @@ Process the files with given I<EXTENSION> (JPG, jpeg, CRW, crw, etc). | |||
1946 | Depending on the operating system, the extension search might or might not be | 1952 | Depending on the operating system, the extension search might or might not be |
1947 | case-sensitive. | 1953 | case-sensitive. |
1948 | 1954 | ||
1949 | =item B<-n> or B<--name-template> I<TEMPLATE> | 1955 | =item B<--mtime>, B<--no-mtime> |
1950 | |||
1951 | A template to use for creating new file names while renaming. It can also be | ||
1952 | defined in the configuration file (variable Name Template). The default is | ||
1953 | I<%Y%m%d%H%M%S>. For practical uses, see L</TEMPLATE EXAMPLES> section. | ||
1954 | |||
1955 | Interpreted sequences are: | ||
1956 | |||
1957 | =over | ||
1958 | |||
1959 | B<%%> a literal % | ||
1960 | |||
1961 | B<%#> a literal # | ||
1962 | |||
1963 | B<%C> Numeric part of the original file name. Implemented for the sake | ||
1964 | of cameras, that do not supply FileNumber EXIF tag (currently all makes, | ||
1965 | except I<Canon>). Such cameras generate file names starting with letters | ||
1966 | and ended with digits. No other symbols are allowed in file names, except | ||
1967 | C<->, C<.> and C<_>. | ||
1968 | |||
1969 | B<%c> Ordinal number of file in the processed file set (see also | ||
1970 | B<--counter-fixed-field> option). | ||
1971 | |||
1972 | B<%d> Day of month (01-31). | ||
1973 | 1956 | ||
1974 | B<%E> The value of ExposureTime tag, if defined. | 1957 | Defines whether to set the file's mtime, using DateTimeOriginal tag value. |
1958 | Use B<--no-mtime> to set it to current time stamp after processing. | ||
1975 | 1959 | ||
1976 | B<%e> Old file extension | 1960 | =item B<--no-renrot> or B<--nochg> |
1977 | 1961 | ||
1978 | B<%F> The value of FNumber tag, if defined. | 1962 | Do not rename, rotate, tag and mtime images. It saves files from any changes |
1963 | while allows to do aggregation, contact sheet generation e.t.c. | ||
1979 | 1964 | ||
1980 | B<%H> Hour (00-23). | 1965 | =item B<--use-color>, B<--no-use-color> |
1981 | 1966 | ||
1982 | B<%I> The value of ISO tag, if defined. | 1967 | Colorize output. This does NOT work under Windows. |
1983 | 1968 | ||
1984 | B<%i> FileNumber tag if exists (otherwise, it is replaced by string | 1969 | =item B<--dry-run> |
1985 | C<NA>). | ||
1986 | 1970 | ||
1987 | B<%M> Minute (00-59). | 1971 | Do not do anything, only print would have been done. |
1988 | 1972 | ||
1989 | B<%m> Month (01-12). | 1973 | =item B<-g> or B<--generate-thumb> |
1990 | 1974 | ||
1991 | B<%n> Previous filename (the one before B<renrot> started processing). | 1975 | Generation and writing ThumbnailImage tag. The original value of the ThumbnailImage |
1976 | tag remains intact. To rewrite it you need to delete it first (look exiftool examples). | ||
1992 | 1977 | ||
1993 | B<%O> Base part of the original filename (see B<%o>). In other words, the | 1978 | =item B<--use-ipc>, B<--no-use-ipc> |
1994 | first part from the beginning to the last dot character. | ||
1995 | 1979 | ||
1996 | B<%o> The name file had before it was processed by B<renrot> for the first | 1980 | Rotate thumbnails using pipe, rather than files. This does NOT work under |
1997 | time. If the file was processed only once, the tag RenRotFileNameOriginal is | 1981 | Windows. |
1998 | set to the original file name. | ||
1999 | 1982 | ||
2000 | B<%S> Second (00-59) | 1983 | =item B<-v> |
2001 | 1984 | ||
2002 | B<%W> The value of WhiteBalance tag, if defined. | 1985 | Increase debugging level by 1. Debugging levels from 1 to 4 are internal |
1986 | levels, the levels from 5 till 9 are equivalent to levels 1-5 levels ExifTool | ||
1987 | with the maximum verbosity for B<renrot>. | ||
2003 | 1988 | ||
2004 | B<%Y> Year with the century (1900, 1901, and so on) | 1989 | =item B<-?> or B<--help> |
2005 | 1990 | ||
2006 | B<%y> Year without a century (00..99) | 1991 | Display short usage summary and exit. |
2007 | 1992 | ||
2008 | You can use value of any EXIF tag to be included as name part. To do that you | 1993 | =item B<--version> |
2009 | need to embrace tag name with sign B<"#">, while building name template | ||
2010 | (see L</TEMPLATE EXAMPLES>). | ||
2011 | 1994 | ||
2012 | Be careful, since any binary EXIF (like ThumbnaiImage) can produce totally | 1995 | Output version information and exit. |
2013 | unexpected results. | ||
2014 | 1996 | ||
2015 | =back | 1997 | =back |
2016 | 1998 | ||
2017 | =item B<--no-rename> | 1999 | =head1 B<AGGREGATION> |
2018 | |||
2019 | Do not rename files (default is to rename them to YYYYmmddHHMMSS.ext) | ||
2020 | |||
2021 | =item B<--counter-fixed-field>, B<--no-counter-fixed-field> | ||
2022 | |||
2023 | Set fixed length for file counter, used in file name templates (see B<%c>). | ||
2024 | It is enabled by default. Use B<--no-counter-fixed-field> to undo its effect. | ||
2025 | |||
2026 | =item B<--counter-start> I<NUMBER> | ||
2027 | |||
2028 | Initial value for the file counter (default is I<1>) | ||
2029 | |||
2030 | =item B<--counter-step> I<NUMBER> | ||
2031 | |||
2032 | Step to increment file counter with (default is I<1>) | ||
2033 | |||
2034 | =item B<-r> or B<--rotate-angle> I<ANGLE> | ||
2035 | |||
2036 | Define the angle to rotate files and thumbnails. Allowed values for I<ANGLE> | ||
2037 | are 90, 180 or 270. It is useful for files not having Orientation tag. | ||
2038 | |||
2039 | =item B<--rotate-thumb> I<ANGLE> | ||
2040 | |||
2041 | Rotate only thumbnails. Allowed values for I<ANGLE> are 90, 180 or 270 degrees. | ||
2042 | Use if the files which were already rotated, but their thumbnails were not. | ||
2043 | |||
2044 | =item B<--only-orientation> | ||
2045 | |||
2046 | Rotate by changing the value of Orientation tag, no real rotation will be | ||
2047 | made. The sequence of values to rotate an image from normal (0 degrees) by | ||
2048 | 90 degrees clockwise is: 0 -> 90 -> 180 -> 270 -> 0. It means. set Orientation | ||
2049 | tag to 90cw after the first rotation, and increase that value by 90 each time | ||
2050 | the rotation is applied. For 270cw the rotation algorithm uses the reverted | ||
2051 | sequence. Rotation by 180cw triggers values in two pairs: 0 <-> 180 | ||
2052 | and 90 <-> 270. This option cannot be applied to mirror values of Orientation | ||
2053 | tag. | ||
2054 | |||
2055 | =item B<--trim>, B<--no-trim> | ||
2056 | |||
2057 | Pass the C<-trim> option to L<jpegtran(1)>, to trim if needed. By default, | ||
2058 | trimming is enabled. Use B<--no-trim> to disable it. | ||
2059 | |||
2060 | =item B<--no-rotate> | ||
2061 | |||
2062 | Do not rotate images (default is to rotate according to EXIF data). | ||
2063 | |||
2064 | =item B<--mtime>, B<--no-mtime> | ||
2065 | 2000 | ||
2066 | Defines whether to set the file's mtime, using DateTimeOriginal tag value. | 2001 | =over |
2067 | Use B<--no-mtime> to set it to current time stamp after processing. | ||
2068 | |||
2069 | =item B<--no-renrot> or B<--nochg> | ||
2070 | |||
2071 | Do not rename, rotate, tag and mtime images. It saves files from any changes | ||
2072 | while allows to do aggregation, contact sheet generation e.t.c. | ||
2073 | |||
2074 | =item B<--keywords>, B<--no-keywords> | ||
2075 | |||
2076 | Whether to fill Keywords tag. Default is to not. Be careful, since with this option | ||
2077 | enabled, the existing keywords are rewriten. The keywords are taken from | ||
2078 | F<.keywords> file or file specified with option B<--keywords-file>. | ||
2079 | |||
2080 | =item B<-k> or B<--keywords-file> F<FILE> | ||
2081 | |||
2082 | Path to the file with keywords. Its format is a keyword per line. The CR and | ||
2083 | LF symbols are removed. Empty (only whitespace) lines are ignored. Any leading | ||
2084 | and trailing whitespace is removed. For example, the line C< _Test_ CRLF> is | ||
2085 | read as C<_Test_>. | ||
2086 | |||
2087 | =item B<--keywords-replace>, B<--no-keywords-replace> | ||
2088 | |||
2089 | Replace existing Keywords tag list rather than add new values to it. Default | ||
2090 | is not to replace. | ||
2091 | 2002 | ||
2092 | =item B<--aggr-mode> I<MODE> | 2003 | =item B<--ag |