
                           UPDATER
                     Free open-source tool
                        www.scriptol.net


Purpose

 This tool copies a part (a menu for example) from a web page to all others
in the site.
They are other methods to share a menu, as iframes, for example, but I was
not satisfied with them.


Commands

updater source
 Copy a part of the source to all web pages in the same directory.
 Web pages are recognized by the extension: htm, html, php, php3, php4,
 php5, xhtml, dhtml...

updater source directory
 Copy a part of the source into all web pages in the directory.

updater source @list
 Copy a part of the source into all web pages in the list file. The
file holds filename with full path of pages, one per line.

updater source #n  [directory | @list]
 n is a letter: 0..9, A..Z, a..z, etc...
 The letter completes the starting tag.


Delimiting the part to copy

These are the basic dafault markers:
 <!--#START#-->
 <!--#END#-->

The code included inside the markers is copied. Both the source page
and the target ones must contains theses delimiters. Inside the target
part the code in markers is replaced.

You can create different markers by replacing the second # symbol in the
starting tag.
Examples:
 <!--#START1-->
 <!--#STARTa-->
etc...
The ending tag remain unchanged.
The letter may be used as option at command line to select a part of the
code.
You can process only a part at one.


Changing the tags

You can change the tags by replacing them in the updater.ini file.
Conditions:
- if you use multiple markers, the number must take place at the
  10 th character.
- preferably the markers must be html comments: <!--   -->


Example of use: www.scriptol.com/sources

The basic tags are used to delimit the main menu. But xml pages have a
different menu that is delimited by <!--#START1--> and <!--#END#-->
I update the pages with two commands:

1) updater index3.php
   This propagates the changes in the main menu into all pages that hold
   the <!--#START#--> starting tag.

2) updater xml.html #1
   This propagates the changes from the xml menu into all xml-related pages
   that hold the <!--#START1--> starting tag (note the 1 in place of the #).


