NAME

       cpsencode  -  Embed shell scripts and data files in a Com-
       plete PostScript (CPS) file


SYNOPSIS

       cpsencode file(s) [ -s ] [ -v ] >> PostScript-file


DESCRIPTION

       cpsencode [and cpsdecode]  provide  a  convenient  way  of
       storing  scripts, programs,  and data files as part of the
       single PostScript plot the script  creates.   Thus,  given
       the  resulting  Complete  PostScript  (CPS)  file  one can
       recreate the original script and data  at  a  later  time.
       cpsencode  takes  any  number  of scripts or data files as
       argument and writes the content of each file  to  standard
       output, which you can append to the PostScript file.  This
       extra output is written after a logical EOF marker used by
       PostScript  interpreters  and begins with several comments
       flagged with the PostScript comment %%CPS.  The files  are
       then  written  as PostScript comments.  All data files are
       compressed with  libbz2 functions and converted  to  ASCII
       using a built-in uuencode algorithm.
       To  simplify  file extraction, in particular for those who
       have not installed cpsdecode, the embedded files may  also
       be  extracted  using  a short Bourne shell script provided
       among the comments written to the PostScript file.  Simply
       do  a  grep on '^%CPS' to learn how to pull out the script
       with sed.  Windows (DOS) users must use the cpsdecode pro-
       gram (binaries available from the CPS web site).

       -s     Strips  off leading directory paths from file names
              so that cpsdecode will extract all  embedded  files
              into the current directory [Default uses full path-
              name].

       -v     Reports on the progress.


EXAMPLES

       Let us say you have a cshell  script  called  Figure_8.csh
       which  creates  the  PostScript  file  Figure_8.ps.   Fig-
       ure_8.csh requires the data files topo.grd,  lines.d,  and
       captions.txt  in  order  to  make the plot.  You turn this
       plot file into a Complete PostScript (CPS) file  with  the
       command

       cpsencode  Figure_8.csh  topo.grd  lines.d captions.txt >>
       Figure_8.ps

       Alternatively, let that be the last command in the  script
       so that it is automatically done by the script itself.
       To unscramble the CPS file, simply say

       cpsdecode -v Figure_8.ps


SEE ALSO



Man(1) output converted with man2html