MERG Content-to template MERGer Written by Jan Michael Ibanez README.TXT Instructions on using MERG Introduction ------------ MERG combines specially marked template HTML files with formatted content files. To properly use this utility, this file will guide you on how to create the template HTML files and how to create the content files. Using MERG ---------- MERG is executed from the DOS prompt. (If you do not know how to use the DOS prompt, or are unfamiliar with it, ask someone knowledgeable to help you.) MERG is invoked with this command line: MERG [-hnlq][e errfile] template.htm content ... (Text between [ and ] are optional) The following are the switches used with MERG: h Suppresses HTML in the content files. As of version 1.0 this feature is unsupported. n Discard content name. Ordinarily, the output HTML files will have the name content.html, where content is the filename of the content file. However, turning on this switch will output files with names outN.html, where N is a number. l Truncate Long File Names. This switch allows HTML files to be used in systems which don't support long file names (LFN). q Quiet mode. Turning on this switch suppresses all informational text. Error text will still be displayed, however (see next switch for error text). e errfile The 'e' switch specifies that MERG write error messages to the file specified by the name 'errfile'. WARNING: If errfile already exists, it will be overwritten. A sample command line would be: C:\> MERG -nl template.htm content1 content2 *.mc which will instruct MERG to cut filenames to eight characters and output 'out00001.htm', 'out00002.htm', etc. MERG will process content1, content2, and all files with the extension 'mc' as content files. Formatting Content Files ------------------------ Content files are formatted this way: .sectionname text to fill section .end .sectionname2 text to fill section .end . . . where each section name is preceded by a '.' (period). Each section is then ended with the declaration '.end'. Formatting the Template ----------------------- Templates are ordinary HTML files. To convert them to be used with MERG, add the following tag: replacing 'name' with an appropriate section name. (WARNING: Names are case-insensitive.) These tags will then be replaced by the equivalent section from a content file. For example, a simple template file: Simple

merged with the content file .sec1 This is a test .end will produce an HTML file Simple

This is a test Testing MERG ------------ If you want to see MERG at work, run it. Included are two files: a.tst and c.tst. Run MERG with this command line: C:\> merg a.tst c.tst This should spew out the following: MERG Content-to-template MERGer v1.1, by Jan Michael Ibanez. Built under mingw32. Distributed under the GNU General Public License Copyright Jan Michael Ibanez 2001 ABSOLUTELY NO WARRANTY provided. Report bugs and feature suggestions to Parsing template: a.tst Processing file "c.tst" using template... 4 out of 4 matched, 3 default sections. Done. If it does, MERG is working. You should have a new file in the current directory named c.htm. Bugs, problems, and suggestions ------------------------------- If you have any bugs, problems, and suggestions with MERG, please email me at . MERG is distributed under the GNU General Public License, see license.txt for more information. Email me if you want a copy of the source code.