https://github.com/slub/marc2jsonl
simple MARC21 to Line-delimited JSON converter using xbib/marc
https://github.com/slub/marc2jsonl
java json-ld marc xbib
Last synced: 10 months ago
JSON representation
simple MARC21 to Line-delimited JSON converter using xbib/marc
- Host: GitHub
- URL: https://github.com/slub/marc2jsonl
- Owner: slub
- License: apache-2.0
- Created: 2017-09-26T10:40:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-09-20T06:51:16.000Z (almost 4 years ago)
- Last Synced: 2025-03-25T18:41:14.993Z (over 1 year ago)
- Topics: java, json-ld, marc, xbib
- Language: Java
- Size: 53.7 KB
- Stars: 7
- Watchers: 7
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# marc2jsonl
simple tool to convert (binary) MARC21, MarcXML or MabXML files to line-delimited JSON which can also be used to index data into ElasticSearch. It makes use of xbib/marc Java library.
dependencies:
* https://github.com/xbib/marc/
* http://commons.apache.org/proper/commons-cli/
build:
mvn clean package
or
make
install:
su
make install
run:
marc2jsonl
valid options are:
-i --input: (binary) MARC21, MarcXML or MabXML input file
-o --output: output directory
-mabxml --mabxmlinput: input is MabXML
-marcxml --marcxmlinput: input is MarcXML
-n --indexname: name of the ElasticSearch Index
-t --type: name of the ElasticSearch datatype
examples:
marc2jsonl -i input.mrc -o output.jsonl -n test -t marc
transformes the marc data from input.mrc to line-delimited json and saves to the file output.jsonl
marc2jsonl < input.mrc | esbulk -index test -type marc
transforms the marc data from stdin and pipes it to esbulk (https://github.com/miku/esbulk) which indexes the data and uploads it to an ElasticSearch-Server
pv input.mrc | marc2jsonl > output.jsonl
watch the progress with pipeview (http://www.ivarch.com/programs/pv.shtml) and transform the marc data from input.mrc to the file output.jsonl