SPOOL(4)                                                 SPOOL(4)

     NAME
          spool, view, print - file spooler viewer and printer

     SYNOPSIS
          o/spool [ -abcdr ] [ -m mnt ] module [ moduleargs ] ...

          view

          print [ printername ]

     DESCRIPTION
          Spool serves a flat directory that can be used to operate on
          files by copying them into it.  What is done to files copied
          into this directory depends on the module given as an argu-
          ment. For example, using view as a module provides a file
          viewer and using print provides a printer spooler. Any mod-
          ule implementing spooler(2) can be used.  Spooled files are
          copied into local storage and kept in the directory served.
          They are handed to module for processing. Removing them
          stops processing them, if the module supports that.

          A file ctl is provided to retrieve status for the spooler.
          For example, when using print it reports the printer status.

          View uses cmd(3) to run a viewer in the host to view the
          file. For example, the file is plumbed on Plan 9 systems and
          given to on MacOSX systems.  Different file formats can be
          viewed by copying them into the directory served.  Usually,
          PDF, PostScript, GIF, JPEG, and other various formats are
          understood, but this depends on the host system used.

          If the file name terminates in .url view reads its contents,
          a URL, and displays the URL in a web browser.

          Print spools files to an underling printer spooler. The
          printer name, given as an argument, is default by default.
          Removing the file attempts to cancel the print job.

          By default, spool speaks Styx using the standard input, for
          use with mount(1). Flag -m can be used to ask spool to mount
          itself at mnt. Options -abc determine the mount flag, as in
          bind(1). Flag -d is used to debug the program, and makes it
          very verbose.

          If flag -r is given, any attempt to read a file copied into
          the spool would launch again the module used to spool the
          file. This is appropriate, for example, when viewing files.

     SOURCE
          /usr/octopus/port/spool.b

     SPOOL(4)                                                 SPOOL(4)

          /usr/octopus/port/lib/view.b
          /usr/octopus/MacOSX/print.b
          /usr/octopus/Plan9/print.b

     SEE ALSO
          spooler(2)

     BUGS
          May not work on some platforms. Also, the files are kept
          hanging around for too long, because we do not know when the
          module (e.g., the host file viewer) would cease using them.