Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slub/pymarc2jsonl
MARC21 to MarcXchange formatted ld-JSON and reverse converter based on pymarc
https://github.com/slub/pymarc2jsonl
code4lib line-delimited-json marc21 pymarc python3-6 six
Last synced: 27 days ago
JSON representation
MARC21 to MarcXchange formatted ld-JSON and reverse converter based on pymarc
- Host: GitHub
- URL: https://github.com/slub/pymarc2jsonl
- Owner: slub
- License: apache-2.0
- Created: 2020-06-16T13:54:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-21T11:45:04.000Z (over 1 year ago)
- Last Synced: 2024-04-14T22:49:13.797Z (8 months ago)
- Topics: code4lib, line-delimited-json, marc21, pymarc, python3-6, six
- Language: Python
- Size: 43.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pymarc2jsonl
MARC21 to MarcXchange formatted ld-JSON and reverse converter based on pymarc. Also converts to MARC-XML.## requirements
- [es2json](https://github.com/slub/es2json)
- [six](https://github.com/benjaminp/six)
- [pymarc](https://gitlab.com/pymarc/pymarc)## Installation
Clone this Repository, cd into it and run:
```
python3 -m pip install --user .
```
## usage
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
```## Tests
this package comes with tests, run via:```
python3 -m pytest tests/
```