MARC21 to MarcXchange formatted ld-JSON and reverse converter based on pymarc. Also converts to MARC-XML.
Clone this Repository, cd into it and run:
python3 -m pip install --user .
pymarc2jsonl, json2marc21 and json2marcxml don't use any cmdline arguments, they only use stdout and stdin.
e.g.:
pymarc2jsonl < binary_marc21.mrc > line_delmited_json.ldj
json2marc21 < line_delimited_json.ldj > binary_marc21.mrc
json2marcxml < line_delimited_json.ldj > xml_marc.xml
this package comes with tests, run via:
python3 -m pytest tests/