XMP custom tags - Adobe CQ5

Started by chrisma, October 23, 2013, 06:01:09 PM

Previous topic - Next topic

chrisma

I have a larger number of files which I would like to prepare with exiftool before importing into CQ5 DAM

All tags work fine - except "-xmp-cq:tags=..."

exiftool  "-xmp-cq:tags=railway:Operator/DB, railway:Class/DB/38.10" ..\tempo\64015340.JPG
Warning: Sorry, xmp-cq:tags doesn't exist or isn't writable
Nothing to do.


I understand that I need a config file for this custom XMP extension - so I manually set tags in CQ5 to _one_ file, exported this file and used exiftool to analyze the written XMP structure:

exiftool -xmp -b ..\tempo\64015340.JPG
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.5-c011 79.149598,2012/10/10-12:09:56        ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:dam="http://www.day.com/dam/1.0"
    xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"
    xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/"
    xmlns:cq="http://www.day.com/jcr/cq/1.0"
    xmlns:prism="http://prismstandard.org/namespaces/basic/2.1/"
    xmlns:adobe_dam="http://www.adobe.com/adobe_dam/1.0"
    xmlns:xmp="http://ns.adobe.com/xap/1.0/"
   dc:format="image/jpeg"
   dc:modified="2013-10-20T20:17:18.018+02:00"
   dam:size="59171"
   dam:Physicalwidthininches="10.0"
   dam:sha1="af208ae78237dae818a59a4376e2d3d8dd94bfc2"
   dam:extracted="2013-10-20T15:37:15.197+02:00"
   dam:Numberoftextualcomments="0"
   dam:Progressive="no"
   dam:Fileformat="JPEG"
   dam:Physicalheightindpi="72"
   dam:MIMEtype="image/jpeg"
   dam:Numberofimages="1"
   dam:Bitsperpixel="8"
   dam:Physicalheightininches="6.94444465637207"
   dam:Physicalwidthindpi="72"
   xmpRights:Owner="CO heinz"
   Iptc4xmpExt:LocationShown="location mannheim"
   Iptc4xmpExt:PersonInImage="person keine"
   prism:expirationDate="2016-10-20T20:00+02:00"
   adobe_dam:restrictions="&lt;p&gt;Use Restrictions: keine&lt;br&gt;&#xA;&lt;/p&gt;&#xA;"
   xmp:CreatorTool="CQ DAM">
   <dc:language>
    <rdf:Bag>
     <rdf:li>Lang Deutsch</rdf:li>
    </rdf:Bag>
   </dc:language>
   <dc:rights>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">Copyright CCGO</rdf:li>
    </rdf:Alt>
   </dc:rights>
   <dc:contributor>
    <rdf:Bag>
     <rdf:li>Contributor keiner</rdf:li>
    </rdf:Bag>
   </dc:contributor>
   <dc:description>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">Description Zug mit Dampflok faehrt in den Bahnhof</rdf:li>
    </rdf:Alt>
   </dc:description>
   <dc:creator>
    <rdf:Seq>
     <rdf:li>Creator Heinz</rdf:li>
    </rdf:Seq>
   </dc:creator>
   <dc:title>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">Titel Dampflok</rdf:li>
    </rdf:Alt>
   </dc:title>
   <xmpRights:UsageTerms>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">Usage Terms for personal use only </rdf:li>
    </rdf:Alt>
   </xmpRights:UsageTerms>
   <cq:tags>
    <rdf:Bag>
     <rdf:li>db_dampflok_br01</rdf:li>
     <rdf:li>properties:style/monochrome</rdf:li>
     <rdf:li>properties:orientation/landscape</rdf:li>
     <rdf:li>geometrixx-outdoors:season/summer</rdf:li>
    </rdf:Bag>
   </cq:tags>
  </rdf:Description>
</rdf:RDF>
</x:xmpmeta>


The part which I need to build a custom config file is pretty much at the end of that list: <cq:tags>
Structure seems to be simple - bag and line

This is my config file

##
print "Custom ExifTool config loaded!\n";
%Image::ExifTool::UserDefined = (
    # XMP tags may be added to existing namespaces:
    'Image::ExifTool::XMP::xmp' => {
        tags => { Writable => 'lang-alt' },
        cq => { List => 'Bag' },
    },
);
1; #end


Trying again to set custom XMP ...

exiftool -config day2.cnf "-xmp-cq:tags=railway:Operator/DB, railway:Class/DB/38.10" ..\tempo\64015340.JPG
Custom ExifTool config loaded!
Warning: Tag 'xmp-cq:Tags' does not exist
Nothing to do.


obviously the config file is loaded but I did something wrong.

Is there anybody who did this before and who can point me to the right direction ?
Or is there an option to dump a config file just from the exported image (which has the custom structure already included which I need to specify when writing into this extension) ?



Phil Harvey

Your XMP-cq tags are in a different namespace, just like the XMP-xxx namespace in the example config file.  You should be able to get this working like you want by following this example and changing all "xxx" to "cq".

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

chrisma

Thanx, Phil - it is working now

Here is the config file (if somebody is interested):

##
print "Custom ExifTool config day5.cfg loaded!\n";
%Image::ExifTool::UserDefined = (
    # new XMP namespaces (ie. xxx) must be added to the Main XMP table:
    'Image::ExifTool::XMP::Main' => {
        cq => { # <-- must be the same as the NAMESPACE prefix
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::cq',
                # (see the definition of this table below)
            },
        },
        # add more user-defined XMP namespaces here...
    },
);

%Image::ExifTool::UserDefined::cq = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-cq', 2 => 'Image' },
    NAMESPACE => { 'cq' => 'http://www.day.com/jcr/cq/1.0' },
    WRITABLE => 'string',
    tags => { List => 'Bag' },
);


command-line looks like this:

exiftool -config day5.cfg "-xmp-cq:tags=properties:orientation/landscape" "-xmp-cq:tags=properties:style/color" OEG_TW55_1955.JPG
Custom ExifTool config day5.cfg loaded!
    1 image files updated


Uploading picture into CQ5 shows these tags are set

For now I am happy .. case solved  - BR Chris