LCCNORM(1p)

πŸ’– lccnorm β€” normalize Library of Congress Classification call numbers πŸ’–

okay bestie, so this is LCCNORM(1p), a perl manual page, and it's literally here to make your LC call numbers sortable. let's get into it 🫢


✨ SYNOPSIS ✨

lccnorm [option...] [file...]

lccnorm -h|--help

lccnorm -V|--version

like, that's the whole vibe. options, files, or a lil help/version moment. slay πŸ’…


🌸 DESCRIPTION 🌸

lccnorm takes LC-style call numbers and transforms them into a form that may be used in a straight ASCII sort. no cap, that's the entire job and she does it gorgeously. ✨

By default, each line of input is assumed to consist of a number of tab-delimited fields, of which the first contains an LC-style call number or class. (yes, field one, the main character πŸ‘‘)

If no file is specified, or if the file name - is specified, standard input will be processed. classic.

πŸ¦‹ the range situation (it's giving complicated)

Normalization of call number ranges is a special challenge, because ranges are not normally specified using the exact endpoint. consider the range "B708-B713" β€” while "B708" does indicate the beginning point (a no call number that comes before B 708 can fall within the range), the end point is only a guide, not a strict limit, since the intent is that call numbers such as "B 713 .H94" and "B 713 .W55 L86" do fall within the range. 😭

Unfortunately, ranges are often specified ambiguously; for example, the call number "B 713.14 G92" might or might not be considered to fall within this range. so like… it's a vibe, not a science, and the manpage is telling you this on purpose. πŸ’€


πŸŽ€ OPTIONS πŸŽ€

  • -d, --delimiter string β€” Specify a string other than a single tab (ASCII character 9) to delimit the fields in a line of input. This also provides the default for joining fields in the output; see option -j below.
  • -f, --field range β€” The call number (or range) is found in the given range of fields. Fields are 1-based (the first field is field 1, not field 0) and are separated by a single tab character (unless option -d is used to specify an alternate delimiter).

When parsing call numbers (not ranges), all fields are concatenated using a single space to form the call number that will be normalized.

When parsing ranges, there are four possibilities:

  1. 1 field β€” The field contains a range in the form prefix (e.g., "J80"), closed range (e.g., "ML566-566.6" or "ML566-ML566.6") or half-open range (e.g., "KME451<KME500").
  2. 2 fields β€” The first field is the beginning of the (closed) range, and the second is the end.
  3. 3 fields β€” The first field is a prefix common to both the beginning and end of the range, and the second and third fields are the remainders.
  4. 4 fields β€” The first and third fields together are the beginning of the range, and the second and fourth are the end.

For example, the following all produce identical output:

$ echo 'PL4501-4509'     | lccnorm -d: -f1
$ echo 'PL4501:PL4509'   | lccnorm -d: -f1-2
$ echo 'PL:4501:4509'    | lccnorm -d: -f1-3
$ echo 'PL:4501:PL:4509' | lccnorm -d: -f1-4
  • -j, --join string β€” Specify a character to use when joining fields for output. The default is to use the same string specified in option -d, or a single tab if -d was not given.
  • -c β€” Don't delete the input fields from which call numbers (or ranges) were obtained. Either the -b and -e option must be provided to specify where the normalized string is to be placed.
  • -b, --begin β€” Place normalized strings at the beginning of output lines.
  • -e, --end β€” Place normalized strings at the end of output lines.
  • -D, --die-on-error β€” Exit with a non-zero status as soon as an unnormalizable input is encountered. The default is to issue a warning and normalize to the empty string.
bestie. -D is the dramatic one. it does NOT let things slide. default is chill, -D is not. 🚨
  • -v, --verbose β€” Be verbose. This currently has no effect unless used with the -V or --version option.
  • -h, --help β€” Print help information and exit.
  • -V, --version β€” Print the version number and exit. If the -v or --verbose option is specified, print out additional information.
  • -M, --manual β€” View the manual page for lccnorm.
  • -L, --license β€” View the license under which lccnorm is distributed.

🌈 AUTHOR 🌈

Paul Hoffman (nkuitse AT nkuitse DOT com)


Copyright 2007 Paul M. Hoffman.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl:

a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version;

or

b) the "Artistic License".

For the full text of these licenses, see the script file itself or enter the command lccnorm -L.


⭐ SEE ALSO ⭐

Biblio::LCC


and that's the whole page, bestie πŸŽ€ this is LCCNORM(1p) from perl v5.36.0, dated 2023-02-05 β€” go forth and sort your call numbers, you icon πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from