Read data from the zbMATH Open API https://api.zbmath.org/docs and feed it to the OAI-PMH server https://oai.portal.mardi4nfdi.de/oai/
Hint for a proper installation:
- navigate to the directory
- execute
pip install -e . - execute
pip install .[test]to install the dependencies for the test
src/swmath2swh: Handles integration with Software Heritage (SWH).zbmath_rest2oai: Ingests metadata into the OAI-PMH server at oai.portal.mardi4nfdi.de/oai/.
The project is containerized and managed via Portainer.
The module zbmath_rest2oai.software_quickstatements converts zbMath software
records into a custom JSON format consumed by the
MathSearch QuickStatements job.
Two JSON files are produced, matching the two update phases described in MaRDIRoadmap issue #173:
| File | Contents |
|---|---|
software_quickstatements_metadata.json |
qP13 (swMath id lookup), Len (label), P29 (homepage), P339 (source code), P226_* (MSC classifications), P1458q13_* (related software), P286q1459_* (standard articles) |
software_quickstatements_references.json |
qP1451 (citing article lookup), P1463q13 (software id) |
qP<id>– find the item whose propertyP<id>equals the value.P<x>q<id>– value is an external id looked up via propertyP<id>; result stored as a wikibase-item value of propertyP<x>.L<lang>/D<lang>– label / description in languagelang.- Multi-valued fields use
_1,_2, … suffixes (the job strips_Nsuffixes where N is a digit sequence).
# Export all software (paged, from id 0)
python -m zbmath_rest2oai.run_software_quickstatements
# Export a single software record (e.g. SageMath, swMath id 825)
python -m zbmath_rest2oai.run_software_quickstatements --id 825
# Only produce the metadata file
python -m zbmath_rest2oai.run_software_quickstatements --phase metadata
# Only produce the references file
python -m zbmath_rest2oai.run_software_quickstatements --phase references
# Write to a specific directory
python -m zbmath_rest2oai.run_software_quickstatements --output-dir /tmp/outThe existing XML/XSLT-based OAI-PMH pipeline is unaffected.
For inquiries, contact support@zbmath.org.