Skip to content

loupekind xmp read

Description

Bring a rating or label you changed in Lightroom Classic back into LoupeKind as the frame's verdict. LoupeKind remembers what it last wrote to each .xmp sidecar, so read finds the sidecars whose rating or label differs from that and takes each change in. It changes LoupeKind's records only. No sidecar and no original is written. The studio's Read XMP button runs the same read, and settles frames decided in both places one at a time instead of with --prefer.

Sidecar → verdict mapping:

In the sidecar Verdict
4 or 5 stars keep
2 or 3 stars maybe
1 star, or a rating of -1 (the reject flag some tools write) reject
no rating, or 0 no change, and named as cleared

The rating decides. A label decides only when the rating hasn't changed, and only when it's one of the three words LoupeKind writes: Keep, Maybe or Reject. Any other label, such as a colour label, changes nothing and its sidecar is named, on this read and each one after. The stars also become the frame's star rating in LoupeKind, replacing one you set in the studio.

A verdict read from Lightroom is your decision. It's recorded as an override, dated when it was read, so a re-cull keeps it and reset frame undoes it. The record also notes that it came from Lightroom. That holds when the rating agrees with LoupeKind's own verdict too: you rated the frame, so the verdict is now yours. A reset leaves your stars in Lightroom: the next write treats them as yours and keeps them, listing the frame where they differ from LoupeKind's verdict. A later read leaves them alone until you change them in Lightroom.

A sidecar LoupeKind never wrote is read as it stands. So on a folder you rated in Lightroom first, the first read takes every rated frame's verdict from Lightroom, and LoupeKind's own verdicts give way to them.

What LoupeKind wrote itself isn't read as your decision, including in sidecars from versions that kept no record of what they wrote. A sidecar still exactly as LoupeKind writes it is left out. So is one Lightroom has since saved to, while it still holds the label and the stars LoupeKind writes for one verdict: Keep with 5, Maybe with 3 or Reject with 1. Change the stars there and they're read.

A frame you decided in both places is listed, not guessed. That's a frame you set in LoupeKind and then gave a different verdict in Lightroom, including one whose sidecar already held your LoupeKind verdict. read names it with both verdicts and leaves it as it is. --prefer lightroom or --prefer loupekind settles every such frame in one run. Preferring LoupeKind keeps your verdict there, and the next xmp write writes LoupeKind's verdict to the sidecar without reporting it. Where both places say the same, there's nothing to settle.

A verdict that came from an earlier read isn't one you set in LoupeKind, so a new change in Lightroom replaces it without being listed.

After a read, the next write reports no conflict for what was read. A colour label is still reported, as it wasn't read. xmp write also leaves your stars in the sidecar while they say the verdict LoupeKind holds: 4 stars stay 4, though LoupeKind itself writes 5 for a keep. Change the verdict in LoupeKind, or reset the frame, and LoupeKind's stars replace them.

A frame whose verdict is read counts as one you've seen, so the studio's Not seen filter leaves it out. A dry run marks nothing.

A sidecar it can't read is skipped and named, with the reason, and the rest are still read. That's one it isn't allowed to open, or one written in a form it can't read safely, such as xmp:Rating is set twice. The second are the same reasons xmp write leaves one alone.

A RAW and JPEG pair shares one sidecar, so its rating is read for both frames. If either frame is one you decided in both places, neither is changed until you settle it. xmp write puts only one of the pair's verdicts in the sidecar, the frame whose name sorts last, so a different verdict on the other frame stays in LoupeKind alone.

After records restore, the next read is a dry run. The restored records can be older than the sidecars, so a sidecar LoupeKind has written since looks changed, and read would take what's in it as your decision. It says so, lists what it would read, and changes nothing. Check the list, then run read --confirm to read it, or xmp write --force to put the restored verdicts back in the sidecars instead. Each read after a restore is a dry run until one runs with --confirm.

This works with Lightroom Classic, which keeps a RAW frame's rating in the .xmp beside it once "Automatically write changes into XMP" is on, or after Metadata > Save Metadata to File. Cloud Lightroom keeps its ratings in the cloud, so there is nothing here for read to find. The mapping is built from Adobe's XMP specification and hasn't been checked against a real catalog yet.

read runs only when you ask. Nothing is read when a shoot opens.

Usage

loupekind xmp read [flags]

Flags

Flag Description Default
--shoot, -s Shoot directory the shoot you're in
--dry-run Report what would be read, and change nothing false
--prefer Settle every frame decided in both places for one side: lightroom or loupekind neither
--confirm Read a shoot whose records were restored since the last read, once you've checked the dry run false
--output Output format: text or json text

Example

loupekind xmp read --shoot ~/shoots/smith-wedding
Read 41 verdict(s) from the XMP sidecars in /home/you/shoots/smith-wedding: 12 keep, 9 maybe, 20 reject. 33 of them changed the verdict LoupeKind held.
They're recorded as your own decisions, so a re-cull keeps them.
Left 2 frame(s) you decided one way in LoupeKind and another in Lightroom:
  IMG_2043.ARW: reject in LoupeKind, maybe in Lightroom
  IMG_2051.ARW: keep in LoupeKind, reject in Lightroom
--prefer lightroom or --prefer loupekind settles them all.

With nothing changed since the last write or read:

Nothing in /home/you/shoots/smith-wedding's XMP sidecars has changed since LoupeKind last wrote or read them.

JSON output

With --output json, every list is left out when it's empty:

Field Holds
shoot the shoot's name
read each frame read: frame, from (its verdict before, left out if it had none), to, and rating (left out where a label or the reject flag decided)
conflicts each frame decided in both places: frame, loupekind, lightroom
keptLoupeKind frames settled for LoupeKind by --prefer loupekind
cleared sidecars whose rating was cleared
unrecognised sidecars whose rating or label isn't a verdict
skipped each sidecar it couldn't read: sidecar and reason
dryRun true for a dry run
heldAfterRestore true when it was a dry run because the records were restored since the last read

None of these is a failure, so read still exits 0. A script that needs to know checks conflicts.

Not available over MCP

xmp read changes your decisions, so it's kept off the MCP surface, like xmp write.