[librecat-dev] fixes and tests
Rolschewski, Johann
Johann.Rolschewski at sbb.spk-berlin.de
Tue Sep 6 13:29:31 CEST 2016
Hi,
> i think the example of the use of combination of fixes and tests, would be
> enough if an example of a search and replace fix would be used:
>
> if marc_match('100a','AWrongSpelledName')
> marc_set('100a','CorrectlySpelledName')
> end
yes, you could use a fix like this:
do marc_each()
if marc_match(100a,"OldName")
marc_set(100a,"NewName")
end
if marc_match(245a,"OldTitle")
marc_set(245a,"NewTitle")
end
end
You can add some "log"-fixes <https://metacpan.org/pod/Catmandu::Fix::log> to generate some output, but it will not fit your requirements... I would recommend to write a script for this task using a more "low level" module like MARC::Record <https://metacpan.org/pod/MARC::Record>.
Regards,
Johann
More information about the librecat-dev
mailing list