Richards Center at Yale University
RC Home | Search | Table of Contents | General Information

Last Modified: Thursday, 09-Mar-2006 15:46:44 EST

Listing of this directory

This is a proposal only.

Label templates

Creating a label for a CD or DVD requires 4 steps:
  1. Copy or create a DVD-shaped background image to a JPEG file
  2. Add fixed text to the image
  3. Add user-specified text to the image
  4. mask, scale and copnvert the image to PDF format

This document addresses steps 2 and 3.

What is a template?

Where are templates stored?

Standard CSB templates will be in /srv/local/backup/labels/, at least for now. Programs and scripts should use the variable $tpdir to refer to the template directory, and should allow $tpdir to be specified on the command line.

Template files should have the extension .tpl, eg, xtalarchive.tpl.

What is the format of template files?

Template files specify what text will be printed on a label, and where it will be printed.

A label is 732 pixels in diameter, with a 140-pixel unprintable hub space in the center. There are 150 pixels/inch.

In the template file, coordinates are specified in pixels, offset from the UL corner of a square enclosing the DVD. Font sizes are in points.

Template files contains a series of IDs. Each ID contains an (optional) label field and an (optional) specification field for a user-supplied value. Each line specifies one field. The format is:

ID pos type size color font max content

Example

A possible template for xtal archives.
title1 300,70 14 blue times LABEL 0 0 Yale University Headline to go in the top center of the disc
title2 218,100 14 blue times LABEL 0 0 Center for Structural Biology
Project 200,130 14 darkred times SPEC 25 1 Ribosome No fieldname is printed for this -- only the user-supplied single word.
facility 125,185 12 blue times LABEL 0 0 Collected at: These 2 lines result in something like
Collected at: CSB Core
facility 125,300 12 darkred times SPEC 15 0 BNL
comment 500,130 12 darkred times SPEC 120 -4 free-corm comments Up to four lines of comments can be printed here.

What uses template files?

Last Modified: Thursday, 09-Mar-2006 15:46:44 EST


RC Home | Search | Table of Contents | General Information
Richards Center (www.rc.yale.edu) at Yale University (www.yale.edu)
Contact: webmaster_at_ben^rc^yale^edu