|
pscdcover - generate a cover for a mounted CD-ROM. |
pscdcover - generate a cover for a mounted CD-ROM.
pscdcover --title="CD Title" | lpr
pscdcover --title="CD Title" --files > cover.ps
pscdcover traverses a mounted CD-ROM directory tree and generates a
PostScript program that prints a CD box cover. The output of this program can
be directly sent to a PostScript compatible printer, or saved to a file for
editing.
The directory tree is printed in two colums, first on the front page, then on the inner page (the one that is visible when you open the box), and finally on the back label. All in all, the output consists of two A4 pages, one for the front and inner pages, and one for the back label. People using alien paper formats should still be able to print, provided that their paper size is close enough to A4, as the labels are drawn rather far from the paper edge. Printing on Letter should not cause any trouble.
The title is printed on top of the front page, and on the sides of the back label. Various command-line switches alter the behaviour of the program and the layout of the generated covers.
The layout of the files in the different columns and pages is done by the PostScript program. This makes it possible and easy to edit the resulting PostScript program with a text editor and remove some lines.
The editable section looks like this (text within parentheses are the files and directory names):
(directory 1) 0 folder_title
(file 1) 1 file_title
(file 2) 1 file_title
(file 3) 1 file_title
(file 4) 1 file_title
(file 5) 1 file_title
(file 6) 1 file_title
(file 7) 1 file_title
(file 8) 1 file_title
(file 9) 1 file_title
(file 10) 1 file_title
(file 11) 1 file_title
(file 12) 1 file_title
(directory 2) 0 folder_title
In order to shorten the list (so that it fits on the three pages, for instance), you may simply change the above to:
(directory 1) 0 folder_title
(...) 1 file_title
(lots of files) 1 file_title
(...) 1 file_title
(directory 2) 0 folder_title
You need not worry about the final layout, whether a directory has changed columns or not, all this is taken care of by the PostScript interpreter.
--root option, or its default value. --title
can be explicitely forced to an empty string: --title=''
/media/cdrom.
--nofiles.
--files. You must have the MP3::Info Perl module installed to use
this option.
--root.
--nobox to prevent this (only the text will be printed out).
--columns=0. The default is 25 mm (which is slightly less than an inch, for
those who wonder).
--cd-color and --folder-color switches.
0x. Three-digits triplets will be doubled (e.g.
0xC30 is the same as CC3300). Specifying at least one of these options
implies --color.
The syntax of the configuration file quite simple. Blank lines are ignored,
commeents start with a colon (;) or a hash (#) and stop at the end of the
line. Options are given as key = value pairs, one per line. The key should
be a valid command-line switch (long version). Leading and trailing whitespace
is ignored, as well as the optional whitespace surrounding the equal sign.
Parameters that are counterparts of a boolean command-line switch should be
given a value of 1 for true and 0 for false.
Example:
files = 0
separator = 1
color = 1
root = /cdrom
Cédric Bouvier <cbouvi@cpan.org>
|
pscdcover - generate a cover for a mounted CD-ROM. |