cdlabelgen



CDLABELGEN(1)         User Contributed Perl Documentation        CDLABELGEN(1)




NAME

       cdlabelgen - CD jewel case inserts and envelopes creator.  Generates
       frontcards and traycards for CD cases, and single-cd envelopes.


SYNOPSIS

       cdlabelgen [ -c <category> -s <subcategory> -i <item1%item2%etc> -f
       <itemsfile>  -v <num_items_cover> -e <cover_epsfile> -S
       <cover_eps_scaleratio>[,<image_x_offset>,<image_y_offset_inches>] -E
       <tray_epsfile> -T <tray_eps_scaleratio>[,<image_x_offset>,<image_y_off-
       set_inches>] -d <date> -D -o <outputfile> -t <template> -b -C -w -h -m
       -M -O -p -y <page_offset_inches>  -l <line_width_points>]
       --plaque-color <r,g,b> --category-color <r,g,b> --subcategory-color
       <r,g,b> --text-color <r,g,b> -n <volume/number in set>


VERSION

       Version 2.6.1, June 2003


DESCRIPTION

       cdlabelgen’s purpose in life is twofold:

       · To be run automatically and swiftly from a shell script and automati-
       cally generate a frontcard and a traycard for a cd--usually data
       archive cd’s. The traycard (which goes behind the CD itself) is
       U-shaped and the ends of the CD case bear the label of what the CD is.
       · To have a minimum of dependencies--cdlabelgen only requires perl.

       cdlabelgen was designed to simplify the process of generating labels
       for CD’s. It originated as a program to allow auto generation of front-
       cards and traycards for CD’s burned via an automated mechanism (specif-
       ically for archiving data), but has now become popular for labelling CD
       compilations of mp3’s, and copies of CDs. Note that cdlabelgen does not
       actually print anything--it just spits out postscript, which you can
       then do with as you please.

       The latest version of cdlabelgen as well as this document can be found
       at http://www.aczone.com/tools/cdinsert/. The software package includes
       CGI scripts that can be used to serve cdlabelgen over the internet.  An
       older version may be available at: http://www.red-bean.com/~bwf/soft-
       ware/cdlabelgen/.

       cdlabelgen comes with several eps images for you to use on your labels.
       These images can be found in /usr/local/lib/cdlabelgen or
       /usr/share/cdlabelgen or /opt/lib/cdlabelgen/ or /usr/local/share/cdla-
       belgen, depending on your installation. Included are a Recycling icon,
       an mp3 icon, the Compact Disc icon (with and without ’Digital’ on it),
       Tux the penguin, and the new Debian ’swirl’ logo. Two color background
       images called Music Notes are also available.

       Note that cdlabelgen now prints a ’tongue’ as part of the traycard.
       This folds around and is viewable from the front in jewel boxes that
       are entirely clear (CD holder piece is not opaque). If you do not have
       a clear CD holder in your jewel box, you may find it easier to just cut
       the ’tongue’ off--it’s a bit easier to fold without it.

       cdlabelgen requires Perl Version 5.003 or greater. Ghostscript is not
       required, but is recommended so that you can test out your labels with-
       out wasting paper.


