Versioning help

Started by ianrr, September 04, 2013, 02:38:56 PM

Previous topic - Next topic

ianrr

[I split this topic from Hans Evert's original topic as this is in fact a new discussion.
Herman]



I have tried the extra brackets cover files Fred-WXYX.nef but files like Fred-xyz-1.jpg, Fred-xyz WEB.jpg, Fred-xyz-BW-02.jpg do not link  ...

Link Expression as modified "  ^(_*{name})([+\-_]*[0-9|a-z])*\.(jpg|jpeg|dng|nef\.dxo|nef\.bib)$    "

What am I doing wrong here ?

ChrisMatch

#1
Quote from: ianrr on September 04, 2013, 02:38:56 PM
I have tried the extra brackets cover files Fred-WXYX.nef but files like Fred-xyz-1.jpg, Fred-xyz WEB.jpg, Fred-xyz-BW-02.jpg do not link  ...

Link Expression as modified "  ^(_*{name})([+\-_]*[0-9|a-z])*\.(jpg|jpeg|dng|nef\.dxo|nef\.bib)$    "

What am I doing wrong here ?
Hi ianrr

So your master looks like Fred-WXYX.nef  but the part 'WXYX' is not part of the name of the versions?
Could you give a real live example of the names?

ianrr

Real names  ... These do not show up as Versions   .. Kumo-7002192- (1) .jpg  Kumo-7002192- (2) .jpg
but these do   Kumo-7002192- (CM) .jpg   Kumo-7002192-.jpg

ianrr

Hi Chrismatch,

forgot to mention that these results are from not adding extra brackets, and that the (1)  (2) would have been produced by C1 or other program when I send  another output of the same file.

ChrisMatch

#4
Quote from: ianrr on September 04, 2013, 03:17:43 PM
Real names  ... These do not show up as Versions   .. Kumo-7002192- (1) .jpg  Kumo-7002192- (2) .jpg
but these do   Kumo-7002192- (CM) .jpg   Kumo-7002192-.jpg
2 additional questions:
- can you please also post the real name of the master?
- the part that gets added for the version contains space, hyphen and brace
   (I'm asking because these characters are not covered by the regular expression you use)

If the master file is: Kumo-7002192.nef
and the regex is ^(_*Kumo-7002192)([+\-_]*[0-9|a-z])*\.(jpg|jpeg|dng|nef\.dxo|nef\.bib)$

then I get a match for Kumo-7002192.jpg
but not for Kumo-7002192-.jpg  !?

ianrr

Master is  Kumo-7002192.NEF, and indeed the versioning does work if the file name is identical. I have something weird going on as I have for example one file that has the - added to the end, it shows up as a version, but I cannot remove the version link  .... will play some more with another directory, but ideally want to match up the files with some extra data after the file name  ...   ie  Kumo-7002192-BW.jpg.

Thanks for looking into it, will crash/sleep now and start again tomorrow.

Ianrr

   

cytochrome

#6
This was already proposed by ChrisMatch in the link I give some posts prior to this one.

And yes, surprisingly, Kumo-7002192-.jpg is not accepted!! But this one works:
^(_*{name}.)([+\-_]*[0-9|a-z])*\.(jpg|jpeg|psd|tif|tiff|dng)$  seems idiotic to me but heureux les simples d'esprit.

Notice the dot after {name}. {name}- also works...

Francis

[attachment deleted by admin]

ChrisMatch

#7
Quote from: ianrr on September 04, 2013, 04:10:32 PM
Master is  Kumo-7002192.NEF, and indeed the versioning does work if the file name is identical. I have something weird going on as I have for example one file that has the - added to the end, it shows up as a version, but I cannot remove the version link  .... will play some more with another directory, but ideally want to match up the files with some extra data after the file name  ...   ie  Kumo-7002192-BW.jpg.

Thanks for looking into it, will crash/sleep now and start again tomorrow.

Ianrr   

I can make some suggestions...

If you want to match nearly every version that looks like the original filename but has some appended characters you could use:
^(_*{name}).*\.(jpg|jpeg|dng|nef\.dxo|nef\.bib)$
The problem is that this expression may match too many files (even those that you don't consider as a version).

If you want to be more restrict you must know which characters are used, especially which special ones like braces, underscore and so on.
So you could use something like:
^(_*{name})[a-z0-9\-\(\)_]*\.(jpg|jpeg|dng|nef\.dxo|nef\.bib)$
Both expressions should match a version like: Kumo-7002192-BW_01-(2).jpg

herman

#8
When I analyze your version names correctly I think this is what it boils down to:

Master Kumo-7002192.NEF

Versions may be either of the following
Kumo-7002192- (1) .jpg 
Kumo-7002192- (2) .jpg
Kumo-7002192- (CM) .jpg
Kumo-7002192-.jpg

The "logic" for the versions seems to be
filename followed by (one – (hyphen)) followed by one space followed by an optional (pair of brackets containing (one digit OR two letters)) followed by a space followed by the extension.

Which translates to

^{name}- (\(([0-9|a-z])+\))* .(jpg)$

See attached screenshot, just tested it and it seems to work for all cases described above.

Hope this helps.

[edit]
On reviewing this once more I noticed that everything following the hyphen seems to be optional.
In that case the expression becomes

^{name}-( \(([0-9|a-z])+\) )?.(jpg)$

I hope this covers it....
[/edit]

[attachment deleted by admin]
Enjoy!

Herman.

ianrr

Thank you guys for the info very much.
I have narrowed down the " - " at the end of my files. Its the default in capture one OUTPUT NAMING  [Image Name]-[Sub Name]  ... If one adds a sub name in the PROCESS RECIPE then it makes sense, otherwise all processed files end up with the " - " only appended to them.  With that out of the way, back to trying your  very helpful suggestions  ...   8)

Will play today and  hopefully will end up smiling  :)

ianrr

#10
Well I have achieved some success. There is a problem with a space in the name from files when outputting Files using Capture One when using multiple file sizes of the same file.

These files do not work  umi-7002192- (3) .jpg  ,  umi-7002192-BW (1) .jpg , the common thing being the space  ... and maybe the brackets.
These files work  umi-7002192-BW1.jpg  ,  umi-7002192-BW-2.jpg  this was achieved using the extra 2 brackets in the "Link Expression" as mentioned previously.   

  ^(_*{name})([+\-_]*[0-9|a-z])*\.(jpg|jpeg|psd|tif|tiff|dng)$

"Capture One " by default appends  "  -  (3) " as a numbering scheme when outputting more than one file with the same name ( I might have a Color version, 2 x B&W versions etc of the same file), which the standard IM5 balks at, so I changed the Output naming format to  [Image Name]-[Sub Name]-[1 Digit Counter]    ....  the Digit Counter then gave straight forward numbers only.Working fine now. Thank you every one for your input.



[attachment deleted by admin]