Commit 1226e9d
committed
Add XMP destination strip policies & persistence
Introduce explicit destination XMP handling and a bounded persistence helper. Adds enums XmpDestinationEmbeddedMode and XmpDestinationSidecarMode and new ExecutePreparedTransferFileOptions fields to control preserve/strip behavior for embedded XMP and sibling .xmp sidecars. propagate a strip_existing_xmp flag throughout JPEG/TIFF/PNG/WebP/JP2/JXL planning and emit paths so existing embedded XMP can be removed when sidecar-only writeback is selected for supported formats. Implement file helpers (path_exists, write_file_bytes, find_existing_xmp_sidecar_path), TIFF payload scrubbing, and related rewrite logic to remove XMP carriers as requested.
Add persist_prepared_transfer_file_result and its options/result structs to let hosts persist edited output, write generated XMP sidecars, and optionally remove a stale destination sidecar without reimplementing CLI/python logic. execute_prepared_transfer_file now computes cleanup actions for destination sidecars and applies strip policies during planning/emit.
Expose the new modes to the Python CLI and wrapper: new --xmp-destination-embedded and --xmp-destination-sidecar flags, wiring the Python wrapper to call transfer_file/unsafe_transfer_file when persisting output and to pass the new options through. Various minor messaging and validation updates accompany the new behavior.1 parent 0ffcf8d commit 1226e9d
File tree
8 files changed
+2405
-326
lines changed- docs
- src
- include/openmeta
- openmeta
- python
- openmeta/python
- src
- tools
- tests
8 files changed
+2405
-326
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| 249 | + | |
| 250 | + | |
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
| |||
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
268 | 288 | | |
269 | 289 | | |
270 | 290 | | |
271 | 291 | | |
272 | | - | |
| 292 | + | |
| 293 | + | |
273 | 294 | | |
274 | 295 | | |
275 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| 455 | + | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
| |||
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
| 464 | + | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| |||
476 | 478 | | |
477 | 479 | | |
478 | 480 | | |
| 481 | + | |
479 | 482 | | |
480 | 483 | | |
481 | 484 | | |
482 | 485 | | |
483 | 486 | | |
484 | 487 | | |
485 | 488 | | |
| 489 | + | |
486 | 490 | | |
487 | 491 | | |
488 | 492 | | |
| |||
1122 | 1126 | | |
1123 | 1127 | | |
1124 | 1128 | | |
| 1129 | + | |
1125 | 1130 | | |
1126 | 1131 | | |
1127 | 1132 | | |
| |||
1149 | 1154 | | |
1150 | 1155 | | |
1151 | 1156 | | |
| 1157 | + | |
1152 | 1158 | | |
1153 | 1159 | | |
1154 | 1160 | | |
| |||
1168 | 1174 | | |
1169 | 1175 | | |
1170 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1171 | 1190 | | |
1172 | 1191 | | |
1173 | 1192 | | |
1174 | 1193 | | |
1175 | 1194 | | |
1176 | 1195 | | |
1177 | 1196 | | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1178 | 1201 | | |
1179 | 1202 | | |
1180 | 1203 | | |
| |||
1190 | 1213 | | |
1191 | 1214 | | |
1192 | 1215 | | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1193 | 1230 | | |
1194 | 1231 | | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
1195 | 1267 | | |
1196 | 1268 | | |
1197 | 1269 | | |
| |||
0 commit comments