Blame example/8.5x11.ps

Packit 23ab03
%!
Packit 23ab03
%%BoundingBox: 25 25 290 900
Packit 23ab03
%%Title: AMANDA Full Page Label
Packit 23ab03
%%Creator: Amanda reporter
Packit 23ab03
%%Pages: 1
Packit 23ab03
%%EndComments
Packit 23ab03
Packit 23ab03
%%%%
Packit 23ab03
%%%% This is a template file used by AMANDA to create 8.5 x 11 inch
Packit 23ab03
%%%% PostScript dump logs for each dump.
Packit 23ab03
%%%%
Packit 23ab03
Packit 23ab03
%
Packit 23ab03
% The label is made up of 6 parts:  statistics, tape name, date,
Packit 23ab03
% header, filesystem list, and the logo.  Geometrically, the label 
Packit 23ab03
% looks like this:
Packit 23ab03
%
Packit 23ab03
%   +----+-------------------+
Packit 23ab03
%   |        TAPE_NAME       |   <- section 'A'
Packit 23ab03
%   | version  Location date |   <- section 'B'
Packit 23ab03
%   +------------------------+
Packit 23ab03
%   |statistics  |  message  |   <- section 'C' | 'F'
Packit 23ab03
%   +----+--+--------+-------+
Packit 23ab03
%   | f# hst fs lvl O-KB C-KB|   <- section 'D'
Packit 23ab03
%   +-------+--------+-------+
Packit 23ab03
%   |       |        |       |   <- section 'E'
Packit 23ab03
%   |       |        |       |
Packit 23ab03
%   v       v        v       v
Packit 23ab03
%
Packit 23ab03
Packit 23ab03
% section 'A' font and position (text centered around this point)
Packit 23ab03
%
Packit 23ab03
/TitleFont		{ /Helvetica-Bold findfont 24 scalefont setfont } def
Packit 23ab03
/TitlePos		{ 321 728 } def
Packit 23ab03
Packit 23ab03
% section 'B' font, position of the date (left justified) and the version
Packit 23ab03
%
Packit 23ab03
/DateFont		{ /Palatino-Bold findfont 11 scalefont setfont } def
Packit 23ab03
/DatePos		{ 580 715 } def
Packit 23ab03
/VersFont		{ /Palatino-Bold findfont 11 scalefont setfont } def
Packit 23ab03
/VersPos		{ 43 715 } def
Packit 23ab03
/LocFont		{ /Helvetica-Bold findfont 12 scalefont setfont } def
Packit 23ab03
/LocPos			{ 321 715 } def
Packit 23ab03
Packit 23ab03
% section 'C' font, start position, and line separation
Packit 23ab03
%
Packit 23ab03
/StatFont 		{ /Courier findfont 9 scalefont setfont } def
Packit 23ab03
/StatPos		{ 43 695 } def
Packit 23ab03
/StatSep		{ 9 } def
Packit 23ab03
Packit 23ab03
% section 'D' font, and field positions (x coord is relative to each column)
Packit 23ab03
%
Packit 23ab03
Packit 23ab03
/HeadingFont		{ /Palatino-Bold findfont 9 scalefont setfont } def
Packit 23ab03
/HeadingFilePos		{ 43 644 } def
Packit 23ab03
/HeadingHostPos		{ 73 644 } def
Packit 23ab03
/HeadingFsPos		{ 198 644 } def
Packit 23ab03
/HeadingLvlPos		{ 333 644 } def
Packit 23ab03
/HeadingOSizePos1	{ 403 652 } def
Packit 23ab03
/HeadingOSizePos	{ 403 644 } def
Packit 23ab03
/HeadingCSizePos1	{ 483 652 } def
Packit 23ab03
/HeadingCSizePos	{ 483 644 } def
Packit 23ab03
Packit 23ab03
Packit 23ab03
% section 'E' font, and line separation
Packit 23ab03
%
Packit 23ab03
/HostFont		{ /Courier findfont 9 scalefont setfont } def
Packit 23ab03
/HostSep		{ 10 } def
Packit 23ab03
/HostBasePos		{ 38 630 } def
Packit 23ab03
Packit 23ab03
% section 'F' font, and line separation
Packit 23ab03
%
Packit 23ab03
/MessFont		{ /Courier findfont 9 scalefont setfont } def
Packit 23ab03
/MessPos                { 215 702 } def
Packit 23ab03
/MessSep		{ 9 } def
Packit 23ab03
Packit 23ab03
Packit 23ab03
% the following rectangles separate the regions
Packit 23ab03
%
Packit 23ab03
/TitleBox		{ 590 750 38 710 } def
Packit 23ab03
/StatBox		{ 590 710 38 660 } def
Packit 23ab03
/HeadingBox		{ 590 660 38 640 } def
Packit 23ab03
/HostBox		{ 590 640 38 0 } def
Packit 23ab03
/CFline                 { 208 710 208 660 } def
Packit 23ab03
Packit 23ab03
Packit 23ab03
Packit 23ab03
Packit 23ab03
%%%%
Packit 23ab03
%%%% END OF USER-CONFIGURABLE OPTIONS
Packit 23ab03
%%%%
Packit 23ab03
%%%% the rest of this file contains the internal functions that are used
Packit 23ab03
%%%% by genlabel to draw the label
Packit 23ab03
%%%%
Packit 23ab03
Packit 23ab03
Packit 23ab03
%
Packit 23ab03
% Initial Setup... draws everything that is the same for all labels
Packit 23ab03
%
Packit 23ab03
Packit 23ab03
% function to draw a box
Packit 23ab03
%
Packit 23ab03
/box {
Packit 23ab03
	/ury exch def
Packit 23ab03
	/urx exch def
Packit 23ab03
	/lly exch def
Packit 23ab03
	/llx exch def
Packit 23ab03
Packit 23ab03
	llx lly moveto
Packit 23ab03
	llx ury lineto
Packit 23ab03
	urx ury lineto
Packit 23ab03
	urx lly lineto
Packit 23ab03
	closepath
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
Packit 23ab03
% move the origin up a bit
Packit 23ab03
%
Packit 23ab03
0 20 translate
Packit 23ab03
Packit 23ab03
% draw all of the boxes
Packit 23ab03
%
Packit 23ab03
0 setgray 
Packit 23ab03
2 setlinewidth					% thick lines
Packit 23ab03
StatBox box stroke
Packit 23ab03
TitleBox box stroke
Packit 23ab03
HeadingBox box stroke
Packit 23ab03
HostBox box stroke
Packit 23ab03
CFline moveto lineto stroke
Packit 23ab03
Packit 23ab03
Packit 23ab03
HeadingFont
Packit 23ab03
HeadingFilePos  moveto
Packit 23ab03
  (File #) show
Packit 23ab03
HeadingHostPos moveto
Packit 23ab03
  (Host) show
Packit 23ab03
HeadingFsPos moveto
Packit 23ab03
  (File System) show
Packit 23ab03
HeadingLvlPos moveto
Packit 23ab03
  (Level) stringwidth pop 2 div neg 0 rmoveto (Level) show
Packit 23ab03
HeadingOSizePos1 moveto
Packit 23ab03
  (Original) stringwidth pop 2 div neg 0 rmoveto (Original) show
Packit 23ab03
HeadingOSizePos moveto
Packit 23ab03
  (File Size (KB)) stringwidth pop 2 div neg 0 rmoveto (File Size (KB)) show
Packit 23ab03
HeadingCSizePos1 moveto
Packit 23ab03
  (Compressed) stringwidth pop 2 div neg 0 rmoveto (Compressed) show
Packit 23ab03
HeadingCSizePos moveto
Packit 23ab03
  (File Size (KB)) stringwidth pop 2 div neg 0 rmoveto (File Size (KB)) show
Packit 23ab03
Packit 23ab03
Packit 23ab03
%
Packit 23ab03
% the following functions draw strings for each kind of information
Packit 23ab03
%
Packit 23ab03
Packit 23ab03
/CurrStatY StatPos exch pop def
Packit 23ab03
/CurrMessY MessPos exch pop def
Packit 23ab03
HostBasePos /CurrColumnY exch def
Packit 23ab03
/CurrColumnX exch def
Packit 23ab03
Packit 23ab03
Packit 23ab03
% DrawStat draws the string on the top of the stack in the next position
Packit 23ab03
% in section 'A'
Packit 23ab03
%
Packit 23ab03
/DrawStat {
Packit 23ab03
	StatFont
Packit 23ab03
	StatPos pop CurrStatY moveto
Packit 23ab03
	show
Packit 23ab03
	/CurrStatY CurrStatY StatSep sub def
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
Packit 23ab03
% DrawTitle draws the string on the top of the stack in section 'B'
Packit 23ab03
%
Packit 23ab03
/DrawTitle {
Packit 23ab03
	TitleFont
Packit 23ab03
	TitlePos moveto
Packit 23ab03
	dup stringwidth pop 2 div neg 0 rmoveto
Packit 23ab03
	show
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
Packit 23ab03
% DrawDate draws the string on the top of the stack in section 'C'
Packit 23ab03
%
Packit 23ab03
/DrawDate {
Packit 23ab03
	DateFont
Packit 23ab03
	DatePos moveto
Packit 23ab03
	dup stringwidth pop neg 0 rmoveto
Packit 23ab03
	show
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
% DrawLoc draws the string on the top of the stack in section 'C'
Packit 23ab03
%
Packit 23ab03
/DrawLoc {
Packit 23ab03
	LocFont
Packit 23ab03
	LocPos moveto
Packit 23ab03
        dup stringwidth pop 2 div neg 0 rmoveto
Packit 23ab03
	show
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
% DrawVers draws the string on the top of the stack in section 'C'
Packit 23ab03
%
Packit 23ab03
/DrawVers {
Packit 23ab03
	VersFont
Packit 23ab03
	VersPos moveto
Packit 23ab03
	show
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
% DrawMess draws the string on the top of the stack in section 'F'
Packit 23ab03
%
Packit 23ab03
/DrawMess {
Packit 23ab03
        MessFont
Packit 23ab03
        MessPos pop CurrMessY moveto
Packit 23ab03
        show
Packit 23ab03
        /CurrMessY CurrMessY MessSep sub def
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
% Fill in Location name and message
Packit 23ab03
%
Packit 23ab03
(Magic Software Development, Inc.) DrawLoc
Packit 23ab03
Packit 23ab03
(To restore:) DrawMess
Packit 23ab03
(    position tape at the start of the file and run:) DrawMess
Packit 23ab03
(        dd if=/dev/nrst0 bs=32k skip=1 | zcat | restore -if -) DrawMess
Packit 23ab03
(    or run:) DrawMess
Packit 23ab03
(        amrestore -p /dev/nrst0 <host> <filesystem> | restore -if -) DrawMess
Packit 23ab03
Packit 23ab03
Packit 23ab03
% DrawHost expects six strings to be on the stack.  The strings are 
Packit 23ab03
% Host Name, Partition Name, Dump Level, Tape File Number, and Output Size.
Packit 23ab03
%
Packit 23ab03
/DrawHost {
Packit 23ab03
	HostFont
Packit 23ab03
        .25 setlinewidth			% thin lines
Packit 23ab03
	HeadingCSizePos pop CurrColumnY moveto
Packit 23ab03
	-22 0 rmoveto show
Packit 23ab03
	HeadingOSizePos pop CurrColumnY moveto
Packit 23ab03
	-22 0 rmoveto show
Packit 23ab03
	HeadingFilePos pop CurrColumnY moveto
Packit 23ab03
	show
Packit 23ab03
	HeadingLvlPos pop CurrColumnY moveto
Packit 23ab03
	show
Packit 23ab03
	HeadingFsPos pop CurrColumnY moveto
Packit 23ab03
	show
Packit 23ab03
	HeadingHostPos pop CurrColumnY moveto
Packit 23ab03
	show
Packit 23ab03
        38 CurrColumnY 2.5 sub moveto 590 CurrColumnY 2.5 sub lineto stroke
Packit 23ab03
	/CurrColumnY CurrColumnY HostSep sub def
Packit 23ab03
} def
Packit 23ab03
Packit 23ab03
Packit 23ab03
%%%%
Packit 23ab03
%%%% END OF TEMPLATE FILE
Packit 23ab03
%%%%