Trouble writing to user defined tag containing a dot character

Started by gregreser, April 07, 2021, 11:00:25 PM

Previous topic - Next topic

gregreser

I'm working with an established schema, VRA Core, that uses property names such as "work.agent". I can read the tags with no problem, but when I attempt to write, I get this message: "Warning: Tag 'xmp-vrae:work.agent' is not defined".

Command:
exiftool -config [path to config file] -xmp-vrae:work.agent="TEST" [path to jpg file]

Config file:

# The %Image::ExifTool::UserDefined hash defines new tags to be added
# to existing tables.
%Image::ExifTool::UserDefined = (
    # add vrae to the Main XMP table:
    'Image::ExifTool::XMP::Main' => {
        vrae => {
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::vrae',
            },
        },
    },
);

# define vrae namespace and properties
%Image::ExifTool::UserDefined::vrae = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-vrae', 2 => 'Image' },
    NAMESPACE => { 'vrae' => 'http://www.vraweb.org/vracore/4.0/essential/' },
    WRITABLE => 'string', # (default to string-type tags)

work.agent => { Writable => 'string' },

);


I think my config file is correct. If I change the tag name to "workagent" (in the config and the command) the write process is successful, but the XMP property is written as vrae:workagent. Unfortunately, this is incompatible with existing vrae metadata created with other applications.

gregreser

Following up on my original post.

I see that there was a previous request to add VRA Core to ExifTool https://exiftool.org/forum/index.php?topic=9418.0

I am the chair of the VRA embedded metadata sub-committee http://metadatadeluxe.pbworks.com/w/page/20792294/VRA%20Embedded%20Metadata%20Subcommittee
and the creator the the VRA tools for Adobe Bridge http://metadatadeluxe.pbworks.com/w/page/108523528/VRA%20Bridge%20Metadata%20Tools

While Bridge has been a useful platform for custom scripting, it has become increasingly unreliable. Having the ability to use VRA in ExifTool could greatly expand options for adoption in a variety of applications.

It would great if VRA could be supported in ExifTool, but if that is not possible at this time, perhaps it would be possible to address the issue I posted here: VRA tag names which contain a period, e.g., work.agent, will not write.

I would be happy to provide more information on VRA Core XMP and the ways it has been used by the cultural heritage community. I would also be happy answer any questions about the schema.

Thanks,
Greg Reser

gregreser

My apologies, this question has already been answered in "Tag names with period ('.')" https://exiftool.org/forum/index.php?topic=5486.0
"...you must specify a legal tag "Name" in the tag properties"

I changed my config file and now it works (writes as work.agent):
'work.agent' => { Name => 'workAgent', Writable => 'string' },

I do still have a problem with structured fields. This is probably just me not knowing where to place the "Name".
I tried this, but it doesn't work (writes as workAgentIndexed):

work.agentIndexed => {
Name => 'workAgentIndexed',
List => 'Seq',
Struct => {
name  => { Writable => 'string' },
nameVocab => { Writable => 'string' },
nameRefid => { Writable => 'string' },
nameHref => { Writable => 'string' },
attribution => { Writable => 'string' },
role => {
List => 'Seq',
Struct => {
value  => { Writable => 'string' },
},
},
},
},


Thanks for your help.

gregreser

I forgot the single quotes around 'work.agentIndexed'

This works:

'work.agentIndexed' => {
NAME => 'workAgentIndexed',
List => 'Seq',
Struct => {
name  => { Writable => 'string' },
nameVocab => { Writable => 'string' },
nameRefid => { Writable => 'string' },
nameHref => { Writable => 'string' },
attribution => { Writable => 'string' },
role => {
List => 'Seq',
Struct => {
value  => { Writable => 'string' },
},
},
},
},

StarGeek

Glad you were able to figure it out and found that old post.  It was not something I remembered seeing before, so I wasn't able to be of any help. 
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Sorry for the delay in responding (I was out enjoying the great weather last week instead of pounding the keyboard), but I'm glad you figured this out.

I'll consider adding VRA Core tags to the ExifTool release.  It would be very easy to do if you have already created a config file for this.  Could you attach it here or send it to me (philharvey66 at gmail.com)?

- 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 ($).

gregreser

Thanks for considering adding VRA.
I have posted a config file at: https://github.com/MetadataDeluxe/VRA-Core-Essentials-ExifTool-config

mrtngrsbch

Quote from: Phil Harvey on April 12, 2021, 08:07:47 AM
I'll consider adding VRA Core tags to the ExifTool release.  It would be very easy to do if you have already created a config file for this.  Could you attach it here or send it to me (philharvey66 at gmail.com)?

Thanks Greg & Phil
This is cooool!
I put notice to @hvdwolf who will surely want to integrate it to jExitToolGUI


mrtngrsbch

Hi Greg,

I take this space to tell you that I am going to create an issue to ask Phil to incorporate ISAD(G).

best

gregreser

I have updated my documentation of the VRAE tags at https://github.com/MetadataDeluxe/VRA-Core-Essentials-ExifTool-config/blob/main/Documentation/VRAE_ExifTool_Tags.xlsx

I might have gone overboard, but I included several columns to represent the tags. The structured tags are the hardest to represent clearly, so I tried a couple of things.

Flattened tags are straightforward:
WorkMaterialIndexedValue
WorkMaterialIndexedVocab
WorkMaterialIndexedRefid
WorkMaterialIndexedHref
WorkMaterialIndexedExtent
WorkMaterialIndexedSource

Ultimately, they are not as useful as the serialized structure tags, so I added these:

- Three column representation (that might convey the structure):









Tag/Struct Field//Struct Field
WorkMeasurementsIndexed
Unit
Extent
Source
Measurements
Value
Type


- Tag + serialized structure (to make it easy to write a command): WorkMaterialIndexed "[{Value= , Vocab= , Refid= , Href= , Extent= , Source= }]"

If anyone has any advice on how to make this clearer, I welcome it.

mrtngrsbch

Hi Greg,

A few days ago I published my request to incorporate ISAD(G) into ExifTool.
Maybe this has not been well requested or interpreted. Please tell me if I am on the right track.

best

https://exiftool.org/forum/index.php?topic=12421.0


Quote from: gregreser on April 24, 2021, 05:17:52 PM
Thanks for considering adding VRA.
I have posted a config file at: https://github.com/MetadataDeluxe/VRA-Core-Essentials-ExifTool-config

gregreser

Hi Martin,

Your config file for ISAD(G) looks good and seems like a good addition, I'll leave a comment on that thread.

https://exiftool.org/forum/index.php?topic=12421.0

StarGeek

Quote from: mrtngrsbch on May 21, 2021, 10:50:35 AM
Maybe this has not been well requested or interpreted. Please tell me if I am on the right track.

Phil is probably away from the computer spending time outdoors.  His EBird page shows a lot of updates.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

gregreser

Wow, more great work by Phil, but of a different type. I'm glad you shared that link, StarGeek

StarGeek

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).