Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

marc21-glimpse(1)

NAME

marc21-glimpse — Print a dense preview of a data field

SYNOPSIS

marc21 glimpse [OPTIONS] <PATH> [INPUT]…

DESCRIPTION

This command generates a dense preview of the subfields of a data field (control fields and the leader are not processed). The preview is generated by progressively analyzing the relevant data fields from records until a minimum number of values has been found for each subfield encountered. The minimum number can be specified using the --max-values / -n option (the default value is 10).

Please note that subfields that appear very late in the input may not be listed in the preview. To get an overview of the distribution of the subfields, use the describe command.

It is also important to note that there does not have to be any relationship between the values in the same column. The values might come from different fields or records.

ARGUMENTS

<PATH>
A path expression.

OPTIONS

-n <n>, --max-values <n>
Maximum number of values to show per subfield (default 10).
-o, --output <path>
Write output to <path> instead of stdout. If the filename ends in .tsv or .tsv.gz, the output is automatically saved in TSV format. The output is gzip-compressed when the filename ends with .gz.

FILTER OPTIONS

-l, --limit <n>
Limit the result to first <n> records (a limit value 0 means no limit)
-s, --skip-invalid
Skip invalid records that can’t be decoded
--strsim-threshold
The minimum score for string similarity comparisons (0 <= score <= 100)
--where
An expression for filtering records
--filter-normalization <form>
Transliterate the given filter or query expression into the specified Unicode normal form. Possible values: nfd, nfkd, nfc, nfkc. This option can also be specified by setting the environment variable MARC21_FILTER_NORMALIZATION.

COMMON OPTIONS

-p, --progress
If set, show a progress bar
-c, --compression
Specify compression level (0..=9)

EXIT STATUS

  • 0 — Command succeeded.
  • 1 — Command failed.

EXAMPLES

In the following example, a preview of field 065 is generated provided that subfield 2 contains the value sswd.

$ marc21 glimpse -n5 '065{ _ | 2 == "sswd" }' DUMP.mrc.gz
$2 sswd, sswd, sswd, sswd, sswd
$a 12.2p, 16.5p, 15.1p, 13.4p, 7.14p

The _ character indicates that the path expression does not impose any restrictions on the subfield codes. If only a subset of the subfields is to be considered, these can also be specified explicitly:

$ marc21 glimpse -s -n10 '079.[aq]' DUMP.mrc.gz
$a g, g, g, g, g, g, g
$q s, a, f, z, h, l, d, a, f, s