SWITCHES

       -c, category <category>
           Set the category (title) for the CD

       -s, subcategory <subcategory>
           Set the subcategory (subtitle) for the CD

       -i, --items <items>
           ’items’ should be a ’%’ separated list of items to print on the
           traycard of the CD.  Note that if the number of items are too many
           to fit on the tray card, cdlabelgen will leave out some items at
           the end.  cdlabelgen automatically flows the items into 2, 3, 4, or
           5 columns and scales the fontsize accordingly, unless the "-P"
           option is used.  You can insert blank lines by inserting 2 percent
           signs in a row into the items list.

       -f, --items-from-file <filename>
           Get item names from file named filename. Each item should be on its
           own line separated by carriage returns.  cdlabelgen automatically
           flows the items into 2, 3, 4, or 5 columns and scales the fontsize
           or clips the items as needed.  You can insert blank lines by plac-
           ing blank lines between items in this file

       -v, --cover-items <number_of_items_for_cover>
           Normally, all the items are printed on the tray card.  But if you
           have a large number of items, you may wish to print some items on
           the cover, and rest on the tray card.  This option provides a way
           of specifying how many items should be printed on the cover.
           Default is 0 (i.e., print no item on the cover, print all items on
           the tray). The items to be printed on the cover are taken from the
           list of items, from the top of the list.  Note that if the number
           of items is too many to fit on the cover, it will result in items
           being dropped. As of Jan 2002, around 250-300 items can be fitted
           on the cover or the tray, depending on whether a title/subti-
           tle/date is used or not.

       -d, --date <date>
           Set the date to be used as ’date’ if not set or not overridden with
           the -D flag, today’s date will be used (default is today’s date).
           Use this option if you don’t like cdlabelgen’s default format of
           YYCC-MM-YY, for example.

       -D, --no-date
           Do not print any date (overrides -d as well)

       -e, --cover-image <cover_epsfile>
           Filename of eps file to print on cover. Note that cdlabelgen
           requires that the eps file contain a proper ’%%BoundingBox LLx LLy
           URx URy’ declaration according to the PostScript Document Structur-
           ing Conventions. cdlabelgen uses this line to determine the dimen-
           sions of the eps graphic so that it can position it appropriately
           on the cover. Note that cdlabelgen first looks for this file in
           your working directory. If it doesn’t find it there, it will look
           in the list of directories where the default eps files are stored
           (see @where_is_the_template). This makes it easy to use the images
           shipped with cdlabgelgen without typing miles of pathnames.

       -S, --cover-image-scaleratio <cover_eps_scaleratio [,image_x_off-
       set,image_y_offset_inches]>
           The ratio by which you want to scale the epsfile that appears on
           the cover. If you omit this flag, cdlabelgen assumes a scaleratio
           of 1.0. This flag allows you to squeeze larger graphics into the
           cover or expand smaller graphics to fill the cover. Scaleratio must
           be a number (int or float).

           If the scale value passed is 0 (or 0.0), then the logo is used as a
           background image - it will be scaled as required to fit the entire
           cover.

           The -S option also takes optional translate arguments.  Normally
           images are printed on the cover and the tray so that the bottom-
           right of the image is anchored to the bottom-right of the cover or
           tray. To move the images away from the bottom and right borders,
           use this option. For example, to leave two inches of gap between
           the image and the bottom border, and 0.5 inches from the left bor-
           der, and use 1.0 scaleratio, use this: -S 1.0,-2,0.5

           This offset only applies when the image is being used as a logo -
           i.e., image is not being used as background to fill the entire
           cover or tray.

       -E, --tray-image <tray_epsfile>
           Filename of eps file to print on traycard. Note that cdlabelgen
           requires that the eps file contain a proper ’%%BoundingBox LLx LLy
           URx URy’ declaration according to the PostScript Document Structur-
           ing Conventions. cdlabelgen uses this line to determine the dimen-
           sions of the eps graphic so that it can position it appropriately
           on the cover. Note that cdlabelgen first looks for this file in
           your working directory. If it doesn’t find it there, it will look
           in the list of directories where the default eps files are stored
           (see @where_is_the_template). This makes it easy to use the images
           shipped with cdlabgelgen without typing miles of pathnames.

       -T, --tray-image-scaleratio <tray_eps_scaleratio [,image_x_off-
       set,image_y_offset_inches]>
           The ratio by which you want to scale the epsfile that appears on
           the traycard. If you omit this flag, cdlabelgen assumes a scalera-
           tio of 1. This flag allows you to squeeze larger graphics into the
           traycard or expand smaller graphics to fill the traycard. Scalera-
           tio must be a positive number (int or float) specifying the scale.

           If the scale value passed is the word fill1, then the image is used
           as a background - it is scaled so that it completely fills the
           interior tray card region.  The value 0 (or 0.0) works same as the
           fill1 argument.

           If the value passed is the word fill2, then the image is used as a
           background - it is scaled so that it completely fill both the tray
           card region, and the two endcaps (but not the extreme right-hand
           ’tongue-cap’).

           The -T option also takes optional translate arguments.  Normally
           images are printed on the cover and the tray so that the bottom-
           right of the image is anchored to the bottom-right of the cover or
           tray. To move the images away from the bottom and right borders,
           use this option. For example, to leave two inches of gap between
           the image and the bottom border, and 0.5 inches from the left bor-
           der, and use 1.0 scaleratio, use this: -T 1.0,-2,0.5

           This offset only applies when the image is being used as a logo -
           i.e., image is not being used as background to fill the entire
           cover or tray.

       -o, --output-file <outputfile>
           If the -o flag is used, cdlabelgen prints to outputfile instead of
           STDOUT.

       -t, --template <template>
           Specify explicitly which template to use. This is useful if you
           need to debug the PostScript code in the template, use a different
           template, or if you have created your own template to use in lieu
           of the one provided with cdlabelgen.

       -b, --no-tray-plaque
           Suppresses printing of the Plaque on the traycard, thus allowing
           you to either fit even more items on the traycard, or to use a
           slightly larger font size for the items.

       -C, --no-cover-plaque
           Suppresses printing of the plaque on the front cover, thus allowing
           a cover image that fills the front cover, but still displaying cat-
           egory and sub-category information in the other usual places.

       -h, --help
           print out the usage message

       -w, --tray-word-wrap
           Enables word wrapping of the items that print on the traycard. Note
           that this is *not* extensively tested and may be buggy! Make sure
           that you preview your label before printing it if you use this
           flag.

           If there is a problem with "-w", the best option right now is to
           split lines in the input itself, and to omit the "-w" option.

       -m, --create-slim-cover
           Creates covers suitable for use in slim cd-cases, this means no
           tray card (the tray card is now the inside front cover).  This cre-
           ates a two page, folding cover insert. This could also be used in
           normal cd cases.

       -O, --slim-cover-foldout
           Output slim cd cover cases with the order of the pages switched so
           the folding line lies on the outside of a normal cd case.

       -M, --create-envelope
           Creates covers suitable for use as envelopes for a CD. Guide lines
           are printed, to aid in folding the printout correctly.

       -p, --clip-items
           Enables clipping of items; uses fixed font size for all items.
           Normally, the template.ps used by cdlabelgen will try to fit an
           item in a given column by reducing the font size if needed. This is
           ok if done for one or two items, but if done too often, it makes
           the tray card look ugly, with text of varying font sizes.

           Use this option to use a fixed width font for all items. If the
           item is too large to fit in a column, the text will be clipped
           instead.

       -y, --page-offset <y_offset_inches>
           Use this to move the entire output up or down, to make the output
           fit on appropriate sized paper. For letter sized paper, 0.8 works
           well, and for A4 paper, 1.5 works well. The value is in units of
           inches.

       -l, --line-width <line_width_points>
           Specify size in points of the edge and interior lines of the cover
           and tray card.  If this is 0, then the lines are omitted for both
           the cover and tray (but guide cut lines are still printed). The
           size is specified in points (1 point is 1/72 inch).

       --plaque-color <r,g,b>
           Specify a color to fill plaque.  Color must be specified using the
           rgb components, each value should be between 0 and 255.

       --category-color <r,g,b>
           Specify a color for category.  Color must be specified using the
           rgb components, each value should be between 0 and 255.

       --subcategory-color <r,g,b>
           Specify a color for subcategory.  Color must be specified using the
           rgb components, each value should be between 0 and 255.

       --text-color <r,g,b>
           Specify a color for text - this is used for the list of items, and
           the date display under the plaque and in the end-caps.  Color must
           be specified using the rgb components, each value should be between
           0 and 255.

       -n, --number-in-set <string>
           Append volume information to the end of the date string.  This
           should be a single string.  If used in conjuction with "-D", it
           will be in place of the date; otherwise, it is appended to the date
           as " - <number-in-set>"


