Omni Systems, Inc.

  

Mif2Go User's Guide, Version 33u53

  

Valid HTML 4.01!

 

Made with Mif2Go

32 Automating Mif2Go conversions > 32.7 Renaming HTML files for automated systems > 32.7.5 Including identifiers and sequence numbers in file names


32.7.5 Including identifiers and sequence numbers in file names

To ensure uniqueness of file names for split files, you might want to include in the file-name prefix or suffix either or both of the following predefined macro variables:

<$$_fileid>

FileID (as specified in mif2go.ini) of the FrameMaker file from which the file was split

<$$_splitnum>

A sequential number whose starting value and increment you can specify

To specify a starting value (default 0) and increment (default 1) for <$$_splitnum>:

[HtmlOptions]

SplitNumStart=0

SplitNumIncrement=1

The value of <$$_splitnum>:

begins at SplitNumStart for the first split file

increments by SplitNumIncrement for each subsequent split file

starts over again at SplitNumStart for each FrameMaker file.

You can format <$$_splitnum> to include leading zeroes, and to specify the number of digits; see §27.5.3 Displaying expression results in output. For example:

[StyleFilePrefix]

Head*=<$$_fileid><$$_splitnum as %0.3d>

You could use predefined macro variable <$$_basefile> instead of (or in addition to) <$$_fileid>, to supply in a prefix or suffix the base name of the FrameMaker file from which each HTML file was split:

[StyleFilePrefix]

Head*=<$$_fileid><$$_basefile><$$_splitnum as %0.3d>

Sequence numbers have their drawbacks

There are good reasons not to use sequence numbers in file names. With sequence numbers, almost any revision can result in changes to file names. If you insert a new topic, every topic that follows gets a new file name. The default Mif2Go file naming method ensures the exact opposite: that hardly any revisions result in a file name change; the most you usually get is a name addition for an added topic. Mif2Go does not change the file names for all the following topics when you insert a new topic. Why is this important? Because any links from other documents and projects, possibly created by other writers, will be broken unless you rebuild absolutely everything in the document system, which could be thousands of files. With the default method, nothing will break. If you think you are the only one who cares about those links, do you know that will always be the case?

 



32 Automating Mif2Go conversions > 32.7 Renaming HTML files for automated systems > 32.7.5 Including identifiers and sequence numbers in file names