From 4659556218abb12ebf5f9097b8885e8773e69c76 Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Fri, 12 Jul 2024 09:34:57 +0200 Subject: [PATCH 1/2] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa8a6726c..6e81e2c6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - [538](https://github.com/thoth-pub/thoth/issues/538) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. +### Fixed + - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). + ## [[0.12.6]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.6) - 2024-06-17 ### Fixed - [#513](https://github.com/thoth-pub/thoth/issues/513) - Expand DOI regex to include `+`, `[`, and `]` From c74f6035a2267f05169c7f95589c3421f578c200 Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Fri, 12 Jul 2024 09:57:22 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Update=20=20code=20for=20Work?= =?UTF-8?q?=20Landing=20Page=20in=20all=20ONIX=20exports=20(except=20Googl?= =?UTF-8?q?e=20Books=20and=20Thoth)=20from=2001=20(Publisher=E2=80=99s=20c?= =?UTF-8?q?orporate=20website)=20to=2002=20(Publisher=E2=80=99s=20website?= =?UTF-8?q?=20for=20a=20specified=20work).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thoth-export-server/src/xml/onix21_ebsco_host.rs | 6 +++--- thoth-export-server/src/xml/onix21_proquest_ebrary.rs | 6 +++--- thoth-export-server/src/xml/onix3_jstor.rs | 6 +++--- thoth-export-server/src/xml/onix3_oapen.rs | 6 +++--- thoth-export-server/src/xml/onix3_overdrive.rs | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/thoth-export-server/src/xml/onix21_ebsco_host.rs b/thoth-export-server/src/xml/onix21_ebsco_host.rs index c718adb38..cf8b9ae71 100644 --- a/thoth-export-server/src/xml/onix21_ebsco_host.rs +++ b/thoth-export-server/src/xml/onix21_ebsco_host.rs @@ -201,7 +201,7 @@ impl XmlElementBlock for Work { websites.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1028,7 +1028,7 @@ mod tests { assert!(output .contains(r#" urn:uuid:00000000-0000-0000-aaaa-000000000001"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1129,7 +1129,7 @@ mod tests { // No subtitle supplied (within Thoth UI this would automatically update full_title) assert!(!output.contains(r#" Book Subtitle"#)); // No landing page supplied - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix21_proquest_ebrary.rs b/thoth-export-server/src/xml/onix21_proquest_ebrary.rs index edaa72661..dadc05fc1 100644 --- a/thoth-export-server/src/xml/onix21_proquest_ebrary.rs +++ b/thoth-export-server/src/xml/onix21_proquest_ebrary.rs @@ -203,7 +203,7 @@ impl XmlElementBlock for Work { websites.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1020,7 +1020,7 @@ mod tests { assert!(output .contains(r#" urn:uuid:00000000-0000-0000-aaaa-000000000001"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1118,7 +1118,7 @@ mod tests { // No subtitle supplied (within Thoth UI this would automatically update full_title) assert!(!output.contains(r#" Book Subtitle"#)); // No landing page supplied - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix3_jstor.rs b/thoth-export-server/src/xml/onix3_jstor.rs index 60233de54..ec518211d 100644 --- a/thoth-export-server/src/xml/onix3_jstor.rs +++ b/thoth-export-server/src/xml/onix3_jstor.rs @@ -366,7 +366,7 @@ impl XmlElementBlock for Work { supplies.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -958,7 +958,7 @@ mod tests { assert!(output.contains(r#" 09"#)); assert!(output.contains(r#" OA Editions"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1040,7 +1040,7 @@ mod tests { assert!(!output.contains(r#" 01"#)); assert!(!output.contains(r#" 19991231"#)); // No landing page supplied: only one SupplyDetail block, linking to PDF download - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix3_oapen.rs b/thoth-export-server/src/xml/onix3_oapen.rs index 688f5b86d..0a6cc4ac6 100644 --- a/thoth-export-server/src/xml/onix3_oapen.rs +++ b/thoth-export-server/src/xml/onix3_oapen.rs @@ -362,7 +362,7 @@ impl XmlElementBlock for Work { supplies.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1132,7 +1132,7 @@ mod tests { assert!(output.contains(r#" 09"#)); assert!(output.contains(r#" OA Editions"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1195,7 +1195,7 @@ mod tests { assert!(!output.contains(r#" 19"#)); assert!(!output.contains(r#" 1999"#)); // No landing page supplied: only one SupplyDetail block, linking to PDF download - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix3_overdrive.rs b/thoth-export-server/src/xml/onix3_overdrive.rs index 0f90f4397..57dfc7646 100644 --- a/thoth-export-server/src/xml/onix3_overdrive.rs +++ b/thoth-export-server/src/xml/onix3_overdrive.rs @@ -437,7 +437,7 @@ impl XmlElementBlock for Work { supplies.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1314,7 +1314,7 @@ mod tests { assert!(output.contains(r#" 09"#)); assert!(output.contains(r#" OA Editions"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1386,7 +1386,7 @@ mod tests { // No place supplied assert!(!output.contains(r#" León, Spain"#)); // No landing page supplied: only one SupplyDetail block, linking to ebook download - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# ));