MARC::Moose::Formater::AuthorityUnimarcToMarc21 - Convert authority record from UNIMARC to MARC21
version 1.0.46
Read a authorities UNIMARC ISO2709 file and dump it to STDOUT in text transformed into MARC21:
my $reader = MARC::Moose::Reader::File::Iso2709->new( file => 'authority-unimarc.iso' ); my $formater = MARC::Moose::Formater::AuthorityUnimarcToMarc21->new(); while ( my $unimarc = $reader->read() ) { my $marc21 = $formater->format($unimarc); print $marc21->as('Text'); }
Same with shortcut:
my $reader = MARC::Moose::Reader::File::Iso2709->new( file => 'authority-unimarc.iso' ); while ( my $unimarc = $reader->read() ) { print $unimarc->as('AuthorityUnimarcToMarc21')->as('Text'); }
If you don't want to write a Perl script, you can use the marcmoose command. This way, you can for example convert a ISO 2709 authorities UNIMARC file named unimarc.iso into a ISO 2709 MARC21 file named marc.iso:
unimarc.iso
marc.iso
marcmoose --parser iso2709 --formater iso2709 --converter authorityunimarctomarc21 --output marc.iso unimarc.iso
Frédéric Demians <f.demians@tamil.fr>
This software is copyright (c) 2022 by Frédéric Demians.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MARC::Moose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MARC::Moose
CPAN shell
perl -MCPAN -e shell install MARC::Moose
For more information on module installation, please visit the detailed CPAN module installation guide.