Exif and IF THEN Regular expression : Possible ?

Advanced Renamer forum
#1 : 17/01-17 19:37
Rollo
Rollo
Posts: 2
Hi,

I want to make a regular expression like "If the exif <ExifTool:ShutterType> is Electronic, add ES to the filename".

I know it is possible via script, but I don't know how, and I suspect a simple regex can do the job.

Thanks by advance for any help.


17/01-17 19:37
#2 : 17/01-17 23:32
G. Lambany
G. Lambany
Posts: 187
Reply to #1:
Humm.. shutter type seems like a pretty exotic tag, specific to each manufacturers, in the makernotes section of exiftool

could you share two pictures (just test images, no need to capture anything) with the two different shutter types selected, so I could see what is actually accessible from exiftool / AR:ExifTool tag?

cheers


17/01-17 23:32
#3 : 18/01-17 14:05
Rollo
Rollo
Posts: 2
Reply to #2:

All makernotes I need and use work fine with exiftool.

In fact, for the shutter type, I use a 'work around' in Advancerenamer. I add the ExifTool:ShutterType in the filename and then replace the two possible result, Electronic by {ES} and Mechanical by {MS}. So it takes three rules, and the job is done.

BUT, Where I really could use something more subtil, is for the ExifTool:PhotoStyle. I want only add {B&W} when the PhotoStyle is 'Monochrome'. (Because I shoot raw, and Lightroom can't tell the photostyle, because It doesn't know makernotes, sadly)

Of course I can do the same thing as the ShutterStyle, but I have to make a rule for each possible PhotoStyle, and I know there is a way to make a if/then regular expression, I am familiar with regular expression batch renaming, I just don't understand how the if/then works

As for the script, I just don't know java scripting, but I recon that must be pretty straightforward for the one who knows.

Thank you for your time !


18/01-17 14:05
#4 : 18/01-17 19:05
G. Lambany
G. Lambany
Posts: 187
Reply to #3:
Yeah, ok, but if you want me to code some javascript, to be able to do this in one rule, I would need some test files. Again, no need to shoot anything, just a black picture is just fine, but at least two pictures with the different shutter types and two different photostyles in the actual exif of the photos, plus a list of all the possible photostyles for me to code and test the script..

if I don't have any test files, I could still try something, but I would be working in the dark, pretty much

cheers


18/01-17 19:05