versioning expressions

Started by gkknipp, January 10, 2018, 05:27:39 AM

Previous topic - Next topic

gkknipp

Hello,
I am trying to set up versioning for TIF files and their derivatives that are created from scans of old slides and negatives.

I thought I might have to just use manual versioning but thought I'd at least ask the question before I resign myself to that.

The master files and versions are always TIF files only.

The file names are the same EXCEPT for one character that is always the 15th character of the file name (the original unedited scanned file uses "A" for Archive, and the derivative edited version uses "M" for Master, and there could occasionally be some other character used in special cases for other copies).

The file names are up to 25 characters long.

I have not been able to figure out a way to handle that with the perl expressions (I'm definitely a novice with this stuff).  Or do I have to change my naming convention to make this work.?

Thanks for any help you can provide.


Aubrey

Would you give us an example of 2 filenames you would like to version
Thanks
Aubrey

Erik

I second the request for example file names.  If anyone can help, they'll want to test it in IMatch.

However, I will say up front, that I would expect it to be doable but tricky. 

Things to consider are how unique are your file names in different portions of your file name.

It sounds like you have something like this:

{stuff 1}A{stuff 2}.TIF
{stuff 1}M{stuff 2}.TIF

Of course we don't know exactly what your file names look like, but the above is what I got from your first post.

So, would the part in {stuff 1} be unique enough that it wouldn't matter what {stuff 2} is (in the same folder even)?  Or do you need {stuff 1} and {stuff 2} to define the image (noting that the A or M or other distinguish versions)?


Aside from those considerations, it is generally easier (to set up), if your file names are more in a line of

{stuff}A.TIF or {stuff}M.TIF

But, no matter the situation, once you overcome the challenge for setup, you'll be good to go.  While you may have a complicated setup, you only have to do it once (or get it right once).  Just make sure you back up whatever the settings are.

Aubrey

Stuff1_A_stuff2
Etc is relatively easy
This why I asked about an example

gkknipp

An example would be the following:

the master copy in Imatch versioning:
   19380622BER001A_abcdefghi.TIF

the derivative copy in Imatch versioning:
  19380622BER001M_abcdefghi.TIF

As you can see, the only difference is in position 15.

Thanks.

Aubrey

#5
OK this should work given your explanation:
(14characters)A_(9characters).tif

The replacement expression is easy for the comparison. Once one has defined the master (the difficult part) then the replacement expression is used get the master "looking like" the version.

See screen dump below:

Master expression:
^[0-9|a-z]{14}A_*[0-9|a-z]{9}\.(tif)$           (screen dump in jpg is slightly different it does not take into account possibility of numbers, this is more general)
Replacement expression:
^_*//A_/M_/
Link expression:
^(_*{name})[+\-_]*[0-9|a-z]*\.(nef|nrw|jpg|jpeg|psd|tif|tiff|cr2|dng)$  (you may not need all the extensions here)

Best wishes,
Aubrey.

Update:
If you want to have:
(14characters)A_(any number of characters).tif
then change master expression to:
^[0-9|a-z]{14}A_.*\.(tif)$

You can do almost anything with IMatch... try this with other DAMS..... it probably won't work!  ;)

Jingo

Hmm... this brings up another idea for an APP (or even better - an IMatch Versioning Wizard).  Drag/drop images from your DB that you wish to version into an app window and based on the filenames, the app would determine all the perl syntax needed to make the version happen.  Not sure how easy that logic would be... but it would work kinda like RegexMagic.

Mario

My guess is that the majority of users gets by with:

Master: \.(raw)$
Version: {name}\.(jpg|tif)$

;D
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

gkknipp

I tested Aubrey's solution and it works! 

Thanks very much to Aubry and other responders for your help.

Very impressed with the Community and Imatch!

Best Regards,
Greg Knipp

Arthur

Quote from: Mario on January 11, 2018, 01:42:40 PM
My guess is that the majority of users gets by with:

Master: \.(raw)$
Version: {name}\.(jpg|tif)$

;D

Yes, I guess at least 90% of the consumer users. Maybe appending a virtual copy number or other small suffix behind that. Everything else is excessive.