From ee2d4880898415ac960500999ab099ebd8b072d1 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 13 Nov 2026 06:47:42 -0500 Subject: [PATCH] Delegate IDML XMP packet writing to craft-idml --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 4 ++-- crates/idml/src/export/designmap.rs | 6 +----- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a2cb6605..590867691 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1242,10 +1242,10 @@ dependencies = [ [[package]] name = "craft-idml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5f1eb9262#5f1eb926265eb8f7d9dcc11e644115cc0ea57d85" +source = "git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2#1e5fdfdd2b5294d9781fa2257c3d6287af3cd2a2" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5f1eb9262)", - "craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5f1eb9262)", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2)", + "craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2)", "thiserror 2.0.21", ] @@ -1647,7 +1647,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=40525913633942f84b06d4837a8d90534a55d63f#40525913633942f84b06d4837a8d90534a55d63f" +source = "git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2#1e5fdfdd2b5294d9781fa2257c3d6287af3cd2a2" dependencies = [ "quick-xml 0.41.0", "thiserror 2.0.21", @@ -1656,7 +1656,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5f1eb9262#5f1eb926265eb8f7d9dcc11e644115cc0ea57d85" +source = "git+https://github.com/storytold/craft-libs?rev=40525913633942f84b06d4837a8d90534a55d63f#40525913633942f84b06d4837a8d90534a55d63f" dependencies = [ "quick-xml 0.41.0", "thiserror 2.0.21", @@ -1730,7 +1730,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5f1eb9262#5f1eb926265eb8f7d9dcc11e644115cc0ea57d85" +source = "git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2#1e5fdfdd2b5294d9781fa2257c3d6287af3cd2a2" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2021,7 +2021,7 @@ dependencies = [ "craft-prepress", "craft-print", "craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=cc23ffd4d26f3074808e2187d332564817624f8f)", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5f1eb9262)", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2)", "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f23b0f33f0d00b157476533a43cbbcfd901aa1f1)", "designcraft-color", "designcraft-compose", @@ -2103,9 +2103,9 @@ name = "designcraft-idml" version = "0.20.1" dependencies = [ "craft-file-formats", - "craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5f1eb9262)", + "craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2)", "craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=cc23ffd4d26f3074808e2187d332564817624f8f)", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5f1eb9262)", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2)", "designcraft-color", "designcraft-compose", "designcraft-doc", @@ -2222,7 +2222,7 @@ version = "0.20.1" dependencies = [ "craft-docx", "craft-file-formats", - "craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5f1eb9262)", + "craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=1e5fdfdd2)", "craft-rtf", "craft-wordmodel", "craft-xlsx", diff --git a/Cargo.toml b/Cargo.toml index 983e43aaf..a3e4f474e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,10 +16,10 @@ craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "4052591363 craft-designcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "19692b6190465671e41967c75d0cd4c439d0c84c", version = "=0.1.0" } craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" } craft-epub = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" } -craft-idml = { git = "https://github.com/storytold/craft-libs", rev = "5f1eb9262", version = "=0.1.0" } +craft-idml = { git = "https://github.com/storytold/craft-libs", rev = "1e5fdfdd2", version = "=0.1.0" } craft-indd = { git = "https://github.com/storytold/craft-libs", rev = "47bf5650b0d503b97bfb5e841746c4957897d11f", version = "=0.1.0" } craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "cc23ffd4d26f3074808e2187d332564817624f8f", version = "=0.1.0", features = ["tree-render", "tree-text"] } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "5f1eb9262", version = "=0.1.0" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "1e5fdfdd2", version = "=0.1.0" } craft-xml-dtd = { package = "craft-xml", git = "https://github.com/storytold/craft-libs", rev = "f23b0f33f0d00b157476533a43cbbcfd901aa1f1", version = "=0.1.0" } craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" } craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" } diff --git a/crates/idml/src/export/designmap.rs b/crates/idml/src/export/designmap.rs index c09e32d23..6f8c6550e 100644 --- a/crates/idml/src/export/designmap.rs +++ b/crates/idml/src/export/designmap.rs @@ -309,11 +309,7 @@ pub(super) fn metadata_xmp(d: &Document) -> String { use designcraft_doc::vars::format_date; let iso = |t: i64| format!("{}:{:02}Z", format_date(t, "yyyy-MM-ddTHH:mm"), t.rem_euclid(60)); let modified = if d.modified > 0 { d.modified } else { d.created }; - format!( - "\n\n \n \n {}\n {}\n \n \n\n", - iso(d.created), - iso(modified) - ) + craft_idml::xmp_metadata(&iso(d.created), &iso(modified)) } /// A `MojikumiTable` element with its spacing overrides.