Modifying the GED2HTML Output Program

One of the features of GED2HTML is that output processing is completely controlled by a user-specifiable program, called the ``output program.'' The output program is written in a simple programming language designed for this purpose. Versions 3.0 and later of GED2HTML feature a completely new output language that is much easier to use than the horrible template language in older GED2HTML versions. With this new output language, it is possible for mere mortals (including me) to write better and more elaborate GED2HTML output programs. The main disadvantage of the new output language is that it is too flexible, and as a result the size of the standard output program has now grown to over 3300 lines of code! Unfortunately, this can make it somewhat difficult for non-programmers to make substantial modifications to the output format. If you not a programmer, and find the idea of making changes to the output program too daunting, then my best suggestion is to try to be happy with the standard output format, and take advantage of the large number of options settings that are available without modifying the output program.

A copy of the standard GED2HTML output program is provided with the GED2HTML distribution as file "standard.g2h". This output program was preloaded into GED2HTML when it was compiled, and it is the one that is used unless you explicitly supply another. If you are happy with the output produced by the default program, there is no reason for you to change it. Note that GED2HTML supports a large number of options that can be used to perform the most common customizations. However, if you wish to modify the format of the output files in some way that is not supported by any of the options, you can customize the output program to your own taste, and then specify that GED2HTML should use your program instead of the built-in one.

If you want to create your own output program, go ahead. You can't hurt anything. Use the standard output program as a starting point. GED2HTML reads your output program when it starts and reports on errors before attempting to process your GEDCOM. This means that, unlike earlier versions, it is no longer possible to "crash" GED2HTML by supplying an incorrect output program, and consequently GED2HTML output programming is pretty much like programming in a standard programming language. You can edit the output program using, e.g. the DOS "EDIT" program or the "Wordpad" program supplied with Windows 95. It is probably best not to use a word processor to edit the output program, because word processors typically feel free to change all sorts of things like spacing and special characters in the document being edited, which will cause your edited program not to be accepted by GED2HTML.

For full details on the output programming language, see here.

GED2HTML home page

Copyright © 1995-2000 Eugene W. Stark. All rights reserved.
SEND ME EMAIL