EXAMPLES

           cdlabelgen -c "My Filesystem"
                        -s "/usr/local/foo"
                        -e postscript/recycle.eps > foo.ps

           cdlabelgen -c "title of cd"
                        -s "subtitle"
                        -i "Item 1%and Item 2%a third item here perhaps"
                        -e postscript/recycle.eps > bar.ps

           cdlabelgen -c "Fitz"
                        -s "home directory"
                        -o qux.ps

           cdlabelgen -c "Backups"
                        -s "home directory"
                        -n "4 of 5"


CHARACTER ENCODINGS - using ogonkify

       cdlabelgen uses the Helvetica family of fonts for various text items,
       using the default encoding of ISO-Latin1.

       To use other encodings, the "ogonkify" program can be used; this is a
       package available at http://www.pps.jussieu.fr/~jch/software/ogonkify/
       The output from cdlabelgen can be piped into ogonkify, example for
       Latin2 encoding:

          cdlabelgen <args>  │ ogonkify -H -eL2    > <outputfilename>

       See the man page for ogonkify for other possible values for the encod-
       ing.

       Hint: if you always work with a particular encoding, you can just run
       ogonkify on template.ps - and use the output as the new template.ps.

          ogonkify -H -eL2 template.ps > template-enc.ps

       This way ogonkify has to be run only once, cdlabelgen output will con-
       tain the correctly encoded fonts from the modified template.ps. Use the
       -t cdlabelgen option to specify the new template-enc.ps file, or save
       the old template.ps and renmae template-enc.ps to template.ps.


