https://github.com/slub/addfullrecord
add fullrecord field into given finc Solr schema conform line-delimited JSON
https://github.com/slub/addfullrecord
cli command-line-tool finc-solr-schema json line-delimited-json marc marc21 python
Last synced: about 1 month ago
JSON representation
add fullrecord field into given finc Solr schema conform line-delimited JSON
- Host: GitHub
- URL: https://github.com/slub/addfullrecord
- Owner: slub
- License: apache-2.0
- Created: 2017-11-15T12:39:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-09T14:43:22.000Z (over 8 years ago)
- Last Synced: 2025-01-25T07:09:04.467Z (over 1 year ago)
- Topics: cli, command-line-tool, finc-solr-schema, json, line-delimited-json, marc, marc21, python
- Language: Python
- Size: 8.79 KB
- Stars: 2
- Watchers: 7
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# addfullrecord
add fullrecord field into given finc Solr schema conform line-delimited JSON
reads a finc Solr schema conform line-delimited JSON (from stdin), (tries to) retrieves the binary MARC record for each record (by a given folder containing single MARC record files (that can be matched by id)), writes the record into the "fullrecord" field and prints out the result to stdout
## requirements
* [argparse](https://docs.python.org/3/library/argparse.html#module-argparse)
* [pymarc](https://github.com/edsu/pymarc)
### install requirements
1. (optionally) install [pip](https://pip.pypa.io/) for Python 3.x:
sudo apt-get install python3-pip
2. install requirements with pip:
sudo -H pip3 install -r requirements.txt
## usage
addfullrecord.py [-h] [-marc_record_folder MARC_RECORD_FOLDER]
optional arguments:
-h, --help show this help message and exit
-marc_record_folder MARC_RECORD_FOLDER set MARC record (containing single MARC record files)
### usage example
./addfullrecord.py -marc_record_folder [PATH TO YOUR MARC RECORD FOLDER CONTAINING SINGLE MARC RECORD FILES] < [PATH TO YOUR FINC SOLR SCHEMA CONFORM LINE-DELIMITED JSON FILE] > [PATH TO THE RESULT FINC SOLR SCHEMA CONFORM LINE-DELIMITED JSON FILE]