📄 3hole.ps
字号:
%!%%BoundingBox: 25 25 290 900%%Title: AMANDA Full Page Label%%Creator: Amanda reporter%%Pages: 1%%EndComments%%%%%% This template file is used by AMANDA to create PostScript dump log%% listings for each run suitable for three-hole punching.%%%% This prologue is based on one from Steven Freed <sfreed@gilasoft.com>%% called 8.5x11.ps and was enhanced with assistance from Dale Talcott%% <aeh@purdue.edu>.%%%% John R. Jackson, Technical Software Specialist, jrj@purdue.edu%%%%/pageSave save def%%%% If you are printing duplex, change the 0 to a 1 in the following line:%%%/DoDuplex 0 def%%%% The following string (inside the parenthesis) will be displayed as% the "Location" (e.g. organization) on each page (see the page format% below).%%%/LocationString (Magic Software Development, Inc.) def%%%% Set the margin widths. This may need adjustment based on how your% printer defines the printable area on a page.%%%/inch { 72 mul % one inch == 72 points} def/mm { 25.4 div % one inch == 25.4 mm inch % convert inches to points} def/TopMargin 0.25 inch def/BottomMargin 0.25 inch def/OddLeftMargin 0.625 inch def % 5/8 inch/OddRightMargin 0.25 inch defDoDuplex 0 eq { % even and odd are the same if duplex is not used /EvenLeftMargin OddLeftMargin def /EvenRightMargin OddRightMargin def} { % otherwise they are reversed /EvenLeftMargin OddRightMargin def /EvenRightMargin OddLeftMargin def} ifelse%%%% A page is made up of these parts. The base name of the internal variable% related to each is shown in parenthesis:%% tape name (Title)% page number (Page)% version of Amanda (Vers)% location (e.g. organisation) (Loc)% date (Date)% statistics (about the Amanda run) (Stat)% message (how to do a restore) (Mess)% header for the filesystem list (Heading)% filesystem list (Host)%% Geometrically, an odd numbered page looks like this:%% +----+-------------------+% | TAPE_NAME page | <- section 'A'% | version location date | <- section 'B'% +------------------------+% |statistics | message | <- section 'C' | 'F'% +----+--+--------+-------+% | f# hst fs lvl O-KB C-KB| <- section 'D'% +-------+--------+-------+% | | | | <- section 'E'% | | | |% v v v v%% Even numbered pages look the same unless DoDuplex is turned on, in% which case the "page" field is on the left and the gutter width for% the punch is on the right (instead of the left).%%%%%%% section 'A' fonts and strings%%%/TitleFontSize 24 def % 24 point Helvetica-Bold/TitleFont /Helvetica-Bold findfont TitleFontSize scalefontdef/PageFontSize 11 def % 11 point Palatino-Bold/PageFont /Palatino-Bold findfont PageFontSize scalefontdef/PageString1 (Page ) def/PageString2 ( of ) def%%%% section 'B' fonts and strings%%%/VersFontSize 11 def % 11 point Palatino-Bold/VersFont /Palatino-Bold findfont VersFontSize scalefontdef/LocFontSize 12 def % 12 point Helvetica-Bold/LocFont /Helvetica-Bold findfont LocFontSize scalefontdef/DateFontSize 11 def % 11 point Palatino-Bold/DateFont /Palatino-Bold findfont DateFontSize scalefontdef%%%% section 'C' font%%%/StatFontSize 9 def % 9 point Courier/StatFont /Courier findfont StatFontSize scalefontdef%%%% section 'D' font and strings%%%/HeadingFontSize 9 def % 9 point Palatino-Bold/HeadingFont /Palatino-Bold findfont HeadingFontSize scalefontdef/HeadingFileString (File #) def/HeadingHostString (Host) def/HeadingFsString (File System) def/HeadingLvlString (Level) def/HeadingOSizeString1 (Original) def/HeadingOSizeString2 (File Size (KB)) def/HeadingCSizeString1 (Compressed) def/HeadingCSizeString2 (File Size (KB)) def%%%% section 'E' font%%%/HostFontSize 9 def % 9 point Courier/HostFont /Courier findfont HostFontSize scalefontdef%%%% section 'F' font and strings%%%/MessFontSize 9 def % 9 point Courier/MessFont /Courier findfont MessFontSize scalefontdef/MessString1 (To restore:) def/MessString2 ( position tape at the start of the file and run:) def/MessString3 ( dd if=$TAPE bs=32k skip=1 | zcat | restore -ibf 2 -) def/MessString4 ( or run:) def/MessString5 ( amrestore -p $TAPE <host> <filesystem> | restore -ibf 2 -) def%%%%%% END OF USER-CONFIGURABLE OPTIONS%%%% The rest of this file contains the internal functions used to draw%% the page and (hopefully) do not need any changes.%%%%/setTitleFont { TitleFont setfont % make TitleFont current} def/setPageFont { PageFont setfont % make PageFont current} def/setVersFont { VersFont setfont % make VersFont current} def/setLocFont { LocFont setfont % make LocFont current} def/setDateFont { DateFont setfont % make DateFont current} def/setStatFont { StatFont setfont % make StatFont current} def/setHeadingFont { HeadingFont setfont % make HeadingFont current} def/setHostFont { HostFont setfont % make HostFont current} def/setMessFont { MessFont setfont % make MessFont current} def%%%% apush -- increase an array size by one and push a value on the end% usage: value array apush array% example: /jj 0 array def% /jj (first) jj apush def% /jj (second) jj apush def% /jj (third) jj apush def%%%/apush { exch % [ array value ] /.apush exch def % save and pop the value % [ array ] aload % [ old ... array ] length % length of the old array % [ old ... length ] 1 add % bump it by one % [ old ... length+1 ] array % create the new array % [ old ... newarray ] .apush exch % [ old ... value newarray ] astore % store the values % [ newarray ]} def%%%% box -- draw a box% usage: llx lly urx ury box -%%%/box { 3 index 2 1 add index moveto 3 index 0 1 add index lineto 1 index 0 1 add index lineto 1 index 2 1 add index lineto pop pop pop pop closepath} def%%%% concat -- join two strings% usage: str1 str2 concat new%%%/concat { exch % str2 str1 dup % str2 str1 length % str2 str1 str1l 2 index % str2 str1 str1l str2 length add string % str2 str1 new dup dup % str2 str1 new new new 4 2 roll % str2 new new str1 new copy % str2 new new (str1) length % str2 new new newl 4 -1 roll % new new newl str2 putinterval % new} bind def%%%% max -- return the max of two numbers% usage: a b max a_or_b%%%/max { 1 index 1 index % [ a b a b ] lt { exch % [ b a ] } if pop} def%%%% Set the basic drawable area width and height.%%%clippath % make the clip area the pathpathbbox % and get its bounding box % [ llx lly urx ury ]exch % [ llx lly ury urx ]4 1 roll % [ urx llx lly ury ]exch sub % total heightTopMargin sub BottomMargin sub % minus the margins/PageHeight exch def % [ urx llx ]sub % total widthEvenLeftMargin sub EvenRightMargin sub % minus the margins/PageWidth exch defnewpath % zap the path%%%% Define rectangles to separate the regions.%%%/TitleBox { 0 % [ llx ] PageHeight % [ llx PageHeight ] TitleFontSize PageFontSize max % 'A' height 2 add % space between 'A' and 'B' 4 add % space below 'B' VersFontSize LocFontSize max DateFontSize max % 'B' height add % 'A' height+space+'B' height sub % [ llx lly ] PageWidth % [ llx lly urx ] PageHeight % [ llx lly urx ury ]} bind def/StatBox { TitleBox % [ llx lly urx ury ] pop % [ llx lly urx ] 3 1 roll dup % [ urx llx lly lly ] StatStrings length % number of status lines StatFontSize mul % height of status lines MessStrings length % number of message lines MessFontSize mul % height of message lines max % max height 2 add % space above 4 add % space below sub % [ urx llx ury lly ] exch % [ urx llx lly ury ] 4 -1 roll % [ llx lly ury urx ] exch % [ llx lly urx ury ]} def/CFLine { StatBox % [ llx lly urx ury ] 3 1 roll % [ llx ury lly urx ] pop exch % [ llx lly ury ] 3 -1 roll % [ lly ury llx ] setStatFont 0 StatStrings { stringwidth pop max } forall add (nn) stringwidth pop add % left and right padding dup % [ ly uy x x ] 3 1 roll % [ ly x uy x ] 4 1 roll % [ x ly x uy ]} def/HeadingBox { StatBox % [ llx lly urx ury ] pop % [ llx lly urx ] 3 1 roll dup % [ urx llx lly lly ] HeadingFontSize 2 mul % two heading lines 2 add % space above 4 add % space below sub % [ urx llx ury lly ] exch % [ urx llx lly ury ] 4 -1 roll % [ llx lly ury urx ] exch % [ llx lly urx ury ]} def/HostBox { HeadingBox % [ llx lly urx ury ] pop % [ llx lly urx ] 3 1 roll 0 % [ urx llx lly 0 ] exch % [ urx llx lly ury ] 4 -1 roll % [ llx lly ury urx ] exch % [ llx lly urx ury ]} def%%%% Compute the center point for the section 'A' title text.%%%/TitlePos { TitleBox % [ llx lly urx ury ] TitleFontSize sub % [ llx lly urx y ] 3 -1 roll % [ llx urx y lly ] pop % [ llx urx y ] 3 1 roll % [ y llx urx ] exch dup % [ y urx llx llx ] 3 -1 roll % [ y llx llx urx ] exch sub 2 div add % [ y x ] exch % [ x y ]} def%%%% Compute the position of the odd page string (right adjusted).%%%/OddPagePos { TitleBox % [ llx lly urx ury ] 4 -2 roll % [ urx ury llx lly ] pop pop % [ x y ] exch % [ y x ] setPageFont (n) stringwidth pop sub % a little padding exch % [ x y ] PageFontSize sub 2 sub % space above} def%%%% Compute the position of the even page string (left adjusted).% Not used if DoDuplex is off.%%%/EvenPagePos { TitleBox % [ llx lly urx ury ] 4 1 roll % [ ury llx lly urx ] pop pop % [ y x ] setPageFont (n) stringwidth pop add % a little padding exch % [ x y ] PageFontSize sub 2 sub % space above} def%%%% Compute the position of the version string.%%%/VersPos { TitleBox % [ llx lly urx ury ] pop pop % [ llx lly ] exch % [ lly llx ] setVersFont (n) stringwidth pop add % a little padding exch % [ x y ] 4 add % space below} def%%%% Compute the position of the location string (centered).%%%/LocPos { TitleBox % [ llx lly urx ury ] pop % [ llx lly urx ] 3 -1 roll % [ lly urx llx ] dup % [ lly urx llx llx ] 3 -1 roll % [ lly llx llx urx ] exch sub 2 div add % [ y x ] exch % [ x y ] 4 add % space below} def%%%% Compute the position of the date string (right adjusted).%%%/DatePos { TitleBox % [ llx lly urx ury ] pop % [ llx lly urx ] 3 -1 roll % [ lly urx llx ] pop % [ y x ] setDateFont (n) stringwidth pop sub % a little padding exch % [ x y ] 4 add % space below} def%%%% Compute the position of the top status string.%%%/StatPos { StatBox % [ llx lly urx ury ] exch pop % [ llx lly ury ] dup % [ llx lly ury ury ] 3 1 roll % [ llx ury lly ury ] exch sub % [ llx ury box_height ] StatStrings length % number of status lines StatFontSize mul % height of status lines sub 2 div % [ llx ury space_above ] sub StatFontSize sub % [ llx y ] 2 add % space above exch % [ y llx ] setStatFont (n) stringwidth pop add % a little padding exch % [ x y ]} def
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -