From 518cd7ca7ef94387071872ebaccfbad3f7ec6018 Mon Sep 17 00:00:00 2001 From: Mazztok45 Date: Mon, 4 Mar 2024 17:02:12 +0100 Subject: [PATCH] add prefixes with conditions on whether an object is an article or a software --- src/zbmath_rest2oai/writeOai.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/zbmath_rest2oai/writeOai.py b/src/zbmath_rest2oai/writeOai.py index 72b3fb8..3d8b572 100644 --- a/src/zbmath_rest2oai/writeOai.py +++ b/src/zbmath_rest2oai/writeOai.py @@ -9,13 +9,16 @@ def write_oai(x, api_source): + prefix='oai:zbmath.org:' + if 'software' in api_source: + prefix='oai:swmath.org:' test_xml = getAsXml.final_xml2(x, api_source) files = { "item": ( None, json.dumps( { - "identifier": x, + "identifier": prefix+x, "deleteFlag": False, "ingestFormat": "zbmath_rest_api", }