MifMucker The MifMucker is an application for manipulating Frame documents and books. It operates as a general front end for passing Frame documents of any type through a series of independent filters for processing. Filters operate on a single representation of the document in memory, hence filters can be chained together. The design is intended to be flexible and extendable. The MifMucker comes with a number of filters. Additional filters can be written and dropped into the MifMucker without modifying the existing engine in any way. Due to this, additional filters can be released and exchanged without the overhead of rereleasing the application itself. MifMucker filters operate on an internal representation of the original document's MIF (Maker Interchange Format). It will dump Frame docs to MIF for you, you should not do it (unless you really really want to). MIF is a complete ASCII representation of a document, including format, structure, contents, graphics, and so on. Anything that is available in MIF (and that's everything*) could be manipulated with a MifMucker filter (MMF). After the document is dumped to MIF, the MifMucker parses the document into huge internal data structures, and the filters are called in the order specified. If a filter modifies the internal data structures, the results can be dumped back to MIF and automatically reloaded to binary Frame files. For example, here at CONVEX we can take FrameMaker V3.1 documents, convert all hanging anchored frames holding headings, notes, cautions, and warnings to be in the normal textflow, convert the document to Frame V4.0, and apply a new V4.0 template all with a single call to the MifMucker. The author need not ever know MIF was involved. The MifMucker can handle documents or books (or direct MIF files) generated by any version of FrameMaker or FrameBuilder on any platform. If a book is passed to the MifMucker, the MifMucker actually applies the filters to each file within the book (ignoring generated files such as the TOC). This makes it easy to apply a filter(s) to all of the files in a book. When the MifMucker is invoked it is passed several things: o options to control its behavior (typical command-line options) o a list of documents (or books) to process. This can also be a text file which names the files to process. This can be useful if you want to process most of the files in a book or directory but not all of them. o a list of filters to send the documents through o extra options to pass to each filter to control its behavior Options may occur in any order, except that the order filters are specified is significant (first come, first served). REQUIREMENTS ------------ The MifMucker requires: o UNIX platform o Perl V4.0 any patch level o Frame (any version) if you want graphics or auto-generation of MIF, which you do, so consider this a requirement. Note that having Frame installed isn't enough, you'll also need to set up the Frame enviornment variables (for the license server). o Graphic conversion programs -- the HTML filter uses FrameMaker to convert graphics to PostScript. So, if you want to convert documents for use with the World Wide Web (WWW), the MifMucker will get the documents into PS. It will call a script (psconvert) to convert the graphics. The script should acts as a wrapper around a third party application that you specify for converting from PS to whatever format you want (probably GIF). As there are a number of free applications on UNIX platforms that can do this already, I decided to not reinvent the wheel (nor limit your choices). So: THE MIFMUCKER HTML FILTER DOES NOT GENERATE GIF FILES. Use something like ImageMagick for conversion from PS to GIF. Works like charm. See the file psconvert for more information. If you don't have a conversion program, that's fine, you'll just get text and PostScript images (which can still be viewed on the web, though not inlined). No big deal. A few notes about ImageMagick. You'll also need GhostScript because that's what ImageMagick uses to read/convert the PostScript. Please read the IM_psconvert file for more info about the ImageMagick tools. USAGE ----- The MifMucker includes default filters that were deemed widely useful. These filters all have individual capabilities, limitations, and options. You can use the -usage option to get a usage message for each individual filter. Likewise, you can use the -filters option to get a list of available filters installed. Running the MifMucker without any command line options (mifmucker) gives a usage message on the MifMucker itself. The default filters are: o html -- converts Frame documents to HTML according to a map file. o ascii -- converts Frame documents to formatted ASCII. o search -- searches across frame documents (includes reg. expressions) o readmif -- parser (internal only) o writemif -- write from memory to mif file. Used as a MIF generator. o fixhead -- converts hanging headings (3.1 side heads) into text flow o noop -- MifMucker filter template. Use this for starting new filters. Remember, when in doubt, type "mifmucker" or "mifmucker -usage " for help.