Exporting XMP metadata sidecar files by themselves.

Is there a way to export sidecar files without exporting another master somewhere? I run a referenced library referenced to an archive on my HDD that I can easily back and manage. I may want to export sidecar files for the pictures as a yearly thing or so. As far as I can tell you can only creat sidecar files when exporting a new master which would then created an IMG_1(1) master and double the store space usage. By using the export metadata function you end up with a single text file.
Right now I just plan to manage and backup my metadata via a Vault but the option would be nice to be able to export sidecar files separately from a new master. Maybe I'm asking too much and just need to use the app as it is designed...

Sorry I can't answer that, the script was written a while ago and came from here..
http://www.creativescripting.net/BridgeScripts/barredrock.html
It might be best to write one from scratch, but that  would mean knowing what fields were required and what file types.

Similar Messages

  • Context right-click to export XMP metadata to file

    I'd like to have the right click context menu include the option to "Export XMP Metadata to Files" in the Library grid or filmstrip. Currently an annoying trip to the Menu bar is required to invoke this function.

    It was there for B4.1. The Contextual Menus are getting crowded, so maybe that's why they took it out.
    I like lots of Contexual Menus,too. But they get a little useless if too crowded, so maybe they need ot be user configuarable for what one uses the most.
    Maybe by V1.5?
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.8 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Import XMP Metadata From File

    In Beta4, the Import XMP Metadata From File command would import data found in an xmp file.
    In V1, it's not working...or am I missing something.
    (I do understand that Export XMP to File will write the data into the image file itself.)
    Ideas?
    Pete

    Here's a sample xmp I created...in case it's wrong..but it was working in B4.<br /><br /><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Toolkit 3.3-016, build -num-, -date-"><br /> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><br />   <rdf:Description rdf:about=""<br /> xmlns:dc="http://purl.org/dc/elements/1.1/"><br />    <dc:description><br />     <rdf:Alt><br />      <rdf:li xml:lang="x-default">: Geese at sunset. Finley National Wildlife Refuge, Oregon</rdf:li><br />     </rdf:Alt><br />    </dc:description><br />    <dc:creator><br />     <rdf:Seq><br />      <rdf:li xml:lang="x-default">Peter K. Ziminski</rdf:li><br />     </rdf:Seq><br />    </dc:creator><br />    <dc:rights><br />     <rdf:Alt><br />      <rdf:li xml:lang="x-default">Peter K. Ziminski</rdf:li><br />     </rdf:Alt><br />    </dc:rights><br />    <dc:subject><br />     <rdf:Bag><br />      <rdf:li>Sunrises and Sunsets</rdf:li><br />      <rdf:li>Birds</rdf:li><br />      <rdf:li>Landscapes</rdf:li><br />      <rdf:li>Animals</rdf:li><br />      <rdf:li>Oregon</rdf:li><br />      <rdf:li>Finley National Wildlife Refuge</rdf:li><br />     </rdf:Bag><br />    </dc:subject><br />   </rdf:Description><br />   <rdf:Description rdf:about=""<br />    xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"><br />     <Iptc4xmpCore:Location>Finley National Wildlife Refuge, Oregon</Iptc4xmpCore:Location><br />    </rdf:Description><br /> </rdf:RDF><br /></x:xmpmeta>

  • Keywords, Include on Export, Save Metadata to File, and SmugMug???

    My workflow and issue (LR 5.7 and SmugMug plugin 2.1.10):
    1) I import RAW files as DNGs
    2) I do various Lightroom stuff, plus add Keywords. Some of the keywords do not have "Include on Export" checked. Some of my keywords are part of hierarchies that have "Export Containing Keywords" checked. And some of keywords have synonyms.
    3) Once I am all done with a file, I select "Save Metadata to File"
    4) Then I publish to SmugMug using the SmugMug publish service.
    5) The SmugMug website shows keywords which I did not intend to be included on export, it does not show the complete hierarchy for those keywords that should, and none of my synonyms show. I noticed this is the same way the keywords were saved to the DNG when I view the file in Bridge.
    6) When I export the file to a file on my desktop and check the metadata with Bridge, the Keywords all export correctly.
    All of this behavior makes sense, I guess, but I cannot figure out what to do about it. Should I not bother to "Save Metadata to File", this seems to be what is messing up the SmugMug publish service? Is the SmugMug publish service behaving correctly? I would have expected it to behave like an export which would write synonyms, exclude keywords that should be excluded, etc, which seems to work ok in point 6 above. Are the publish services more effort than they are worth? So I get SmugMug to work, what happens when I try Flickr? I hate to stop "Save(ing) Metadata to File(s)", since that seems like a nice hedge against db corruption and the next time I decide to try a whole different image database.
    Any advice on this issue would be greatly appreciated.

    Perhaps someone with direct experience with publishing to Smugmug will chime in.  Short of that, some thoughts on your issues:
    Should I not bother to "Save Metadata to File", this seems to be what is messing up the SmugMug publish service?
    I very much doubt that it is messing up the publishing.  What gets saved to the file from the catalog is independent of what gets exported.  Saving metadata to the file is generally a good practice (in case you screw up your catalog backups).  Many, perhaps most, users set the preference Catalog Settings > Automatically Write Changes Into XMP.
    I would have expected it to behave like an export which would write synonyms, exclude keywords that should be excluded, etc, which seems to work ok in point 6 above.
    Yes, that's a reasonable expectation.
    You may have done this already, but double-check: Right-click the Smugmug publishing service in the left-hand column of the Library, select Edit Settings, and in the Metadata section verify that you have Include: All Metadata set.
    Did you download the Smugmug plugin from Smugmug? You might try this Smugmug plugin instead -- the author designed the publishing architecture of LR and has an excellent reputation. 
    Are the publish services more effort than they are worth? So I get SmugMug to work, what happens when I try Flickr?
    I think many users find the publishing services are generally worthwhile.  I publish regularly to Flickr (using the built-in Flickr plugin, which isn't completely reliable) and the Zenfolio plugin from Friedl. 

  • Export xmp as seperate file

    Hi
    I'm exporting a mxf file from after effects. I would like to include a xmp file, but not in the mxf file. I would like to have it as a seperate file. Is that possible?
    Jakob

    Don't think so. AE specifically tries to use the media formats' native options for timecode and metadata nad when using Dynamic Link it also uses the media cache to store additional info. you should look into capturing all information with a script. it's the only way to be 100% everything ends up where you want it.
    Mylenium

  • Can't parse XMP metadata from files

    Hello,
    I am currently having troubles reading custom metadata from a file.
    I wrote a really simple test case to show you that, maybe I'm doing something wrong...
    Writing a simple property :
    static const char * kNS1 = "ns:test1/";
    void Foo::writeSimple()
        if( !SXMPMeta::Initialize() )
            LOGIT( LOG_ERROR, "Could not initialize XMP toolkit!" );
            return;
        // custom schema
        std::string actualPrefix;
        bool ret = SXMPMeta::RegisterNamespace( kNS1, "ns1", &actualPrefix );
        XMP_OptionBits options = 0;
        // Must initialize SXMPFiles before we use it
        if ( !SXMPFiles::Initialize( options ) )
            LOGIT( LOG_ERROR, "Could not initialize SXMPFiles!");
            return;
        try
            SXMPMeta meta;
            std::string value;
            meta.SetProperty( kNS1, "name", "value" );
            // just to check the property gets actuelly written in meta
            bool exists = meta.GetProperty( kNS1, "name", &value, 0 );
            std::cout << "writeRead: " << value << std::endl; // output is ok
            // Options to open the file with - open for editing and use a smart handler
            XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
            std::string status = "";
            // First we try and open the file
            bool ok = p_private->m_file.OpenFile( "Collines.jpg", kXMP_UnknownFile, opts );
            // Check we can put the XMP packet back into the file
            if( p_private->m_file.CanPutXMP( meta ) )
                    // If so then update the file with the modified XMP
                    p_private->m_file.PutXMP( meta );
            else
                LOGIT( LOG_ERROR, "PutXMP: cannot put XMP" );
            p_private->m_file.CloseFile();
            SXMPFiles::Terminate();
            SXMPMeta::Terminate();
        catch( XMP_Error& e )
            LOGIT( LOG_EXCEPTION, "writeSimple: " + std::string(e.GetErrMsg()) );
    Reading the property:
    void Foo::readSimple()
        if( !SXMPMeta::Initialize() )
            LOGIT( LOG_ERROR, "Could not initialize XMP toolkit!" );
            return;
        // custom schema
        std::string actualPrefix;
        bool ret = SXMPMeta::RegisterNamespace( kNS1, "ns1", &actualPrefix );
        XMP_OptionBits options = 0;
        // Must initialize SXMPFiles before we use it
        if ( !SXMPFiles::Initialize( options ) )
            LOGIT( LOG_ERROR, "Could not initialize SXMPFiles!");
            return;
        try
            // Options to open the file with - open for editing and use a smart handler
            XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
            std::string status = "";
            // First we try and open the file
            bool ok = p_private->m_file.OpenFile( "Collines.jpg", kXMP_UnknownFile, opts );
            // Check we can put the XMP packet back into the file     
            SXMPMeta meta;
            std::string xmpPacket;
            XMP_PacketInfo packetInfo;
            ok = p_private->m_file.GetXMP( &meta, &xmpPacket, &packetInfo );
            std::cout << "DBG: getXMP: " << xmpPacket << std::endl; // output is ok, I can see what I wrote before
            std::string value;       
            bool exists = meta.GetProperty( kNS1, "name", &value, 0 ); // returns false...
            std::cout << "writeRead: " << value << std::endl; // nothing in value
            p_private->m_file.CloseFile();
            SXMPFiles::Terminate();
            SXMPMeta::Terminate();
        catch( XMP_Error& e )
            LOGIT( LOG_EXCEPTION, "readSimple: " + std::string(e.GetErrMsg()) );
    Do you have any idea?
    Thanks in adavance!
    Chris.

    Hello? No one has any idea?

  • Export XMP Files + DNG?

    If I currently have all of the RAW images within my Lightroom database in the DNG format, do I have to worry about exporting the XMP data to the files (using the 'Export .XMP Metadata to File' menu option)? What about the Preference setting to 'Automatically write changes into XMP'? Anyone know whether or not this preference setting is relevant to someone with a library full of DNG RAW images?
    If this is something that has to be done in order for other Apps to be able to see the various adjustments and settings I've applied to my images in Lightroom, and assuming I would like to have Lightroom do this for me automatically (using the preference setting), does having changes written to the XMP sidecar files automatically in any noticeable way have a negative affect on Lightroom's performance (i.e. slow it down in any way)?
    Please advise...Thanks!

    >If this is something that has to be done in order for other Apps to be able to see the various adjustments and settings I've applied to my images in Lightroom
    Correct, but Lr is fully functional without the requirement to export xmp data. Therefore, only export the xmp data only if it is required to do so.
    I never let Lr automatically write xmp data -- why pay the performance penalty, however small it might be, for no good reason? Instead, I use the Metadata>XMP menu to export xmp data only on those images I might want to view in Bridge or ACR.
    Other people have suggested that the xmp export can be used as a backup of Lr's metadata and parametric data. That is a valid argument but since not all Lr information is exported (e.g. collections, stacking, history, etc.) it's only a partial backup. Instead, I religiously backup the Lr database and copy it to external drives and burn to optical media.

  • New option: "Export XMP when idle"

    like many, for performance reason i do not have "Automatically write changes into XMP" checked. yet i am a firm believer that the changes *belong* in the files themselves (for portability), so i must constantly do manual XMP exports when im finished w/ a set.
    in my book, "dumb" (not image-specific) manual steps are, well, dumb, and should be removed for an ideal workflow.
    therefore, i think it would be cool if LR handled XMP-to-file in a slightly different way -- a new checkbox for:
    "Export XMP metadata to files when idle"
    ...so whenever you leave LR open and you arent doing anything w/ it, it will auto-export all not-yet-embedded XMP changes to the files. this gives you portability, and piece of mind at no manual cost.
    just my thought.
    matt

    > Select only the images you want to write the metadata and/or settings
    > to!
    that is an added manual step. as i said, dumb (generic) manual steps that dont relate to the images in question are to be avoided.

  • Sidecar files on import?

    I was wondering about sidecar files, I know that photos can be exported with their metadata contained inside one of those XML files, but was wondering what the situation would be if they were imported.
    Specifically, can I have Aperture import a sidecar file containing metadata which would then automatically be embedded/associated into the photo on import?

    Right well for posterity here is the answer, I found it on this site:
    http://digitalphoto.maccreate.com/2010/02/10/import-xmp-sidecar-files-with-image s/
    Its amazing how well hidden this touted feature and its operation is hidden, nothing in the Aperture help file or on the Aperture website and not much online, even in this forum.. all that has to be done with a valid XMP metadata sidecar file is to name it the same as the image so "tiger.gif" would be "tiger.xmp" and then when importing the GIF image then Aperture looks for the XMP file and does the rest behind the scenes, you won't actually see the XMP file registered in the import window or be able to manually import it.

  • Feature Request: Metadata Export to Sidecar Files

    I want to be able to export an image file's metadata to a sidecar XMP file that is named after the image file but with an .xmp extension. For proprietary raw files, that's the default. For DNG files, I can tediously force it by locking the file, loading it into Camera Raw, and selecting the "Export Settings to XMP" function. However I want to do this for several hundred or some thousand image files at once—so loading them all into Camera Raw just to make it export the metadata is not really a feasible method.
    Worse yet, for JPEG files exporting the metadata to a sidecar file is not possible at all, as far as I can tell. When the JPEG file is writable then the exported XMP metadata will go into the file itself. When the JPEG file is write-protected then Camera Raw will entirely refuse to export the XMP metadata. This behaviour is inconsistent with other file types, as Camera Raw will happily export the XMP metadata to sidecar files for write-protected DNG files. By the way, there is another inconsistency between write-protected DNG files and proprietary raw image files, as Camera Raw will export XMP metadata for both into sidecar files but Bridge will export XMP metadata to sidecar files only for proprietary raw image files but not for write-protected DNG files. That doesn't make sense.
    If an image file is write-protected then any changes to the metadata must go into sidecar files—as simple as that. Why are proprietary raw image files, write-protected DNG files, and write-protected JPEG files behaving differently in this respect? Sidecar files are fully supported for proprietary raw files, half-way supoorted for DNG files, and not supported at all for JPEG files.
    Anyway—I need a way to select an arbitrary number of image files of any kind (in Bridge, not in Camera Raw) and then export all their metadata to sidecar files, one sidecar file for each image file, at the push of a button. It would be nice if I weren't forced to tamper with file locking first, just create those damn sidecar files when I'm asking for them. I'd even be happy with a createMetadataTemplate() or saveMetadataToSidecar() function in Bridge's scripting interface. There, I found a function to load a thumbnail's metadata from a metadata template (i. e. an XMP file; see applyMetadataTemplate() function)—but no way to save a thumbnail's complete metadata to a metadata template. If there is a way then please tell me. If there is no way yet then please provide one as soon as possible!

    Curt Y wrote:
    My first question is why you want to export metadata to sidecar files.  With DNG one of the touted advantages is that all the metadata is written to the file and no XMP file is needed or created.
    This actually is a disadvantage that keeps me from using DNG format. XMP sidecar files are extremely useful to transfer updated metadata from the working set to the backup archive. Sidecar files do make life a lot easier.
    Usually I will download the memory cards' contents to the computer's internal hard disk. Then I will add some bulk metadata, rename the files, and make a backup to at least one, preferably two external hard disks. Then I will continue working on the images—refining captions, adding more keywords, add labels and rankings, apply ACR settings. Finally I'll want to update the metadata in the backups. With sidecar files, that would require the transfer of kilobytes. Without, I'll need to transfer gigabytes because I'm forced to update the whole image files when actually I only want to update the metadata ... just because Bridge is too dumb to let me export the metadata to sidecar files. Or actually, it does let me export the metadata to a sidecar file—but only for one image file at a time which is totally useless when I need to update the metadata of hundreds or thousands of image files.
    The DNG format does support sidecar files. DNG files can have their metadata internally 'under the hood' or externally in a sidecar file. When there is a sidecar file accompanying a DNG file then Camera Raw or DNG Converter will read and use it just as they would for proprietary raw files ... that's very convenient. Only Bridge doesn't allow the user to take advantage of that flexibilty but forces him to use internal metadata always, whether it makes sense or not.

  • XMP metadata lost from PNG files after saveing

    Hello,
    i am using Photosop CS3 SDK. through my plug-in I put some metadata in the file using XMP SDK 4.4.2.
    For PNG files, if the file is modified and saved, all the XMP metadata is lost from the file.
    The following steps are being done.
    1. Put some metadata in PNG file using SXMPMeta::SetProperty and SXMPMeta::AppendArrayItem
    2. modify the file (changed brightness, contrast, flattened the image).
    3. Save this file.
    After saving all the xmp metadata is lost from the PNG file. This works for all other formats.
    What can be wrong that I am doing?
    Is there any other way to put XMP metadata in file?
    Thanks,
    Hitesh

    That's probably because PNG doesn't save or read XMP metadata.
    There really aren't standards for metadata in PNG. (though a few products have tried adding it in ad-hoc ways, without documenting their efforts)

  • Import XMP Metadata Kills My Image Edits

    I imported a batch of JPGs from a recent trip and happily used LR to rank them, add labels and adjust them in the Develop module. Later, when LR was not running, I used another program to modify some of the embedded meta data in these JPGs (in particular the dates).
    On my next visit to LR I used the Import XMP Metadata From File command, hoping to get LR to recognize the modified dates. This turned out to be a big mistake. All my previous ranking, labeling and developing was lost. Oh dear.
    I guess I was under the impression that the Import XMP Metadata From File command would synchronize the metadata in the files with the metadata in the database. It appears to have simply replaced the database values with what was in the file. So is this a bug or did I just misunderstand the feature?

    Last history state? See
    Loading metadata resets Develop settings.
    >I can go back to Develop and "back up" because the history is all there, but this would have to be done file by file,
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.8 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Write xmp sidecar files without need to export masters - script

    I've written a script to write xmp sidecar files for referenced and online images (the 2 conditions in the script) of the selected images. I looked for a while at system events and other stuff to be able to write the xmp file, but i'm not a programmer, so in the end i chose the long and dirty way to do it.
    This script will export all iptc expanded fields as aperture does (creating basically the same file). It can be easily adjusted to include other tags, even custom ones. I don't know how to get at the adjustments for images, otherwise those could be included as well.
    If anyone has the energy to clean this up and make it faster, feel free to do so. Next, I'm going to try to write a script to do the opposite, import xmp sidecars for imported online and referenced files.
    Here it goes (thanks to Brett Gross for the database part to find the master filename):
    --script to create sidecar xmp files for referenced files without having to export masters. parts of the script (finding the file name) are by brett gross
    property p_sql : "/usr/bin/sqlite3 "
    global g_libPath
    on run
    my getLibPath()
    --counter for processed images, reset, just in case
    set mastercount to 0
    tell application "Aperture"
    if not (exists selection) then
    display dialog "You have to select at least one image" buttons {"OK"} default button 1
    return
    else
    display dialog "You have selected " & (count of selection) & " images." & return & "Continue?" default button 1
    end if
    set theSel to selection
    --run through the selected images
    repeat with currentpic from 1 to count of theSel
    tell item currentpic of theSel
    -- only apply to referenced and online images
    if referenced and online then
    set mastercount to mastercount + 1
    set curID to id
    --find the master file path and name - this part by brett gross, thanks
    set libPOSIX to POSIX path of g_libPath
    set libDBPOSIX to (libPOSIX & "/Aperture.aplib/Library.apdb") as string
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZFILEUUID from ZRKVERSION where ZUUID='" & curID & "'\""
    set ZFILEUUID to do shell script theScript
    # ---------- Get the master's path
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZIMAGEPATH from ZRKFILE where ZUUID='" & ZFILEUUID & "'\""
    set ZIMAGEPATH to do shell script theScript
    # ---------- Get the master's disk name
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZFILEVOLUMEUUID from ZRKFILE where ZUUID='" & ZFILEUUID & "'\""
    set ZFILEVOLUMEUUID to do shell script theScript
    set theScript to p_sql & (quoted form of libDBPOSIX) & " \"select ZNAME from ZRKVOLUME where ZUUID='" & ZFILEVOLUMEUUID & "'\""
    set diskName to do shell script theScript
    set imgPath to (diskName & "/" & ZIMAGEPATH)
    --end brett gross part
    --strips extension, seems to work for files and paths with more than one period
    set oldlim to AppleScript's text item delimiters
    set AppleScript's text item delimiters to "."
    try --remove last extension only
    set contador to text item -1 of imgPath
    set noExtension to Unicode text 1 thru -((count of contador) + 2) of imgPath
    on error --handle files with no extensions
    set noExtension to imgPath
    end try
    set AppleScript's text item delimiters to oldlim
    --create the file and path name with the .xmp extension for writing
    set xmpPath to "/Volumes/" & noExtension & ".xmp" as Unicode text
    --convert posix path to alias for easier write and read handling
    set xmpPath to POSIX file xmpPath as file specification
    -- header for xmp file
    set xmpheader to ("<?xpacket begin='' id=''?>
    <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9-9, framework 1.6'>
    <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>") & return
    -- footer for xmp file
    set xmpfooter to ("</rdf:RDF>
    </x:xmpmeta>
    <?xpacket end='w'?>") & return
    --xmp content, part 1
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Contact") or (exists IPTC tag "Country/PrimaryLocationCode") then
    set xmpcontentpartone to ("<rdf:Description rdf:about='' xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'>") & return
    try
    set CountryCode to value of IPTC tag "Country/PrimaryLocationCode"
    set xmpcontentpartone to xmpcontentpartone & tab & "<Iptc4xmpCore:CountryCode>" & CountryCode & "</Iptc4xmpCore:CountryCode>" & return
    end try
    try
    set CreatorContactInfo to value of IPTC tag "Contact"
    set xmpcontentpartone to xmpcontentpartone & tab & "<Iptc4xmpCore:CreatorContactInfo>" & CreatorContactInfo & "</Iptc4xmpCore:CreatorContactInfo>" & return
    end try
    set xmpcontentpartone to xmpcontentpartone & ("</rdf:Description>") & return
    else
    set xmpcontentpartone to ""
    end if
    --xmp content, part 2
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Category") or (exists IPTC tag "City") or (exists IPTC tag "Country/PrimaryLocationName") or (exists IPTC tag "Credit") or (exists IPTC tag "DateCreated") or (exists IPTC tag "Headline") or (exists IPTC tag "Province/State") or (exists IPTC tag "Source") or (exists IPTC tag "SpecialInstructions") or (exists IPTC tag "SupplementalCategory") or (exists IPTC tag "Writer/Editor") then
    set xmpcontentparttwo to ("<rdf:Description rdf:about='' xmlns:photoshop='http://ns.adobe.com/photoshop/1.0/'>") & return
    try
    set Category to value of IPTC tag "Category"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Category>" & Category & "</photoshop:Category>" & return
    end try
    try
    set City to value of IPTC tag "City"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:City>" & City & "</photoshop:City>" & return
    end try
    try
    set Country to value of IPTC tag "Country/PrimaryLocationName"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Country>" & Country & "</photoshop:Country>" & return
    end try
    try
    set Credit to value of IPTC tag "Credit"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Credit>" & Credit & "</photoshop:Credit>" & return
    end try
    try
    set DateCreated to value of IPTC tag "DateCreated"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:DateCreated>" & DateCreated & "</photoshop:DateCreated>" & return
    end try
    try
    set Headline to value of IPTC tag "Headline"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Headline>" & Headline & "</photoshop:Headline>" & return
    end try
    try
    set State to value of IPTC tag "Province/State"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:State>" & State & "</photoshop:State>" & return
    end try
    try
    set Source to value of IPTC tag "Source"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Source>" & Source & "</photoshop:Source>" & return
    end try
    try
    set Instructions to value of IPTC tag "SpecialInstructions"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:Instructions>" & Instructions & "</photoshop:Instructions>" & return
    end try
    try
    set SupplementalCategory to value of IPTC tag "SupplementalCategory"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:SupplementalCategory>" & SupplementalCategory & "</photoshop:SupplementalCategory>" & return
    end try
    try
    set CaptionWriter to value of IPTC tag "Writer/Editor"
    set xmpcontentparttwo to xmpcontentparttwo & tab & "<photoshop:CaptionWriter>" & CaptionWriter & "</photoshop:CaptionWriter>" & return
    end try
    set xmpcontentparttwo to xmpcontentparttwo & ("</rdf:Description>") & return
    else
    set xmpcontentparttwo to ""
    end if
    --xmp content, part 3
    --check for existence of iptc tags, create content or empty string depending on existance of tags
    if (exists IPTC tag "Byline") or (exists IPTC tag "Caption/Abstract") or (exists IPTC tag "CopyrightNotice") or (exists IPTC tag "Keywords") or (exists IPTC tag "ObjectName") then
    set xmpcontentpartthree to ("<rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1/'>") & return
    try
    set creator to value of IPTC tag "Byline"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:creator><rdf:Seq><rdf:li>" & creator & "</rdf:li></rdf:Seq></dc:creator>" & return
    end try
    try
    set description to value of IPTC tag "Caption/Abstract"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:description><rdf:Alt><rdf:li xml:lang='x-default'>" & description & "</rdf:li></rdf:Alt></dc:description>" & return
    end try
    try
    set rights to value of IPTC tag "CopyrightNotice"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:rights><rdf:Alt><rdf:li xml:lang='x-default'>" & rights & "</rdf:li></rdf:Alt></dc:rights>" & return
    end try
    --keywords, slightly different, as they need to be written as a list and not as a string
    --i don't think it's a problem if we create an empty list if there are no keywords present.
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:subject><rdf:Bag>" & return
    --make list item for every keyword
    try
    repeat with n from 1 to count of keywords
    set cursubject to name of (keyword n)
    set xmpcontentpartthree to xmpcontentpartthree & tab & tab & "<rdf:li>" & cursubject & "</rdf:li>" & return
    end repeat
    end try
    set xmpcontentpartthree to xmpcontentpartthree & tab & "</rdf:Bag></dc:subject>" & return
    try
    set title to value of IPTC tag "ObjectName"
    set xmpcontentpartthree to xmpcontentpartthree & tab & "<dc:title><rdf:Alt><rdf:li xml:lang='x-default'>" & title & "</rdf:li></rdf:Alt></dc:title>" & return
    end try
    set xmpcontentpartthree to xmpcontentpartthree & ("</rdf:Description>") & return
    else
    set xmpcontentpartthree to ""
    end if
    --part four. aperture doesn't seem to export anything there
    set xmpcontentpartfour to "<rdf:Description rdf:about='' xmlns:photomechanic='http://ns.camerabits.com/photomechanic/1.0/'>
    </rdf:Description>" & return
    --part five. rating
    set xmpcontentpartfive to "<rdf:Description rdf:about='' xmlns:xap='http://ns.adobe.com/xap/1.0/'>" & return
    try
    set Rating to main rating
    set xmpcontentpartfive to xmpcontentpartfive & tab & "<xap:Rating>" & Rating & "</xap:Rating>" & return
    end try
    set xmpcontentpartfive to xmpcontentpartfive & "</rdf:Description>" & return
    --join everything
    set xmptext to xmpheader & xmpcontentpartone & xmpcontentparttwo & xmpcontentpartthree & xmpcontentpartfour & xmpcontentpartfive & xmpfooter
    --write file
    my writexmpFile(xmptext, xmpPath)
    end if
    end tell
    end repeat
    display dialog "Processed " & mastercount & " referenced and online image(s)." buttons {"OK"} default button 1
    end tell
    end run
    -- write xmp sidecar file routine
    on writexmpFile(theContents, xmpFileName)
    --tell application "Finder"
    try
    open for access xmpFileName with write permission
    set eof of xmpFileName to 0
    write (theContents) to xmpFileName starting at eof
    close access xmpFileName
    on error
    try
    display dialog xmpFileName
    close access xmpFileName
    end try
    end try
    --end tell
    end writexmpFile
    --this part copied from Brett Gross-------------------------------------------------------------------------- --------------------------------
    on getLibPath()
    tell application "System Events" to set p_libPath to value of property list item "LibraryPath" of property list file ((path to preferences as Unicode text) & "com.apple.aperture.plist")
    if ((offset of "~" in p_libPath) is not 0) then
    -- set p_posix to POSIX file p_libPath
    set p_script to "/bin/echo $HOME"
    set p_homePath to (do shell script p_script)
    set p_offset to offset of "~" in p_libPath
    set p_path to text (p_offset + 1) thru -1 of p_libPath
    set g_libPath to p_homePath & p_path
    else
    set g_libPath to p_libPath
    end if
    end getLibPath
    --end brett gross part

    imigra wrote:
    I've written a script to write xmp sidecar files for referenced and online images (the 2 conditions in the script) of the selected images. I looked for a while at system events and other stuff to be able to write the xmp file, but i'm not a programmer, so in the end i chose the long and dirty way to do it.
    This script will export all iptc expanded fields as aperture does (creating basically the same file). It can be easily adjusted to include other tags, even custom ones.
    Excellent stuff!
    I don't know how to get at the adjustments for images, otherwise those could be included as well.
    They are stored as binary data in the Version XML files at the bottom level of the Library package. You can also have a look around in the ZRKIMAGEADJUSTMENT table, but again the actual settings for each adjustment are in binary form.
    If anyone has the energy to clean this up and make it faster, feel free to do so.
    As far as I can remember, Aperture uses the 'proper' IPTC tag names when accessing them via AppleScript, so you may be able to do a loop through all the IPTC tags for each image, rather than picking out each specific one. But that would need checking. The EXIFTools site is a good place to find out about the different ways that IPTC data can be described.
    Next, I'm going to try to write a script to do the opposite, import xmp sidecars for imported online and referenced files.
    Don't rush unless you feel like it - I've already started planning out a free (as in beer and speech) XMP importer with a GUI so that you can choose how to map the XMP CORE tags that don't exist in Aperture. You've given me an extra idea, though - if we can decide on a set of custom tags, my importer could map the XMP CORE tags to them and your exporter could export those tags.
    Thanks for the work!
    Ian
    P.S. I'll check through your script tomorrow, some of the database tables changed between 1.5.6 and 2.0, so you might need to add in a version check to be really thorough.

  • How to save metadatas in RAW files (and not in external .XMP sidecar file)

    Hello,
    I would like to save metadatas (for example keywords) inside the RAW files, and not in external .XMP sidecar file.
    How to do this in Lightroom ?
    Thanks
    Josh
    PS: is XMP a file format (= .XMP files) or a metadata format that can be embedded either in a .XMP sidecar file or in the RAW itself ?

    MarvinFoster wrote:
    It's a horridly named catalog setting since if you are using DNG you don't have XMP files but it does the same thing, it updates the dng with the catalog settings.
    XMP does not mean XMP FILES per se.
    XMP is a metadata format/standard. so it´s not horrible named but simply missunderstood. 
    http://en.wikipedia.org/wiki/Extensible_Metadata_Platform
    XMP can be used in several file formats such as PDF, JPEG, JPEG 2000, JPEG XR, GIF, PNG, HTML, TIFF, Adobe Illustrator, PSD, MP3, MP4, Audio Video Interleave, WAV, RF64, Audio Interchange File Format, PostScript, Encapsulated PostScript, and proposed for DjVu. In a typical edited JPEG file, XMP information is typically included alongside Exif and IPTC Information Interchange Model data.

  • Importing metadata from XMP sidecar files into Aperture 2.0?

    Has anybody found a way to to do this? It appears that the metadata stored in the XMP sidecar files created by Photoshop and Bridge is ignored by Aperture when it imports images. That is pretty much a show stopper when it comes to using Aperture for asset management.

    The XMP import capability is limited to metadata/IPTC type info - NOT ACR adjustments and such - those values are specific and make no sense to Aperture. This is true in reverse as well - ACR/Bridge/LR/NX2, etc, etc may pickup IPTC type metadata from XMP or embedded values but NO software will translate adjustment values from another piece of software that are stored ad metadata.
    RB

Maybe you are looking for

  • Can't get icloud to restore after crash from ios 8.1 update, says server not avaible, any suggestions?

    Had ipad2 crash during ios 8.1 update, tried different things to make it work, ended up booting as new.  Tried on a couple different days to restore from clould and it says server  not avaible, would love to get the info back, any suggestions?

  • Error compiling Java file

    Hi, I have a Java file which is a basic diary function, but I cannot get it to compile as it seems to have a problem with the date class (cannot resolve symbol error). I am new to java and any tips/suggestions would be helpful. Here is the code: impo

  • How can I use two OID realms in an application in Jdev 10.1.2

    hello, We have an application in jdeveloper 10.1.2. We are using OID with jazn The users of the application are in two different realms. Right now, the application can se the users on the default realm of the OID to authenticate them, but cannot se t

  • "Please Reset Your Computer" Error.  Need help!!!!

    I have an iMac, G3 400 Megahertz processor. I'm running Tiger, and I downloaded the new update. Three times today I have gotten a "Please reset your computer. Hold in the power button for a few seconds to reset" or something around those lines. I hel

  • Question about role query

    Hi all, I have created a rolequery and i made it as PUBLIC. But when i go to fieldmapping and then selected the rolename radio button and when i tried to see the list in drop down box, i could not see my rolequery. Did i miss anything? Let me know if