← Documentation index

SPPLABEL

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
EXIT STATUS
SEE ALSO

NAME

spplabel - print the labels of sapupra: locations and items, as codes with their text, on pages of SVG

SYNOPSIS

spplabel [-l PATH] [--item N] [--items A-B] [--text LINE] [-c CONTENT] ... [-k KIND] [-e LEVEL] [-s MM] [-p SIZE] [--columns N] [--rows N] [--skip N] [--margin MM] [--no-frame] [--plain] [-o FILE] [--config FILE] [--location-prefix P] [--item-prefix P]
spplabel -h
|--help
spplabel -V
|--version

DESCRIPTION

spplabel draws labels: a code (by default a QR code) with, under it, the text that a person reads. It is a command run by hand, at the printer’s side: it reads no database, starts no service and needs no broker. It writes SVG, which a browser, Inkscape, LibreOffice or a slicer opens and prints, in millimetres, so that a code asked 20 mm wide comes out 20 mm wide.

Two sorts of label are meant for the phone’s scanner (Binary Eye) to read.

A location label holds the prefix of the locations and the path of the place, as LOC:salon/bookcase 2/shelf 4. A location is a path from the largest place to the smallest, its parts separated by a slash; scanning the label tells the system that the books scanned next are there (Manual.org, "Locations"). On the label the last part is written large and the places that contain it under it. The path is brought to its normal form first (no empty part, spaces trimmed), as the rest of the system does, so that the label and the entry by hand name the same place.

An item label is for a copy that has no barcode (an old book, a pamphlet): it holds the prefix of the items, the number of the item and a check digit, as ITM:1234-4, so that a label that is damaged or misread is not taken for another item. The number is the one that the page of the item in sppentry(8) shows, with the command that prints its label. Scanning it shows the item and puts it at the current location of the scan device. A label of a location holds the prefix of the locations and a path; the place must be made in the entry module before its label is scanned.

The labels given are put on the page in the order given, left to right and top to bottom, as many as fit; a further page begins when one is full.

OPTIONS

The labels, each option as many times as there are labels:
-l
, --location PATH

A location label.

--item N

The label of the item N.

--items A-B

The labels of the items A to B (at most 5000).

--text LINE

The text under the label given just before it, in smaller letters, on up to three lines (an author and a title, say). A text that is too long is shortened with an ellipsis, and a warning says so. It is not accepted after --items.

-c, --code CONTENT

A code that holds CONTENT as it is, with CONTENT written in clear.

The code and the sheet:
-k
, --kind KIND

qr (the default), datamatrix, aztec or code128. A QR code is the one that phones read best, and holds the accented characters of a path (they are announced as UTF-8, so that a reader does not take them for another encoding). Code 128 holds ASCII only.

-e, --ecc LEVEL

The error correction of a QR or Aztec code: L, M (default), Q or H, which restore about 7, 15, 25 and 30 per cent of a damaged code. A higher level makes a bigger code for the same size of label, so smaller modules.

-s, --size MM

The side of a two-dimensional code, or the height of a one-dimensional one, in millimetres (5 to 150; 20). A label is a little wider than its code, for the quiet zone and the text.

-p, --page SIZE

A4 (default) or Letter.

--columns N
--rows
N

The labels across and down, to fit a sheet of adhesive labels: the places are then the cells of a grid of the page, inside the margin. Without them as many as fit are put.

--skip N

Leave the first N places blank, for a sheet of adhesive labels already partly used. N must be less than the labels of a page.

--margin MM

The margin of the page (10).

--no-frame

No dashed line round each label. The line is for cutting along, or to see where the label ends on paper.

--plain

The code alone, as black shapes without a margin or a text, in an SVG file of exactly the size asked, one for each label: for a program that makes something of the shape, such as the slicer of a 3D printer or a laser cutter. The quiet zone of the code is then the plate’s. The file names are FILE-1.svg, FILE-2.svg and so on. There is no page and no text, so --text, --page, --columns, --rows, --skip, --margin and --no-frame do nothing with it: the program says so on the standard error, as a warning, and goes on.

-o, --output FILE

The file to write, standard output by default. Several pages (or, with --plain, several labels) are written to FILE-1.svg, FILE-2.svg and so on, and the names are said.

The prefixes:
--config
FILE

The configuration file of the programs, by default sapupra.ini in the system configuration directory of the installation. What spplabel reads of it is prefix in the sections [locations] and [items]: without them LOC: and ITM:. When the default file cannot be read (it holds passwords and is often for the services alone to read) the program says so and goes on with the defaults; when the file was asked for with this option, that is an error.

--location-prefix P
--item-prefix
P

The prefixes, which win over the configuration file. They must not begin alike: a scan could not tell an item from a location.

-h, --help

Print a summary of the options and exit.

-V, --version

Print the version of the program and of libzint, and exit.

EXAMPLES

A sheet of location labels for a shelf of the second bookcase of the living room, saved, then opened in a browser to print:

spplabel -l "salon/bookcase 2/shelf 1" -l "salon/bookcase 2/shelf 2" -o shelves.svg

Labels for the items 100 to 140, on a sheet of 3 by 8 adhesive labels of which the first 5 places are used:

spplabel --items 100-140 --columns 3 --rows 8 --skip 5 -o items.svg

One item with its author and title, for a plate cut from a sheet of PETG:

spplabel --item 1234 --plain -s 20 -o plate.svg

EXIT STATUS

0 on success; 1 if a label cannot be made (a code too big for its place, a text that cannot be written, a file that cannot be written, a configuration that cannot be read); 2 for a usage error.

SEE ALSO

sppentry(8), sppgate(8), sppwork(8)

Design.org, "Location labels" and "Labels of our own"; Manual.org, "Labels".