Write ratings, keywords, hierarchy and IPTC to XMP

Sidecars and JPEG exports now carry xmp:Rating, xmp:Label, dc:subject and
lr:hierarchicalSubject plus the IPTC core, and importing a sidecar applies its
cataloguing fields independently of its develop settings. Hierarchical keywords
keep leaf terms in the flat list, so search and filters are unchanged.
This commit is contained in:
2026-12-02 03:30:57 +00:00
parent fa0a7e64ef
commit 7f0838156b
11 changed files with 808 additions and 27 deletions
+24
View File
@@ -241,6 +241,21 @@ export interface Edits {
crop: CropState;
}
/** IPTC core fields, written to XMP so a catalog is readable elsewhere. */
export interface IptcFields {
/** Single-line summary, the "who/what" a picture desk reads first. */
headline?: string;
/** Who gets the credit for the image. */
credit?: string;
/** Agency or organisation that supplied it. */
source?: string;
city?: string;
state?: string;
country?: string;
/** Sublocation inside the city. */
location?: string;
}
export interface PhotoMeta {
camera?: string;
lens?: string;
@@ -269,6 +284,8 @@ export interface MetadataPreset {
creator?: string;
copyright?: string;
keywords: string[];
keywordPaths?: string[];
iptc?: IptcFields;
}
export interface SmartCollection {
@@ -305,6 +322,13 @@ export interface PhotoRecord {
flag: Flag;
color: ColorLabel;
keywords: string[];
/**
* Full hierarchical paths (`A > B > C`). The leaf of each is also in
* `keywords`, so search and filters do not need to know about the tree.
*/
keywordPaths?: string[];
/** IPTC core, edited in the Metadata panel and written to XMP. */
iptc?: IptcFields;
title?: string;
caption?: string;
creator?: string;