Tuesday, March 25, 2014

Batch saving files in FrameMaker 11

I just wrote a Framemaker ExtendScript (Javascript dialect) to save all files in a Framemaker book as MIF.



Specifically, MIF7 in my case (hardwired, needs to be configurable).



Needed it because I use Frame 10-11-12, whereas the techwriter who cleans up my English uses Frame 7.   Frame 7 doesn't run on my PC, at least not reliably, whereas her Windows XP PC cannot run a modern FrameMaker.   And the company runs FrameMaker 7 on an old Sun box that is more than 100x slower than a modern PC for many common actions.



So we are stuck converting files between Framemaker binary .f, format and MIF7.



Doing this by hand for 315 files in just one of our architecture specs is a real pain.  I felt a weight lift off my chest when I ran this for the first time.



--



The script only saves .fm files in the .book.  It does not (yet) find all text inset files.



--



Next on the wishlist: batchify this fm2mif and mif2fm, so that Makefiles, etc., can use it.



I do not know how to invoke FrameMaker on a PC with useful command line arguments specifying, e.g. file or book, and command to run.



Can fake things by changing setup files.  That's fragile.



Perhaps can have ExtendScript parse a text file, and evaluate that.  Risky.