1RENROT(1) User Contributed Perl Documentation RENROT(1)
2
3
4
6 renrot - rename and rotate images according EXIF data
7
9 renrot [OPTIONS] [[--] FILE1 FILE2 ...]
10
12 RenRot is intended to work with files of --extension extension, con‐
13 taining EXIF data and can do two things with them - rename and rotate.
14 It runs in batch mode in current or set with --work-directory direc‐
15 tory, as well as selective mode for separate files given as arguments
16 in command line.
17
18 RenRot renames files according the DateTimeOriginal and FileModifyDate
19 EXIF tags, if they exists. Otherwise, the name will be set according to
20 the current time stamp and will look as YYYYmmddHHMMSS.XXXX.ext, where
21 XXXX is whether file ID, if exists in EXIF (as for Canon) or incremen‐
22 tal suffix to the name YYYYmmddHHMMSS.
23
24 Additionally, it rotates files and their thumbnails, accordingly Orien‐
25 tation EXIF tag. When the tag is absent or miss set, the program allows
26 to rotate the file as well as it's thumbnail via --rotate-angle and
27 --rotate-thumb options. Now implemented only for JPEG format.
28
29 The script, also, can place the commentary into:
30
31 - Commentary tag from file (see --comment-file option)
32
33 - UserComment tag from configuration variable (see "TAGS" section)
34
35 Personal details could be specified via XMP tags defined in a configu‐
36 ration file, see "TAGS" section.
37
38 In addition, RenRot can aggregate all files in directories according
39 the given date/time pattern template, set with --aggr-template.
40
42 -c or --config-file FILE
43 path to the configuration file
44
45 -d or --work-directory DIR
46 define the working directory
47
48 --exclude FILE
49 specify files to exclude. No wildcards are available. For set of
50 files option must be occured same times as files given.
51
52 -e or --extension EXTENSION
53 extension of files to be processed, JPG, jpeg, CRW, crw, or any
54 other you need. The given extension is case-sensivity in related
55 filesystems.
56
57 -n or --name-template TEMPLATE
58 template, which is used for file name building while renaming. It
59 could be defined in configuration file (the variable Name Tem‐
60 plate). The default is %Y%m%d%H%M%S. For practical results see
61 "TEMPLATE EXAMPLES" section.
62
63 Interpreted sequences are:
64
65 %% a literal %
66
67 %C the numeric part of the original file name. Implemented
68 for the sake of the cameras, where no FileNumber EXIF tag is
69 present (currently all except Canon). Filename would started by
70 letters and ended by digits. No other symbols are not allowed,
71 except "-", "." and "_".
72
73 %c file order number in the processed file set (also see
74 --counter-fixed-field option)
75
76 %d day of the month (01-31)
77
78 %E ExposureTime tag value if defined
79
80 %e old file extension
81
82 %F FNumber tag value if defined
83
84 %H hour (00-23)
85
86 %I ISO tag value if defined
87
88 %i FileNumber tag if exists (otherwise, it'll be replaced by
89 string "NA")
90
91 %M minute (00-59)
92
93 %m month (01-12)
94
95 %n previous filename (the one before the current processing
96 with renrot)
97
98 %O base part of the original filename (see %o). In other
99 words the first part from the begin to the last dot symbol.
100
101 %o the name, file had before first processing with renrot. If
102 the file was processed with renrot if only once, the tag Ren‐
103 RotFileNameOriginal written with the file name.
104
105 %S second (00-59)
106
107 %W WhiteBalance tag value if defined
108
109 %Y year (1900, 1901, and so on)
110
111 %y last two digits of year (00..99)
112
113 --no-rename
114 no rename needed, default is to rename to the YYYYmmddHHMMSS.ext
115
116 --counter-fixed-field, --no-counter-fixed-field
117 set fixed length for file counter (corresponding to %c), where it
118 is used in templates. It's enabled by default. Use
119 --no-counter-fixed-field to set dynamic width of field.
120
121 --counter-start NUMBER
122 the number to start count the files, to be renamed, from (default
123 is 1)
124
125 --counter-step NUMBER
126 the step for the counter of the files to be renamed (default is 1)
127
128 -r or --rotate-angle ANGLE
129 define the angle to rotate file and the thumbnail on 90, 180 or
130 270. It's for the files where no Orientation tag is set right way.
131
132 --rotate-thumb ANGLE
133 rotate only thumbnail by 90, 180 or 270 degree. It's for the files
134 which were rotated, but thumbnail wasn't.
135
136 --only-orientation
137 rotate by changing Orientation tag, no real rotation will be made.
138 The sequence of values when rotating image from normal (0 degrees)
139 by 90cw is: 0 -> 90 -> 180 -> 270 -> 0. It means set Orientation
140 tag to 90cw after first usage of rotation by 90cw and so on. For
141 270cw rotation algorithm uses reversed sequence. Rotation by 180cw
142 triggers values in two pairs: 0 <-> 180 and 90 <-> 270. This option
143 can't be applied to mirror values of Orientation tag.
144
145 --trim, --no-trim
146 pass option "-trim" to jpegtran(1) to trim if needed. By default
147 trimming is on. Use --no-trim to negate described behaviour.
148
149 --no-rotate
150 no rotation needed, default is to rotate according EXIF data
151
152 --mtime, --no-mtime
153 defines, whether to set mtime of the file, using DateTimeOriginal
154 tag value. Use --no-mtime to set it to current time stamp after
155 processing.
156
157 --keywordize, --no-keywordize
158 whether to keywordize. Default is to not. Be careful, since this
159 option when on, rewrites existing keywords, not adds. The keywords
160 are taken from .keywords file or file specified with option --key‐
161 words-file.
162
163 -k or --keywords-file FILE
164 path to the file with keywords (format is each keyword per line).
165 The CR and LF symbols are removed. The empty (only whitespace)
166 lines are skiped. The lead and tail whitespaces are also removed.
167 For example, line " _Test_ CRLF" will be transformed to "_Test_".
168
169 --keywords-replace, --no-keywords-replace
170 Replace existing tag Keywords list rather than add the values to
171 it. Default is to not replace.
172
173 --aggr-mode MODE
174 run aggregation process in given MODE. Possible values are: none,
175 delta or template.
176
177 --aggr-delta NUMBER
178 aggregation time delta in seconds (file with DateTimeOriginal and
179 the one of the previous file delta, greater than --aggr-delta is
180 placed to the --aggr-directory followed by directory name counter).
181
182 --aggr-directory DIR
183 counterless aggregation directory name (default is Images)
184
185 -a or --aggr-template TEMPLATE
186 template, which is used for file aggregation. Aggregation fulfils
187 according date/time patterns. You may use combination of %d, %H,
188 %M, %m, %S, %Y, and/or %y keys. It could be defined in configura‐
189 tion file (the variable Aggregation Template). The default is
190 %Y%m%d. For detailed description, please, turn to --name-template
191 option. For practical results see "TEMPLATE EXAMPLES" section.
192
193 --aggr-virtual, --no-aggr-virtual
194 defines virtualization for existent aggregation modes. If set, than
195 results of the aggregation are placed into the directory defined
196 with command line option --aggr-virtual-directory or configuration
197 file option aggregation virtual directory and further occures the
198 things, which have to occure with the choosen aggregation mode but
199 without this option. The difference is that the files to be aggre‐
200 gated are remains untouched in their places, and symlinks are
201 placed to the directory tree created instead. Use --no-aggr-virtual
202 to prevent virtualization.
203
204 --aggr-virtual-directory DIR
205 defines the directory, the results of the virtual aggregation to be
206 placed to
207
208 --comment-file FILE
209 file with commentary. The low priority alias to TagFile = Comment:
210 FILE.
211
212 --user-comment STRING
213 low priority alias to --tag UserComment: STRING
214
215 -t or --tag TAG
216 look "TAGS" section for the detailed description
217
218 --no-tags
219 no tags will be written. Default is to write tags.
220
221 --use-color, --no-use-color
222 colorized output. This NOT works under Win32.
223
224 --dry-run
225 show what would have been happened (no real actions)
226
227 --use-ipc, --no-use-ipc
228 thumbnail rotation via pipe, rather than via file. This NOT works
229 under Win32.
230
231 -v one or more "-v" sets debug level. From 1 to 4 - internal levels, 5
232 till 9 - equal to 1-5 levels for ExifTool plus maximum verbosity
233 for renrot.
234
235 -? or --help
236 display quick help and exit
237
238 --version
239 output version information and exit
240
242 The name template "01.%c.%Y%m%d%H%M%S.%i.%E%F%W%I" may produces follow‐
243 ing names:
244
245 01.0021.20030414103656.NA.E1by40F2.8WAutoI160.jpg
246
247 01.0024.20040131230857.100-0078.E1by320F2.8WAutoI50.jpg
248
249 01.0022.20000820222108.NA.jpg
250
251 where F stays for FNumber, E for ExposureTime, I for ISO and W for
252 WhiteBalance.
253
254 The aggregation template "%Y%m%d" produces following aggregation:
255
256 these three files
257
258 01.11.20030414103656.NA.jpg
259
260 01.12.20030414103813.NA.jpg
261
262 01.13.20030414103959.NA.jpg
263
264 will be put to the directory 20030414, and
265
266 01.14.20040131130857.100-0078.jpg
267
268 01.15.20040131131857.100-0079.jpg
269
270 01.16.20040131133019.100-0080.jpg
271
272 01.17.20040131135857.100-0083.jpg
273
274 will be put to the directory 20040131.
275
277 Configuration file could be used to set some variables. Configuration
278 file is just set of case-insensivity keys and its values separated by
279 equal sign. Boolean variables can be defined via following keywords:
280 0, No, False, Off for false, and 1, Yes, True, On for true. RenRot
281 looks for file named renrot.conf in system directories such as
282 /etc/renrot and /usr/local/etc/renrot, and in home directory of the
283 user in subdirectory .renrot. User defined configuration file can be
284 given via --config-file option. In the last case the given file is used
285 only.
286
287 These variables could be set via configuration file:
288
289 mtime
290 set to "Yes" for synchronize mtime with tags, otherwise set it to
291 "No"
292
293 name template
294 name template, which defines the file name look (see --name-tem‐
295 plate)
296
297 trim
298 set to "Yes" to trim rotated images when using jpegtran(1)
299
300 aggregation mode
301 aggregation mode, possible values are: none, delta or template
302
303 aggregation template
304 aggregation template, which defines the file aggregation (see
305 --aggr-template)
306
307 aggregation virtual
308 defines virtualization for existent aggregation modes (see
309 --aggr-virtual option)
310
311 aggregation virtual directory
312 defines the directory for virtual aggregation (see --aggr-vir‐
313 tual-directory option>
314
315 Tag, TagFile
316 look "TAGS" section for the detailed description
317
318 include
319 defines the file that would be included in place as part of config‐
320 uration
321
323 TAG is defined by the next combination: TagName [Group]: 'value'.
324
325 Using command line option --tag and/or configuration file options Tag
326 it's possible to choose defined tags to be set and writen to the EXIF
327 tree.
328
329 The syntax of the command line option --tag:
330
331 --tag TagName [Group]: 'value'
332
333 The syntax of the configuration file option Tag:
334
335 Tag = TagName [Group]: 'value'
336
337 Parameters TagName and Group are passed to ExifTool as is. Name of the
338 group have to be enclosed in square brackets. The value (after semi‐
339 colon) of the tag could be enclosed in tics.
340
341 Also the option TagFile was defined to give posibility to fill value of
342 some tags with multi line content from the file. The syntax as follows:
343
344 TagFile = TagName [Group]: FILE
345
346 Bellow are the tags to make sense to use with the options --tag and
347 Tag:
348
349 Copyright
350 copyright notes
351
352 Comment
353 general commentary
354
355 UserComment
356 anything you'd wanna put as commentary
357
358 CreatorContactInfoCiAdrCity
359 city tag
360
361 CreatorContactInfoCiAdrCtry
362 country tag
363
364 CreatorContactInfoCiAdrExtadr
365 extended address (usually street and apartments)
366
367 CreatorContactInfoCiAdrPcode
368 zip code
369
370 CreatorContactInfoCiAdrRegion
371 region
372
373 CreatorContactInfoCiEmailWork
374 email
375
376 CreatorContactInfoCiTelWork
377 phone
378
379 CreatorContactInfoCiUrlWork
380 URL
381
382 Additionally you can add any known tag here to be passed by Tag or Tag‐
383 File options in the format described above.
384
386 Configuration file placement (with high priority first):
387
388 ~/.renrot/renrot.conf
389 /usr/local/etc/renrot/renrot.conf
390 /etc/renrot/renrot.conf
391
393 If you found some bug or have nice proposition, you are welcome. Addi‐
394 tionally, please, read RESTRICTIONS section in README.
395
396 It seems that for Perl v.5.8.7 and 5.8.8, at least on FreeBSD 6 the
397 bug, which cause crash of the renrot, exists.
398
399 In case when total amount of the files size to process is bigger than
400 RAM amount, the renrot falls with error:
401
402 Out of memory during "large" request for XXXX bytes ...
403
404 This doesn't occure for Perl v.5.6.1.
405
407 Copyright 2005-2006, Zeus Panchenko, Andy Shevchenko.
408
409 This library is free software; you can redistribute it and/or modify it
410 under the same terms as Perl itself.
411
413 Image::ExifTool(3pm),exiftool(1),jpegtran(1)
414
415
416
417perl v5.8.8 2006-10-06 RENROT(1)