generates single record MARC files
takes a given binary MARC records file (containing multiple MARC records) and splits it into single binary MARC records files, whereby the file names will be constructed with following pattern:
[ID].mrc
whereby ID will be constructed of:
[PREFIX]-[SOURCE ID]-[MARC RECORD ID FROM 001]
-
(optionally) install pip for Python 3.x:
sudo apt-get install python3-pip
-
install requirements with pip:
sudo -H pip3 install -r requirements.txt
singlemarcrecord.py [-h] [-prefix PREFIX] [-source_id SOURCE_ID]
[-input_file INPUT_FILE]
[-output_folder OUTPUT_FOLDER]
optional arguments:
-h, --help show this help message and exit
-prefix PREFIX set prefix for id generation
-source_id SOURCE_ID set source id for id generation
-input_file INPUT_FILE the input MARC file
-output_folder OUTPUT_FOLDER the output folder for the single record MARC files
./singlemarcrecord.py -prefix [PREFIX] -source_id [SOURCE ID] -input_file [INPUT BINARY MARC FILE] -output_folder [OUTPUT FOLDER FOR SINGLE MARC RECORD FILES]