Hi,
I've recently changed the packaging format for the PostScript named
resource delivery method [1] for BWIPP so that the resource files are
now ASCII85 encoded. This makes them a lot more suitable for copying
and pasting into PS documents.
They now look something like this:
% uk.co.terryburton.bwipp/code39
currentfile /ASCII85Decode filter cvx exec
06:]HE+*6lBl7Q+GA(Q.AKZ>=Df?h/F`MM6DKKi+@r#drB-;;:F_)\:ATVm"@r#drB71n:AdU78
A8,Oq+:;Y%E$-fSASu<uDIm6s+CoV6+>7kQ/n8fPFCfK5H"(o:FDl%L@WuO*E$/b,DIdd!F)Q2A
...
A9Di6Ci<`m+>7kQ/n8fPFCfK5H"(o:FDl%L@WuO*E$/\&Anc-oEb0<1F`Lu'+E27<$>"*c$86I3
FDtYuCM@[!+EqL1Eb-A?E,T\<F(KH4@:O(eDJ+A?Bk@\~>
As you can see (with a monospace font) these procedure blocks are
neatly delimited and have a regular line length which makes them
appear very neat when combined with other code.
I have added an example of one such direct use of a named resource to
the repository [2]. The ltoltapelabel.ps script includes the necessary
resource definitions from BWIPP and creates a sheet of
consecutively-numbered tape label suitable for LTO tapes. Thanks to
Matthew Newton [3] for the original code from which this example is
derived.
[1] http://postscriptbarcode.googlecode.com/svn/branches/resource/
[2] http://postscriptbarcode.googlecode.com/svn/scripts/Examples/PostScri...
[3] http://www.newtoncomputing.co.uk
Thanks,
Terry
----
P.S. Despite looking somewhat opaque there's nothing cryptic about the
resource block. They can be trivially decoded into plain ASCII with a
simple bit of PostScript...
File decode.ps:
%!PS
/in (%stdin) (r) file /ASCII85Decode filter def
/out (%stdout) (w) file def
{in read {out exch write} {exit} ifelse} loop
out closefile
in closefile
Invoked from a shell as:
$ cat infile.ps | gs -q -dNOPAUSE -dBATCH -sDEVICE=nullpage decode.ps
> outfile.ps