NAME
marc-filter - Tool to filter records in MARC dataset.
SYNOPSIS
marc-filter [-e] [-h] [-i] [-n num] [-o format] [-r] [--version] marc_file search_item [sub_search_item] [value]
DESCRIPTION
Tool to filter MARC records in big datasets. Could filter by control field or field/subfield or leader or material type. Field 008 also supports item selectors in the form 008.item, parsed by MARC::Field008. Tool could filter by number of output records.
It supports MARC XML and USMARC files now.
ARGUMENTS
-eMatch field/subfield existence.
-hPrint help.
-iInvert searching.
-n numNumber of records to output,
Default value is all records to output.
-o formatOutput MARC format.
Possible formats are ascii, xml.
-rUse value as Perl regexp.
--versionPrint version of script.
marc_fileMARC XML or USMARC file name.
Input file could be compressed by IO::Uncompress::AnyUncompress module. Possibility is to uncompress gzip, zip, bzip2, zstd, xz, lzma, lzip, lzf or lzop.
search_itemSearch item could be MARC control field or MARC field or 'leader' string or material type string. Field 008 also supports item selectors in the form
008.item.Possible field 008 items are:
cataloging_source
date1
date2
date_entered_on_file
language
modified_record
place_of_publication
type_of_date
Possible material type strings are:
book
computer_file
continuing_resource
map
mixed_material
music
visual_material
sub_search_itemIn the case of MARC field this could be a subfield. It's optional with
-e.valueValue to filter. For
008.date1and008.date2it's possible to use range syntax in the formYYYY..YYYY. It's required without-e.
REPOSITORY
https://github.com/michal-josef-spacek/App-MARC-Filter
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2022-2026 Michal Josef Špaček
BSD 2-Clause License
ACKNOWLEDGEMENTS
Development of this software has been made possible by institutional support for the long-term strategic development of the National Library of the Czech Republic as a research organization provided by the Ministry of Culture of the Czech Republic (DKRVO 2024–2028), Area 11: Linked Open Data.
VERSION
0.12