Skip to content

Feature Request - Merge Photoscribe .XMP results into .DNG file headers #24

Description

@ccWhiteDog

A quirk of Adobe Lightroom Classic is that the library module doesn't automatically ingest Photoscribe results for .DNG files even after "read metadata from file" is executed. I have learned that to see the Photoscribe results in the Lightroom interface, these data need to be extracted from the .XMP files created by Photoscribe and merged into the .DNG file headers themselves. A Windows Powershell script was a hack for me to do this, but it would be a nice feature to have in a future version of Photoscribe as an option. Unfortunately, it is beyond my skill to create a fork and code this up myself. Therefore, I humbly post this here as a feature request for some able and thoughtful developer.

This post-Photoscribe PowerShell script (on Windows) worked for me (thanks to Gemini for code refinements and fixes):

---------------START OF SCRIPT ----------------

Set the path to your photo directory

$Folder = "<PATH TO THE FOLDER WITH .DNG and .XMP FILES GOES HERE>"

Change directory to the target folder

Set-Location -Path $Folder

Loop through all .xmp sidecar files in the directory

Get-ChildItem -Filter "*.xmp" | ForEach-Object {
$xmpFile = $_.FullName
$dngFile = [System.IO.Path]::ChangeExtension($xmpFile, ".dng")

# Check if a corresponding .dng file exists
if (Test-Path $dngFile) {
    Write-Host "Processing $($_.Name) -> $([System.IO.Path]::GetFileName($dngFile))..."
    
    # Single-pass ExifTool execution using direct tag copying
    exiftool -m -tagsfromfile "$xmpFile" `
      "-XMP-dc:Title" `
      "-XMP-dc:Description" `
      "-XMP-dc:Subject" `
      "-XMP-lr:HierarchicalSubject" `
      -overwrite_original "$dngFile"
}

}

Write-Host "Metadata merge complete!"

------------- END OF SCRIPT ------------------

Once the script completes, you then need to select all the affected .DNG files in your Lightroom Library interface and execute the command "read metadata from file".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions