This is one of my miscellaneous projects and its status is work in progress.
In my garage, I have lots and lots of drawers. Indeed, I have so many drawers that I can not remember what is in all of them. My solution to this problem is to put labels on the outside of all the drawers so that I know what the drawer contents are. I have written some simple software to generate label files. Since this software is written in STIPPLE, I expect it to be basically useless for anybody except me.
There are three files that are used in concert to produce labels:
The template file looks something like the example below:
+-------------------------+ +-------------------------+ | | | | | $$$$$$$$$$$$$$$$$$$$$$$ | | $$$$$$$$$$$$$$$$$$$$$$$ | | | | | | $$$$$$$$$$$$$$$$$$$$$$$ | | $$$$$$$$$$$$$$$$$$$$$$$ | | | | | +-------------------------+ +-------------------------+ +-------------------------+ +-------------------------+ | | | | | $$$$$$$$$$$$$$$$$$$$$$$ | | $$$$$$$$$$$$$$$$$$$$$$$ | | | | | | $$$$$$$$$$$$$$$$$$$$$$$ | | $$$$$$$$$$$$$$$$$$$$$$$ | | | | | +-------------------------+ +-------------------------+The example above has four labels, where each label has two fields. The fields are indicated by the strings of dollar signs "$$$...$$$". There is nothing magical about the choice of a dollar sign as the label field indicator, any character can be used; however, it is easier if a character that is not otherwise used in the template file is used. In the example above, percent (%) or at-sign (@) would work just as easily as dollar sign, but plus sign (+) and minus sign (-) would be much more tedious.
The mapping file consists of ordered triples of the form:
{Label_number} {Field_number} {Characters}where each field is used as follows:
The mapping file for the template example above is:
1 1 $C 2 1 $C 1 2 $C 2 2 $C 3 1 $C 4 1 $C 3 2 $C 4 2 $CThis mapping file basically says that the first sequence of dollar signs in the file corresponds to the first field of the first label, second sequence corresponds to the first field of the second label, the third sequence corresponds to the second field of the first label, etc. All fields are centered, with error reporting left on by default.
The values file has the following format:
{label_name}: {field_value1} ... {field_valueN}Continuation lines are indicated by just starting them with some sort of whitespace (space or tab.) Comments are lines that start with a sharp sign (#). The field values consist either of a single word, where a word is defined as any sequence of characters not including a space, or a quoted string. The quoted string can use either single quotes (') or double quotes ("). For now, there is no escape character within quoted strings.
An example label file looks as follows:
1: "1/4 Inch #6 32 TPI" "Round Head Machine Screws" 2: "3/8 Inch #6 32 TPI" "Round Head Machine Screws" 3: "1/2 Inch #6 32 TPI" "Round Head Machine Screws" 4: "5/8 Inch #6 32 TPI" "Round Head Machine Screws" 5: "3/4 Inch #6 32 TPI" "Round Head Machine Screws" 6: "1 Inch #6 32 TPI" "Round Head Machine Screws"For this example, each label has two fields. The labels are given the unimaginative names of 1 through 6.
The labelgen
program is used to generate
the labels. The command line arguments for
labelgen
are:
labelgen
basename labelname1 ...
where
There are some other files associated with this project:
labelgen.sts
labelgen
source code.
(Remember, this source code is written in
STIPPLE, so there is a good chance
that you really do not want to bother
with looking at it.
makefile
Makefile
that builds
the labelgen
program.
organizer.template
organizer.mapping
organizer.values