The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

pscdcover - generate a cover for a mounted CD-ROM.

SYNOPSIS

    pscdcover --title="CD Title" | lpr
    pscdcover --title="CD Title" --files > cover.ps

DESCRIPTION

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.

Editing the output

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.

OPTIONS

--conf=FILE

Specifies an alternate configuration file. If not specified, /etc/pscdcoverrc and ~/.pscdcoverrc are read instead, in that order.

-p FILE, --ps=FILE

Specifies the path to the PostScript template. The default is pscdcover.ps in the same directory as the module PostScript::CDCover.

-t TEXT, --title=TEXT

Provides a title for the CD. The title will be printed on top of the first page, and on the sides of the back label. If this option is omitted, it defaults to the value of the --root option, or its default value. --title can be explicitely forced to an empty string: --title=''

-r PATH, --root=PATH

Specifies the mount point of the CD-ROM. Default is /media/cdrom.

-f, --files

When specified, the regular files are also printed, not just the directories. The default is --nofiles.

-3, --mp3

When set, MP3 files will be checked for an ID3 tag. The title of the song together with its length will be printed out instead of the filename. This implies --files. You must have the MP3::Info Perl module installed to use this option.

-d INTEGER, --depth=INTEGER

When omitted or set to 0, the program traverses the CD-ROM as deep as possible. This option allows for limiting the depth of the search. A value of 1 will only ouput the top-level directories, i.e., those just below --root.

--box

When set (which is the default), the edges of the labels are drawn in dim gray. Use --nobox to prevent this (only the text will be printed out).

-s, --separator

When set, prints a line as column separator (default is off).

-a, --all

Forces the printing of all the pages (front and back), even if the whole directory tree could be printed on only the first page.

-c INTEGER, --columns=INTEGER

Specifies the number of columns to print on each page (default is 2). When set to 0, the column widths will be calculated dynamically, so that the longest filename in each column fits.

-m INTEGER, --minwidth=INTEGER

Specifies the minimum allowed width for a column (in millimeters). If the room left on the right side of the page is lower than this limit, the next column will be printed on the next page. This option is only relevant with --columns=0. The default is 25 mm (which is slightly less than an inch, for those who wonder).

--color

Generate color output: the CD and folder icons will be drawn in colors, light blue and light yellow respectively. These default colors can be overridden with the --cd-color and --folder-color switches.

--cd-color=STRING
--folder-column=STRING

Override the default color for the CD and folder icons respectively. STRING should be an hexadecimal triplet representing the shares of red, green and blue in the desired color, like those commonly found in HTML or CSS. The value may optionally be prefixed with 0x. Three-digits triplets will be doubled (e.g. 0xC30 is the same as CC3300). Specifying at least one of these options implies --color.

-v, --version

Prints the program's version and exists.

FILES

/etc/pscdcoverrc
~/.pscdcoverrc

The system-wide and user specific configuration files. Any command-line option can be set in one of these configuration files (the user's one taking precedence over the system-wide one). Both files are read in that order, the parameters from the latter overriding those from the former (i.e., any user can override system wide defaults by providing his/her own defaults, but need not copy the whole configuration file from /etc).

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

AUTHOR

Cédric Bouvier <cbouvi@cpan.org>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 456:

Non-ASCII character seen before =encoding in 'Cédric'. Assuming CP1252