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 character9) to delimit the fields in a line of input. This also provides the default for joining fields in the output; see option-jbelow.-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-dis 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 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 fields β The first field is the beginning of the (closed) range, and the second is the end.
- 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 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-dwas not given.-cβ Don't delete the input fields from which call numbers (or ranges) were obtained. Either the-band-eoption 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.-Dis the dramatic one. it does NOT let things slide. default is chill,-Dis not. π¨
-v,--verboseβ Be verbose. This currently has no effect unless used with the-Vor--versionoption.-h,--helpβ Print help information and exit.-V,--versionβ Print the version number and exit. If the-vor--verboseoption is specified, print out additional information.-M,--manualβ View the manual page forlccnorm.-L,--licenseβ View the license under whichlccnormis distributed.
π AUTHOR π
Paul Hoffman (nkuitse AT nkuitse DOT com)
π COPYRIGHT π
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
- debian bookworm: libbiblio-lcc-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbiblio-lcc-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbiblio-lcc-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbiblio-lcc-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbiblio-lcc-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms