Group
Extension

Matches 25

Catmandu-MARC ( H/HO/HOCHSTEN/Catmandu-MARC-1.33.tar.gz, HOCHSTEN, 2024; MetaCPAN )
Catmandu-MARC/lib/Catmandu/Importer/MARC.pm ( view source; MetaCPAN )
Package that imports MARC data

=head1 SYNOPSIS

    # On the command line

    # Convert MARC to JSON (default)
    $ catmandu convert MARC < /foo/bar.mrc

    # Convert MARC to MARC
    $ catmandu c
or MARCMaker/MARCBreaker records
  MiJ: L<Catmandu::Importer::MARC::MiJ> (MARC in JSON) - a parser for the MARC-in-JSON format
  XML: L<Catmandu::Importer::MARC::XML> - a parser for the MARC XML forma
Catmandu-MARC ( H/HO/HOCHSTEN/Catmandu-MARC-1.33.tar.gz, HOCHSTEN, 2024; MetaCPAN )
Catmandu-MARC/lib/Catmandu/Exporter/MARC/ISO.pm ( view source; MetaCPAN )
ata) = @_;

    if (keys %$data) {
        if ($self->record_format eq 'MARC-in-JSON') {
            $data = $self->_json_to_raw($data);
        }

        if ($data->{$self->record}) {
            my
Catmandu-MARC ( H/HO/HOCHSTEN/Catmandu-MARC-1.33.tar.gz, HOCHSTEN, 2024; MetaCPAN )
Catmandu-MARC/lib/Catmandu/Exporter/MARC/MiJ.pm ( view source; MetaCPAN )
=head1 NAME

Catmandu::Exporter::MARC::MiJ - Exporter for MARC records to MARC in JSON

=head1 SYNOPSIS

    # From the command line
    $ catmandu convert MARC --type XML to MARC --type MiJ < /foo/ba
le => "/foo/bar.xml" , type => 'XML');
    my $exporter = Catmandu->exporter('MARC', file => "bar.json", type => 'MiJ' );

    $exporter->add($importer);
    $exporter->commit;

=head1 CONFIGURATION

tmandu::Counter>, and L<Catmandu::Logger> for a full list of methods.

=head1 FORMAT

The MARC-in-JSON record format contains two fields:

   * 'leader' - the MARC leader
   * 'fields' - an array of M
Catmandu-MARC ( H/HO/HOCHSTEN/Catmandu-MARC-1.33.tar.gz, HOCHSTEN, 2024; MetaCPAN )
Catmandu-MARC/lib/Catmandu/Exporter/MARC/Line.pm ( view source; MetaCPAN )


sub add {
    my ($self, $data) = @_;

    if ($self->record_format eq 'MARC-in-JSON') {
        $data = $self->_json_to_raw($data);
    }

    for my $field (@{$data->{record}}) {
        my ($fiel
Catmandu-MARC ( H/HO/HOCHSTEN/Catmandu-MARC-1.33.tar.gz, HOCHSTEN, 2024; MetaCPAN )
Catmandu-MARC/lib/Catmandu/MARC.pm ( view source; MetaCPAN )
record => $data } );
        $exporter->commit;

        return $xml;
    }
}

sub marc_record_to_json {
    my ( $self, $data, %opts ) = @_;

    if ( my $marc = delete $data->{'record'} ) {
        
 => \@sf, ind1 => $ind1, ind2 => $ind2 } };
            }
        }
    }

    $data;
}

sub marc_json_to_record {
    my ( $self, $data, %opts ) = @_;

    my $record = [];

    if ( Catmandu::Util::
];
    my $data       = $_[1];
    my $json_path  = $_[2];
    my $marc_path  = $_[3];
    my $marc_value = $_[4];

    my $value = Catmandu::Util::data_at( $json_path, $data );

    return $data
    

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.