← Documentation index

SPPLIST

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
FILES
EXIT STATUS
SEE ALSO

NAME

spplist - write the catalogue of sapupra as an Org document of tables, by author, by title and by location

SYNOPSIS

spplist [-t TABLE] ... [-o FILE] [-D FILE] [-c FILE] [--title TEXT] [--language LL] [--as-written] [--no-date]
spplist -h
|--help
spplist -V
|--version

DESCRIPTION

spplist reads the catalogue and writes an Org document that holds up to three tables, each of the copies that were not removed: sorted by author, with the columns author, title and location; sorted by title, with the columns title, author and location; sorted by location, with the columns location, author and title. Org exports the document to PDF (through LaTeX, the tables running over as many pages as they need) or to HTML, so that a list can be printed and kept on the shelf, or given to someone who has no access to the network.

It is a command run by hand, on a machine that can read the database. It reads the database and changes nothing; the service need not be stopped. Any account can run it: the configuration file is readable by all (the passwords are in another file), the directory of the database is open to enter (mode 0755) and the file is readable (0644). The program says which of them is closed if one is. While no program has the database open, the file is read as it is, without its log (the worker moved the log into the file when it stopped).

The order is the alphabet of the language of the pages: an accent or a capital does not send a word to the end, and a number is read as a number (shelf 2 before shelf 10). The article that starts a title is set aside for the order, by the language of the edition (The Name of the Rose is under N); the title is written in full, and an edition of unknown language is sorted as written. An author is written and sorted as Surname, Forename: as the source filed the name when it said so, otherwise the last word of the name is taken for the surname, with the particles before it (de, van, von, ...); a name that holds a comma is left as it is. A copy with several authors is under each of them in the table by author, and has them all in the others; a copy with no author comes last. The authors are the contributors whose role is author or is not given; for a work that has none (a disc), the contributors who are not translators.

OPTIONS

-t, --table TABLE

Which table to write: author, title, location or all (the default). Repeated, or several names separated by commas, to choose two: -t author,location.

-o, --output FILE

Write FILE; by default the document goes to the standard output.

-D, --database FILE

The database to read; by default the file named by [database] file of the configuration file.

-c, --config FILE

The configuration file; by default sysconfdir/sapupra.ini if it can be read. With -D and no -c, a configuration file that cannot be read is no matter.

--title TEXT

The title of the document; by default "The catalogue".

--language LL

The language of the headings and of the order (fr, ...); by default [interface] language of the configuration file.

--as-written

Leave the names as they are stored, and sort by them (so by forename for "Imre Kertész").

--no-date

Write no date in the document; by default it is today’s.

-h, --help

The usage.

-V, --version

The version.

EXAMPLES

$ spplist -o catalogue.org
$ spplist -t author,location --title "Books of the house" -o books.org
$ emacs --batch catalogue.org -f org-latex-export-to-pdf

FILES

sysconfdir/sapupra.ini

The configuration file.

EXIT STATUS

0 on success; 1 if the database or the configuration file cannot be read or the output cannot be written; 2 for a wrong option.

SEE ALSO

sppentry(8), sppwork(8), spplabel(1)

The manual of sapupra (Manual.org).