PRINTING

       When using tools such as Adobe Acrobat to print the .ps or a .pdf file,
       make sure that "Fit To Paper" option is unchecked.  Also uncheck any
       option that will perform scaling up or down of the cdlabelgen output
       file.

       Failure to do so will result in incorrect size printouts.


AUTHOR

       Currently maintained by Avinash Chopde <avinash@aczone.com>

       Original author: B. W. Fitzpatrick <fitz@red-bean.com>


THANKS

           - Karl Fogel, for general encouragement and that free software vibe
           - Adam Di Carlo, for bug testing, help and making the .deb
           - Greg Gallagher, for bug testing, coding, and tons of suggestions
           - Goran Larsson, for feedback and date fixes
           - Jens Claussen, for the patch to allow arbitrary ISO-Latin1 characters
           - Bernard Quatermass, for contributing several excellent new features
           - Sebastian Wenzler <sick@home.and.drunk.at> for reports, tests, RPM [’01]
           - Peter Bieringer <pb@bieringer.de> for RPM .spec file [’02]
           - Ronald Rael Harvest <number6@cox.net> for original envelope template [’02]
           - Alessandro Dotti Contra <alessandro.dotti@libero.it> for color support,
               man page and other improvements [’02]
               Mathias Herberts
           - Mathias Herberts <Mathias.Herberts@iroise.net>, for slim cdcase foldout


ERRATA

       Perhaps one of the most important features that I wanted in a CD
       labelling program was the ability to print Title/Subtitle, and date
       information on the endcaps of the CD jewel box to allow me to keep
       archive disks in a standard CD rack and find a particular one without
       yanking them all out and shuffling through them like a deck of cards.

       cdlabelgen was inspired by the need for not only a simple cd labelling
       program (there are many available), but by the need for a free
       labelling program which could be integrated easily with scheduled CD
       archiving routines. I did find a program called cdlabel
       http://londo.ncl.ac.uk/~npac/cdlabel/, but that one is designed to work
       with CDDB.

       I searched the net for a suitable program, but found none, so taking
       cues from programs that I found that perform similar tasks (like tape
       labellers and DAT labellers), I embarked on this venture. Notable
       inspiration came from the incredible audio-tape.ps by Jamie Zawinski
       (which is indeed, as Jamie notes, completely out of control). Other
       ideas were drawn from casslabel.c, and cdlabel.cc (noted above).

       Please report bugs and submit any patches to the current author’s email
       address.


TODO

        ** Ability to change the text style on a given line:
           {#B}Track#  {#P}Title   {#I} Text...
           [Workaround available: just use multi columns input, use blank
            lines to spread out input items into columns]

        ** Ability to select or specify fonts for the text/items



perl v5.8.0                       2003-09-08                     CDLABELGEN(1)

Man(1) output converted with man2html