NAME
          mifmucker - Perl application for manipulating FrameMaker
          files.


     SYNOPSIS
          mifmucker [<flag> ...] [<filter> ...] <file> [<file> ...]

          <flag> is one of:
            -help               Give this help page
            -examples           Give examples of using the MifMucker
            -load               Load files back into Frame binary format
            -Leave              Leave MIF files after use (deleted by default)
            -filters            List available filters with a brief description
            -detail   N         Message detail level (0 is no msgs, 1 is default)
            -usage    filter    Display a usage message for specified filter
            -tmpdir   dir       Use dir for tmp files (default is current dir)
            -mmfdir   dir       Search dir for filters (default is install dir)
            -Pfilter  flag      Pass flag to filter
            -version  version   Use version of Frame when loading back to binary
            -Version            Display the current version of mifmucker

          <filter> is a MifMucker filter.

          <file> is a FrameMaker binary or MIF file, Frame book file, or a
          text file with the names of Frame files (one per line, can include path).

          Arguments can be abbreviated to the first letter (except the
          -P arg, see below).


     INTRODUCTION
          The MifMucker is a Perl application for manipulating
          FrameMaker 3.0, 3.1, 4.0, and FrameBuilder 1.0 files.  Any
          number of MifMucker filters may joined together; each file
          will be passed through the filters in the order specified on
          the command line.

          The MifMucker uses a modular approach to filtering.
          Additional filters can be written and made available without
          any changes to any existing mifmucker files or libraries.
          This provides a modular approach to writing additional
          filters for Frame use, or updating existing filters.

          Currently the following filters exist:

           Filters: Name                        Brief description
                    ---------     --------------------------------------------
                    ascii          Converts MIF to formatted ASCII
                    fixhead        Converts H1 anchored frames to preceeding Paras
                    html           Converts MIF to HTML
                    mif2cgm        Replacement filter for Frame's mif2cgm script
                    noop           Do nothing filter
                    readmif        Reads MIF into memory for other mifmucker filters
                    search         Searches for strings inside of MIF
                    sgml           Converts MIF to SGML
                    writemif       Writes MIF in memory out to storage

          Use the -usage <filter> flag to get a help message on a
          particular filter.


     DESCRIPTION
          The MifMucker consists of two distinct parts - an engine and
          a filter driver.

          The engine processes the command line arguments, collects
          the Frame files for filtering and converts them to MIF if
          necessary, and passes each file to the filter driver.

          The filter driver collects the requested filters together,
          parses the mif file, and passes the MIF file through the
          filters.


     FLAGS
          Each of the MifMucker arguments is described below.  The
          abbreviation, if any, is given after the argument in
          parentheses.

          -help (-h)
               Gives a usage message.  Also given if mifmucker is
               specified with no arguments on the command line.

          -examples (-e)
               Gives examples of using the MifMucker.

          -load (-l)
               Loads the file back to Frame's binary format (normal
               Frame file) after processing.  This is used when the
               purpose of the filtering is to modify the Frame files
               while in MIF format and then return them to binary
               format after modification.  The -load flag is
               automatically set when the -version flag is used.

          -Leave (-L)
               Forces MifMucker to leave all MIF files around after
               processing.  By default, the MifMucker will delete the
               MIF file after it is through with it, even if the MIF
               file was given as input!  So if all you have is one MIF
               file and you run it through the MifMucker without the
               -Leave flag, it is gone forever.  You were warned.

          -filters (-f)
               List available filters at this site and a brief usage
               message for each.

          -detail N (-d)
               Specify the detail level of messages.  The MifMucker
               has lots of messages for explaining what it is doing.
               If the detail is level is set to 0, none of these
               messages are printed.  If it is set to 1 (the default)
               only the most important messages are outputted (like
               when a new filter starts executing).  By increasing the
               detail level (up to 10), you can get more and more
               information on what the MifMucker is currently doing.
               Be forewarned though, a detail setting of 5 is going to
               generate a LOT of output.

          -usage filter (-u)
               Gives a usage message for the specified filter.

          -tmpdir dir (-t)
               Specifies the directory to be used for tmp files.
               Currently not used at all.

          -mmfdir dir (-m)
               Specifies the directory to search for additional
               MifMucker filter files.

          -Pfitler flags
               Passes the specified flags to the specified filter.
               Surround the flags in double quotes to protect spaces.
               This is how you control the behavior of a given filter
               from the command line, and hence is used quite often.
               For a list of flags available to a particular filter,
               use the -usage flag.

          -version version (-v)
               Upload the resulting MIF file back to binary when done
               processing, using the specified version of Frame.  This
               flag automatically sets the -load flag.  Using this
               flag enables you to easily convert Frame docs from one
               version to another.

          -Version (-V)
               Give a version message.


     EXAMPLES
          The following are examples of MifMucker usage:

          % mifmucker
               Gives the help message.

          % mifmucker fixhead ascii UsersGuide.book
               Passes all of the files in the UsersGuide.book file
               through the fixhead filter and then through the ascii
               filter.  This would generate a .txt file for each file
               in the book.

          % mifmucker -v 4.0 chap1.doc chap2.doc
               Converts chap1.doc, chap2.doc, and all the files in the
               reference.book file to be FrameMaker V4.0 files.

          % mifmucker chap1.doc chap2.doc fixhead html
               Passes chap1.doc and chap2.doc through the fixhead
               filter and then the html filter.  Both files will be
               converted to html, so there will be a chap1.doc.html
               and chap2.doc.html file when it is finish.  The -Phtml
               flag tells the MifMucker to pass the next argument "-
               inline gif -ex ps" to the html filter.  The argument is
               actually several flags; the double quotes protects the
               spaces between the flags.  For an explanation of the
               html, refer to the html usage message.  Flags to the
               filters can be abbreviated just like flags to the
               MifMucker.

          % mifmucker fixhead writemif -l mybook.book
               Passes the files in mybook.book through the fixhead
               filter and the writemif filter.  It also reads the
               booklist file (which in this case was a text file
               containing lots of other Frame files or book files) and
               passes each of those Frame files through the filters.
               The writemif filter writes the MIF in memory back out
               to disk.  The -l flag tells the MifMucker to load each
               resulting MIF file (generated by the writemif filter)
               back to Frame binary.

          % mifmucker -L myfile.mif ascii html
               Converts the myfile.mif file to ascii and then to html.
               The -L flag tells the MifMucker to leave the file alone
               after it is done.  Normally it would be deleted.


     CONFIGURATION
          The MifMucker attempts to be very configurable, both in how
          it operates and how the filters operate.

          There are four levels of configuration.  They are all looked
          for, and if found, processed completely.  Thus, later
          configurations can override earlier configurations.  They
          are processed in the order given below:

          MM_ARGS
               This environment variable contains arguments which are
               always passed to the MifMucker.

          global map files
               Most filters, and many of the libraries, have a global
               map file which controls their behavior.  For example,
               there is a global map file for the html filter
               specifying whether or not to convert Frame graphics.
               These global map files typially reflect the most common
               behavior desired for a particular filter.  The
               MifMucker administrator can choose to change global map
               files if the current settings are not the best for the
               site.

          local map files
               Each filter can have a local map file in the current
               directory.  The map file has the same name as the
               filter, with the .map extension.  If the filter finds
               such a map file in the current directory upon
               execution, it process the contents of that file.

          This enables you to customize a filter for a given book or
          file.  By creating a local map file, you can override the
          global map file settings.  The format of the local map file
          is documented in the global map file itself.  If you wish to
          use a local map file, copy the global map file and edit it.
          Use the -usage flag for more details on the map file of a
          given filter.

          command line args
               Command line arguments can be used to set any flag of
               any filter.  This is useful for quickly setting or
               overriding a flag of a given filter for a single
               execution of the MifMucker.  Use the -P flag to pass
               arguments to a given filter.  See the EXAMPLES section
               above for more details.

     NOTES
          The MifMucker is designed to be fed Frame binary files.
          That is, you should not explicitly save your files to MIF
          before sending them to the MifMucker.  The MifMucker will
          take care of that for you.

          However, the MifMucker will accept MIF files if that's the
          format your Frame files are in.  They can be passed to the
          MifMucker just like any other Frame file.  MIF files must be
          valid Frame MIF files, and cannot, at this point, be hand-
          generated MIF.  The parser does not support the MIF
          minimization that Frame products do.

          Filters that convert documents to another format, like the
          ascii and html filters, can operate on the document as a
          single text flow, or as a set of pages.  If your documents
          usually consist of a single text flow from the first body
          page to the last, which is typical for files that are
          chapters of a book, you can process the document as a single
          flow.  This is the default.

          If your document consists of multiple textflows, which might
          occur if it is a set of slides, a newsletter, or an unusual
          page layout, you will want to process the document as a set
          of pages.  This method is slower, but will always give the
          results of recreating each page regardless of the number or
          name of the textflow on each page.  To process pages
          individually, pass the -paged flag to the filter:

          % mifmucker ascii -Pascii paged newsletter.doc
               The above example passes newsletter.doc through the
               ascii filter, which will operate on the document as a
               set of pages.

          If you are in doubt whether to use -paged or not--use it.
          It can never hurt (just slows things down if unnecessary).


     SEE ALSO
          perl(1).

          Programming perl
               Larry Wall and Randal L. Schwartz.
               O'Reilly & Associates, Inc.

          MIF Reference
               Frame Technology Corporation.


     BUGS
          The MifMucker cannot handle Frame MIF files generated by
          hand unless they are done very carefully.

          The MifMucker should not delete MIF files if they were
          passed as input to the MifMucker.

          This man page is missing tons of useful information.

     AUTHOR
          Ken Harward
          harward@convex.com