internetarchive / internetarchive/openlibrary
Refactor to use pymarc instead of custom MARC parser
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
It might make sense for OpenLibrary to stop maintaining a custom MARC parser when there is a well supported robust open source MARC parser available in [pymarc](https://pypi.org/project/pymarc/). I made the suggestion to switch in [2018](https://github.com/internetarchive/openlibrary/issues/713#issuecomment-355185495) and ([twice](https://github.com/internetarchive/openlibrary/pull/2865#pullrequestreview-344146671)) again in [2020](https://github.com/internetarchive/openlibrary/issues/3390#issuecomment-618580519), but perhaps creating a separate issue will drive some discussion and a decision.
### Proposal & Constraints
Replace `marc_base.py`, `marc_binary.py`, `mnemonics.py`, and `marc_xml.py` with `pymarc`. Review other modules in [openlibrary.catalog.marc ](https://github.com/internetarchive/openlibrary/tree/master/openlibrary/catalog/marc) for other code which can be eliminated.
### Additional context
While it would have been better to do it 5 years ago and avoided all the maintenance effort in the intervening years, it's probably still at net win (and, arguably, "the right thing to do" for the ecosystem).
### Stakeholders
@hornc @mekarpeles @cclauss
Contributor guide
Assessment
This issue has not been assessed yet.