Add text to end of HTML and image file names
Problem
You need to create two different versions of a single presentation and need to distinguish between the two by adding identifying text to the end of the HTML and image file names that PPT2HTML generates.
For example, a Canadian web developer needed to provide each of their web pages in both French and English.
File naming conventions on their site required that each English-language file end in "-e" and each French-language file with "-f" regardless of file extension.
Where PPT2HTML would ordinarily produce, e.g.
Basename1.htm and Basename1.gif
Basename2.htm and Basename2.gif
etc
they needed
Basename1-e.htm and Basename1-e.gif
Basename2-e.htm and Basename2-e.gif
and
Basename1-f.htm and Basename1-fgif
Basename2-f.htm and Basename2-f.gif
Solution
PPT2HTML supports a filename "postfix" (the opposite of a prefix -- it goes at the end instead of at the beginning).
To use the feature, add one or more of the following lines to the [PPT2HTML] section of PPTools.INI
PostFixFromFilename=3 AskForPostfix=YES Postfix=-fr
PostFixFromFilename=3 (or some other number)
When you convert a file called MyFile-en.PPT, PPT2HTML will pick up the last 3 characters of the filename (ignoring the extension) and tack them onto the end of any HTML or image files it creates. In this example, the postfix will be -en
AskForPostfix=YES
PPT2HTML will ask the user for a postfix each time it converts a PPT file to HTML.
PostFix=-fr (or some other text)
Forces the postfix to -fr (or whatever text you use).
If you want to experiment, you can include all three. They're listed here in order of precedence. In other words, PPT2HTML will search the PPTools.INI file and process instructions in this order:
- Look for PostFixFromFilename=xxx; If found, use it and ignore the other two postfix instructions.
- If no PostFixFromFilename=xxx, look for AskForPostfix and use that if present.
- If no AskForPostfix, look for Postfix=xx and use that if present.
- If no PostFix=xx or PostFix="" (blank) then do nothing, don't use a postfix.