Open mjordan opened 8 years ago
:thumbsup:
In the composerized version:
<?php
require 'vendor/autoload.php';
use Scriptotek\Marc\Collection;
$collection = Collection::fromFile('input_file.mrc');
foreach ($collection->records as $record) {
$field245a = $record->get('245$a');
echo $field245a[0] ."\n";
}
http://pear.php.net/package/File_MARC (also available via composer) provides parsing of binary and XML MARC data. A minimalistic example of its use is:
MIK mappings could take the form
"245a","<titleInfo><title>How to migrate stuff</title></titleInfo>",
etc.