-use MWG Switch doesn't seem to work

Started by Erixx Haxx, July 24, 2016, 03:48:05 AM

Previous topic - Next topic

Erixx Haxx

Hi, when I use -use MWG as switch, it doesn't seem to work.

Example:
"-Artist<${directory;s(.*/.*/(.*)( - )(.*)( - )(.*))($1)}"  "-Title<${directory;s(.*/.*/(.*)( - )(.*)( - )(.*))($3$4$5)}"  "-keywords+<${directory;s(.*/.*/(.*)( - )(.*)( - )(.*))($3)}"  "-copyright<${directory;s(.*/.*/(.*)( - )(.*)( - )(.*))($3)}"  -r -m -p -use MWG -overwrite_original

This gets me

-exif Artist
-exif copyright
-iptc Keywords
-xmp title

I thought -use mwg was to sync across the tag types.

Also This example:
"-Artist+<${directory;s(.*/(.*)/(.*))($1)}" -r -m -p -use MWG -overwrite_original

This will not add to artist. Only way to get it to work is remove the ( + ) so it overwrites the current value.


What am I doing wrong, because I'm pretty sure I had this code working a while back. Like in late v.9

Win7x64 
exiftool.exe v1.23
Also I am using this inside exif mixer if that makes a diff.
 
  Thanx for any help

Phil Harvey

Quote from: Erixx Haxx on July 24, 2016, 03:48:05 AM
This gets me

-exif Artist
-exif copyright
-iptc Keywords
-xmp title

I thought -use mwg was to sync across the tag types.

You should get this:

> exiftool a.jpg -all=
    1 image files updated
> exiftool a.jpg -artist=me -title=abc -keywords=one -copyright=yes -use MWG
    1 image files updated
> exiftool a.jpg -G1 -a --file:all -e
[ExifTool]      ExifTool Version Number         : 10.23
[IFD0]          X Resolution                    : 72
[IFD0]          Y Resolution                    : 72
[IFD0]          Resolution Unit                 : inches
[IFD0]          Artist                          : me
[IFD0]          Y Cb Cr Positioning             : Centered
[IFD0]          Copyright                       : yes
[XMP-x]         XMP Toolkit                     : Image::ExifTool 10.23
[XMP-dc]        Rights                          : yes
[XMP-dc]        Subject                         : one
[XMP-dc]        Title                           : abc


QuoteAlso This example:
"-Artist+<${directory;s(.*/(.*)/(.*))($1)}" -r -m -p -use MWG -overwrite_original

This will not add to artist. Only way to get it to work is remove the ( + ) so it overwrites the current value.

You should get this:

> exiftool a.jpg "-artist+<directory" -use mwg
    1 image files updated
> exiftool a.jpg -artist -G1
[IFD0]          Artist                          : me; .


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Erixx Haxx

#2
How about adding to artist

When I drop files or folder on this:
"D:\Program_Hub\Exiftool\exiftool_10.23.exe" "-Artist+<${directory;s(.*/.*/(.*)( - )(.*)( - )(.*))($1)}"  -r -m -p -use MWG -overwrite_original

exif:Artist are not added to. I can only write to the artist by removing the (+) sign

My main problem is not being able to add onto exif:artist tag. Pretty sure this worked awhile back
It just seem like the -use mwg switch is not doing anything

Any idea why my tags are getting addied all over the place instead of like yours.
is it because i'm adding instead of write over.
-Artist+<


Thanx

Hayo Baan

I just tried something like you did and it worked. Just make sure you remove the -p option...

exiftool -Artist'+<${directory;s(.*/.*/(.*)( - )(.*)( - )(.*))($1)}' -r -m -use MWG a.jpg
    1 image files updated

Hayo Baan – Photography
Web: www.hayobaan.nl

Erixx Haxx

QuoteI just tried something like you did and it worked. Just make sure you remove the -p option...

I thought the -p was to keep the files time from shifting.

But, I tried like you stated and IT Worked.  ( That's weird. I wonder  why -p blocks it?? )

-Anyways: Thank You SO SO much. I've been fighting this for weeks.

-Now to see if I can get the rest of the tags put where they need to be. (so far it seems a little exif, little iptc, and a little xmp )
I thought -use mwg filed them all, where needed

     Thanx again..

Hayo Baan

Great to hear it worked for you. If you do not want the time to change you need to use -P (uppercase P), lower case -p is the print format command and requires an additional argument and it therefore "ate" the -use, that's why it failed  ;)

Note: -mwg doe not magically correct all existing tags, you'll still have to fix those manually (i.e., by writing to them). Have a look at the documentation. Especially e.g., the text:
QuoteWhen reading, the value of each MWG tag is Derived From the specified tags based on the MWG guidelines. When writing, the appropriate associated tags are written.

Hope this explains what you were seeing.
Hayo Baan – Photography
Web: www.hayobaan.nl

Erixx Haxx

Hello again:
I just want to say Thanks again.   This is working now.  ;)

Seems I had over looked this TYPO many times when I re-wrote all my scripts. Also I had totally forgotten about the
lowercase -p switch..

Maybe instead of pulling all of my hair out over the last month I should have asked a lot sooner...  ???