+------------+
! htmlinc.pl !
+------------+

(C) 2002 by Marc 'BlackJack' Rintsch <marc@rintsch.de>

This program is distributed under the terms of the GPL. See "COPYING" for
more details.


Description:

  This little Perl script reads (HTML) files and replaces text between
  special comments with the content of the file mentioned in those
  comments. It is more or less compatible with (and inspired by) Uli
  Meybohm's 'htmlinc' and 'Phase 5' programs (see http://www.meybohm.de/).

  Unlike Meybohm's 'htmlinc' this script includes the files recursivly.


Usage:

  htmlinc.pl <include_dir> <html_file(s)>

  The script reads all given HTML files one by one, includes (recursivly)
  the files mentioned in the special comments, and writes the HTML files
  back.

  Such a comment looks like this:

  <!--INC:"name.inc"-->
    foo
  <!--/INC:"name.inc"-->

  If htmlinc.pl recognizes this block it replaces "foo" with the content
  of the file "<include_dir>/name.inc" but leaves the surrounding comments
  untouched.

  As already mentioned "name.inc" itself may contain comments to include
  yet another file. The level of the recursion is printed on the console
  in brackets after the filenames and is currently limited too 100 includes
  to prevent endless loops.


Experimental (should read: *unstable*) feature:

  Since version 0.3a there is an experimental '--export' switch. With

  htmlinc.pl --export <include_dir> <html_file(s)>

  The script exports all include sections to their files instead of
  including them. This comes handy if you edit a page with includes and
  change them. With that switch you can export the changes and then
  include them in all other pages.

  **Attention**
    - it's just a quick hack and not much tested!
    - it overwrites include files!
