HTML include

HTML include is a JAVA Application that inserts content from files in a directory into a template file and writes the result files in an other directory.

For example, the content of these pages is inserted into a template, which contains the navigation bar.

 download source

This program is released under the GNU General Public License.

When you run the program, you are prompted for a template file, a source and a destination directory.
The template file contains a ##CONTENT## mark, where the content of the source files is included. (see figure below)
The source directory containts HTML files, of which each will be included into the template and written to the destination directory.
Only code between <head> / </head> and <body> / </body> of the include files will be used.
The body tag is required in the include files, so you can view them seperately in a browser.

Your can use the following commands in the template file:
##DATE##insert the current date
##FILENAME##insert the name of the included file
<!--IFFILENAME "name.html" INSERT "code1" ELSE "code2" --> Inserts "code1" in the output file, if name of included file is "name.html". Inserts "code2" otherwise. The filename argument may contain only a part of the filename (e.g. "name" for "name.html" or "name1.html").
The whole IFFILENAME contruct must be on a single line.
If the HTML code inserted for code1 or code2 contains double quotes ("), these must be escaped by \".

Command line usage:

java -jar HTMLincl.jar template.html source/ destination/
starting it without arguments opens an user interface.


The example files are included in the download archive.

To run this program you need at least version 1.2 of the JAVA Runtime Environment.
 download the latest Java Runtime Environment (JRE)