suPerlative: Development and Public Servers
We actually maintain two complete copies of the WDVL.
One, of course, is the public version you are reading.
The other is our development version. Here is where
we work on new articles and changes to existing ones.
Every evening, the new/changed files
are copied from the development server to the public one.
One of the functions of the ht script is
to add the name of each file, including the path within the WDVL,
and timestamp to a log file. For files we want to move
that are not generated by ht such as images or the home page,
we use a script uw to append the file name to the
log file. When our mirror script is run, this log file is
"rolled over" and used to generate the various files needed to do the
mirroring.
A Perl script called make_mirror.pl
reads the log and creates an associative array of the files to be
mirrored. This eliminates duplicates and also give us the opportunity to
remove files not yet ready to be mirrored.
The Perl script goes on to create four output files:
- Update.ht - a list of the files
updated in the mirror.
The ht_subs.pl script finds the title of each file so the link
uses the page name rather than just the URL.
This file is itself run through the ht pre-processor to create
the actual HTML file.
- mir_tar.sh
- a Unix script to create the tar file
containing all the files that
need to be copied.
If there is an .ht version of a file, it will be included in the tar,
else the .html version will be.
- do_ht.sh
- another Unix script to ht all the moved .ht files on the
public server.
- check.lst - a list of files changed, with their full path name.
This file is used to check for broken links.
These files are only created if there are files to be mirrored.
For example, if the only files changed during the day were those not
yet ready for publication, the four files
would not be created and the mirroring shell would stop.
Once the list for files to copy has been created but before the script
is run to create the tar file, the
vlinks.pl program is run to ensure that there
are no broken links in the pages to be mirrored.
As defined elsewhere, this Perl program reads the named files and
generated an associative array of links, noting the pages the links are
called from. Each link is then checked.
If anything other than an good page is returned,
the broken link is added to the file broken.html as a live link
and the calling page or pages noted. If the
broken.html file is created,
the mirroring script notifies the webmaster that there
may be some broken links and ends.
If no broken links are found,
or when the webmaster is satisfied that they are good, another
Unix script, mirror2.sh
is called which actually creates the tar file of new or
modified files, copies the tar file to the public server,
installs the new files and runs do_ht.sh to re-ht the .ht files.
suPerlative: The Site Map
suPerlative Web Construction !
suPerlative: CGI and Other Scripts
|