Skip to content

Commit

Permalink
add prefixes with conditions on whether an object is an article or a …
Browse files Browse the repository at this point in the history
…software
  • Loading branch information
Mazztok45 committed Mar 4, 2024
1 parent 4042119 commit 518cd7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/zbmath_rest2oai/writeOai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down

0 comments on commit 518cd7c

Please sign in to comment.