#!/usr/bin/env perl

use strict;
use warnings;

use App::MARC::Filter;

our $VERSION = 0.05;

# Run.
exit App::MARC::Filter->new->run;

# Print version.
sub VERSION_MESSAGE {
	print $VERSION."\n";
	exit 0;
}

__END__

=pod

=encoding utf8

=head1 NAME

marc-filter - Tool to filter records in MARC dataset.

=head1 SYNOPSIS

 marc-filter [-h] [-n num] [-o format] [-r] [--version] marc_xml_file search_item [sub_search_item] value

=head1 DESCRIPTION

Tool to filter MARC records in big datasets. Could filter by control field or field/subfield or
leader or material type. Tool could filter by number of output records.

It supports MARC XML files now.

=head1 ARGUMENTS

=over 8

=item * C<-h>

Print help.

=item * C<-n num>

Number of records to output,

Default value is all records to output.

=item * C<-o format>

Output MARC format.

Possible formats are ascii, xml.

=item * C<-r>

Use value as Perl regexp.

=item * C<--version>

Print version of script.

=item * C<marc_xml_file>

MARC XML file name.

=item * C<search_item>

Search item could be MARC control field or MARC field or 'leader' string or
material type string.

Possible material type strings are:

=over

=item * book

=item * computer_file

=item * continuing_resource

=item * map

=item * mixed_material

=item * music

=item * visual_material

=back

=item * C<sub_search_item>

In the case of MARC field this could be a subfield.

=item * C<value>

Value to filter.

=back

=head1 REPOSITORY

L<https://github.com/michal-josef-spacek/App-MARC-Filter>

=head1 AUTHOR

Michal Josef Špaček L<mailto:skim@cpan.org>

L<http://skim.cz>

=head1 LICENSE AND COPYRIGHT

© 2022-2025 Michal Josef Špaček

BSD 2-Clause License

=head1 VERSION

0.05

=cut
