Commit a0e373f
committed
Add XMP sidecar handling and conflict policy
Introduce explicit XMP conflict and sidecar handling for transfer preparation and execution.
Key additions:
- New enums: XmpConflictPolicy, XmpExistingSidecarMode, XmpExistingSidecarPrecedence, XmpWritebackMode.
- Prepare/execute API extensions: PrepareTransferFileOptions/Result and ExecutePreparedTransferFileOptions/Result now carry sidecar paths, status, messages and generated_xmp_sidecar bytes; PrepareTransferRequest gains xmp_conflict_policy.
- Support to discover, load and decode existing sibling .xmp sidecars (load_existing_xmp_sidecar_bytes, decode_existing_xmp_sidecar_into_store) and to merge them into the MetaStore when requested, with configurable precedence vs source-embedded XMP.
- Portable XMP generation updated to honor conflict policy: claim/owner map replaces the simple key set and emits properties in ordered passes (EXIF/Existing/IPTC) according to CurrentBehavior/ExistingWins/GeneratedWins.
- Prepared bundle now captures generated portable XMP bytes and execute_prepared_transfer_file can emit sidecar output and strip embedded XMP blocks when sidecar writeback is requested.
- Python CLI, wrapper and module bindings extended: new arguments (--xmp-include-existing-sidecar, --xmp-existing-sidecar-precedence, --xmp-conflict-policy, --xmp-writeback), corresponding OpenMeta enums exposed to Python, and logic to write generated .xmp sidecars alongside edited outputs.
- Documentation updated (README and docs/metadata_transfer_plan.md) describing the new knobs and behaviors.
These changes make XMP generation, merging and writeback behavior explicit and configurable without implementing a full sync engine.1 parent a6cdc79 commit a0e373f
11 files changed
Lines changed: 1683 additions & 138 deletions
File tree
- docs
- src
- include/openmeta
- openmeta
- python
- openmeta/python
- src
- tools
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| |||
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
226 | 238 | | |
| 239 | + | |
| 240 | + | |
227 | 241 | | |
228 | 242 | | |
| 243 | + | |
| 244 | + | |
229 | 245 | | |
230 | 246 | | |
231 | 247 | | |
232 | 248 | | |
233 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
234 | 258 | | |
235 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
236 | 265 | | |
237 | 266 | | |
238 | 267 | | |
| |||
274 | 303 | | |
275 | 304 | | |
276 | 305 | | |
277 | | - | |
| 306 | + | |
278 | 307 | | |
279 | 308 | | |
280 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| 397 | + | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
| |||
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| 418 | + | |
| 419 | + | |
416 | 420 | | |
417 | 421 | | |
418 | 422 | | |
| |||
896 | 900 | | |
897 | 901 | | |
898 | 902 | | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
899 | 916 | | |
900 | 917 | | |
901 | 918 | | |
902 | 919 | | |
903 | 920 | | |
904 | 921 | | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
905 | 927 | | |
906 | 928 | | |
907 | 929 | | |
| |||
913 | 935 | | |
914 | 936 | | |
915 | 937 | | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
916 | 942 | | |
917 | 943 | | |
918 | 944 | | |
| |||
1135 | 1161 | | |
1136 | 1162 | | |
1137 | 1163 | | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
1138 | 1170 | | |
1139 | 1171 | | |
1140 | 1172 | | |
1141 | 1173 | | |
1142 | 1174 | | |
| 1175 | + | |
| 1176 | + | |
1143 | 1177 | | |
1144 | 1178 | | |
1145 | 1179 | | |
| |||
1150 | 1184 | | |
1151 | 1185 | | |
1152 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
1153 | 1192 | | |
1154 | 1193 | | |
1155 | 1194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
17 | 31 | | |
18 | 32 | | |
19 | 33 | | |
| |||
52 | 66 | | |
53 | 67 | | |
54 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| |||
86 | 103 | | |
87 | 104 | | |
88 | 105 | | |
| 106 | + | |
| 107 | + | |
89 | 108 | | |
90 | 109 | | |
91 | 110 | | |
| |||
0 commit comments