Printing Spine Labels
This page describes printing spine labels for books (and other materials that might be in a library) using Library of Congress call numbers. It also gives a utility to convert those call numbers into a format that’s more easily usable, and fits better, on labels.
The Problem
Cataloging software like librarything.com makes it easy to find call numbers for your materials from other libraries, including the Library of Congress. However, those numbers are stored in the database in a single line, and look something like “TS536.6.B6 D4 1995”. When printed on a spine label, this call number would ordinarily look more like:
TS
536
.6
.B6
D4
1994
Since none of these fields is of a fixed length (e.g., the top line can be 1-3 letters, the second line can be any number of digits, etc.), and not all of them are present for any given item, breaking out a call number into its various elements can be a tedious manual process.
A Solution
The tool in the sidebar on this page converts Library of Congress-style call numbers from a single line into their parts. Upload a .csv (comma-separated values) file containing the call number as the first field in each row, with whatever other data you want in following fields. I’d suggest date as the second field, but that’s up to you. Your uploaded file should have a header row indicating what each column contains.
When you upload your file, this tool will convert the call number into five separate fields corresponding to the first five lines of the call number shown above: the alphabetic portion of the classification, the numeric portion of the classification, the decimal portion of the classification, the first cutter, and the second cutter. This tool does not recognize dates from the LC call numbers, as the imported numbers frequently don’t include the dates. This is why I suggest including the date as a separate field in your .csv file.
Any other fields you have in your data will be returned untouched. Once you download the converted file, your data is deleted from the server.
Limitations
The conversion tool is still in an early stage of development, and some errors or inconsistencies are not unexpected. The tool will return “ERROR” for any call numbers it can’t parse.
The code that handles CSV output isn’t very smart. This means that if any of your data includes commas, it will be split into multiple fields in your output. For this reason, I recommend that if you include titles in your data, they be the last field.
Usage Notes
If you’re using Microsoft Excel, at least on a Mac, you’ll need to make sure to import the .csv file (from within Excel, File menu, Import), and not simply open it (i.e., double-click on the file). In the import wizard, you’ll need to specify that the third column (named ClassNumDec) is to be imported as text, rather than as general or number. Otherwise, Excel will add leading zeroes to the contents of that field (e.g., turning .8 into 0.8). This will mess up your labels.
Once you have imported the data into Excel, you can weed out and correct any rows with errors, and use the Mail Merge feature in Word to prepare and print the labels.
For the label layout, I use Avery 5160 labels (standard mailing labels, 2.63” wide x 1” high, 30 per page). I include all five fields of the call number, in addition to the date and the title, on the label, with each field on its own line. I use 9-point Helvetica Bold for the call number and date, and indent those fields one inch from the left margin of the label. For the titles, I use 6-point Helvetica, and center the title on the label. I then sort the labels to be alpha by title, so I can easily find which label goes with a given book. Note that Excel’s sort feature isn’t very smart either, and doesn’t know that it shouldn’t sort on “the”, so all the titles starting with “the” will be grouped together.
Source Code
Source code for this tool can be found at https://github.com/danb35/loc-burst.