1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
WHAT IS IT?
RenRot is a program to rename and lossless rotate for JPEG format files,
according to their EXIF tags.
For prevent incorrect associations some explanations are needed here. The name
of project is short form of 'REName and ROTate' and no other interpretation
will be used.
Renrot is intended to work only in current directory with all files of the
extension, specified after --ext. You can change the behaviour by specifying
--work-directory option.
New template ideology was implemented. It includes flexibility in file name
construction. In version 0.16 and later the previous behaviour still present
with default NameTemplate. The template can contain different data, from
direct name to EXIF data (the date, id or shooting details such as
WhiteBalance, ISO e.t.c.). For further information, please, see applied
manual.
Renrot rotates file and its thumbnail, according to EXIF tag Orientation. If
the tag is absent or miss set, than the script allows to rotate the file as
well as it's thumbnail "by hands".
Furthermore, the script can put a comment to:
- Comment tag if comment file provided with --comment-file option
- UserComment tag if $COMMENTARY variable set in configuration file
Personal data could be specified via XMP tags defined in configuration file.
In addition renrot can aggregate all files in directories according the given
date/time pattern template, set with --aggr-template.
WHY RenRot?
Several projects like RenRot are available in the net, but why to choose
namely RenRot? Because:
- it does just what it would do - renames and rotates, nothing more than
that;
- it is pure CLI with all it's advantage (no need KDE or any other monster
to run);
- it uses Image::ExifTool (the best open tool to work with EXIF data) and
libjpeg6 (the best open tool to operate JPEG format files, to correctly
rotate both, the very file and the thumbnail inside it);
- it has very much flex file naming template engine;
- it has very much flex file aggregation template engine;
- it works in batch mode.
GETTING
RenRot home page is an ftp site for now. You can download script package from
the following sites:
ftp://ftp.dn.farlep.net/pub/misc/renrot/ (home)
ftp://andriy.asplinux.com.ua/pub/people/andy/renrot/ (mirror)
ftp://ftp.asplinux.ru/ (looking for renrot package in RPM)
RUNNING
After installation process was done renrot is being running by typing
its name in console as usual. The next several examples provide general
applications of the script:
rename each file according to the given template
renrot --name-template="01.%c.%Y%m%d%H%M%S.%i.%E%F%W%I" --ext JPG
rename each file according to the given template and files aggregation
according the date
renrot --name-template="%y%m%d%H%M%S.%i" --aggr-template "%Y%m%d" --ext JPG
rotate each file and their thumbnail by 90CW in specified directory
renrot --rotate 90 --ext '*.jpg' --work-directory="/tmp/images"
rotate thumbnails, included to EXIF, for each file by 90CCW
renrot --rotate-thumb 270 --ext jpg
fix file mtime according to its EXIF tags or current time stamp, when tags
are invalid
renrot --no-rotate --no-rename --ext '*.jpeg' --mtime
RESTRICTIONS
RenRot has some restrictions at runtime. First off, script handles a
whole directory without recursion and only with one extension of files.
Second, algorithm treat each file with given extension as the image.
Otherwise, file will be renamed to the current time stamp when --no-rename
option is omitted.
DEBUGGING
For advanced users and developers renrot provides debug interface. Amount of
-v options in a command line defines level of verbosity. So script differs the
nine levels of debugging such as:
from 1 till 4 - internal levels
from 5 till 9 - equal to 1-5 levels for ExifTool plus maximum verbosity for
renrot
INSTALLATION
You can install renrot to make it available for use by other users by
typing the following:
perl Makefile.PL PREFIX=/usr/local
make
make install PREFIX=/usr/local
Notes:
i) You need root access for the last step above.
ii) Some Perl installations (like the standard OSX installation) may not
contain the necessary files to complete the first step above. But no
worries: You can install script manually by moving 'renrot' to any
directory in your current PATH.
iii) You may choose any desired PREFIX by changing /usr/local at above
sample.
DEPENDENCIES
Requires Perl version 5.6.0 or later. No other special libraries are required,
except:
Image::ExifTool http://www.sno.phy.queensu.ca/~phil/exiftool/
Getopt::Long cpan:Getopt::Long (usually, included in perl
distribution)
jpegtran (libjpeg6) http://www.ijg.org/
LICENSING
Renrot is an Open Source project distributed under GPL or Artistic
license.
THANKS
Phil Harvey (http://www.sno.phy.queensu.ca/~phil/exiftool/)
for his valued comments and suggestions.
ASPLinux company (http://www.asplinux.ru) has included renrot to
their distribution.
Alex Zasypkin for his help with documentation writing.
ARE YOU WANT SOMETHING TO SAY?
If you have notes, propositions, found bugs or something else do not hesitate
to contact us!
|