Site maintenance
On this page, I give some information on how I maintain
this site.
Editing
For editing, I use a variety of text based editors,
such as:
From my HTML-to-LaTeX program, I
created a HTML syntax and link checker, which also determines
which are the files that have been modified and need to be
uploaded. Furthermore, it also generates the
site statistics as found on my
main page, and the file with all the broken links. The program is
called from the
chkhtml.bat batch-file.
This batch-file is executed from the directory that contains
all the files that make up this web site. It does the following
things:
- A directory listing is sent to the file compare\dir.txt.
- Call the chkhtml.c files and
redirect all the output to the file compare\errors.txt.
This program does the following things:
- Read the file compare\dir.txt
- Scan the start page (given as an argument to the batch-file)
and all the HTML pages that can be reached from this.
Furthermore, it marks all the other files being referenced.
Errors are reported to the standard output. All the
references to external files are written to the
files compare\ext_dest.txt and
compare\broken_ext_dest.txt depending on
whether the reference is broken or not.
- Report all names in the HTML files that are not
being referenced to.
- Read the file compare\ls.txt, which is the
saved directory listing of the files on the ftp-site.
For uploading, I am using WS-FTP. This progam has
an option to save the directory of the ftp-site
that hosts my web site. The files mentioned
in this file are compared with those listed in
compare\dir.txt, and any new or modified
files are printed to the standard output and
a line is added to the batch-file cp2ftp.bat
with a copy command to copy the file to the ftp
sub-directory.
- The site statistics are written to the
home page.
- Sort the file compare\ext_dest.txt to
the file exrefs.txt
- Open the file errors.txt with Notepad.
- Execute the batch-file cp2ftp.bat, which will copy
all new and modified files to the ftp sub-directory.
For uploading, I start-up the WS-FTP program in the ftp
sub-directory. After, all files are uploaded, I press the dirinfo
button for the remote directory, and save the file as
compare\ls.txt. Of course, I also empty the ftp
directory.
I checked all my links to external pages with the free
Xenu
link checker. Instead of letting this program scan all my
files, I usually let it execute on exrefs.txt, which
is generated during the internal link checking.
The program can generate a report, and the
result can be saved to a tab separated file. The
results I save in the file compare\links.txt.
The report I process with the program
exredirect.c, which
produces a file with all the redirections as mentioned in
the report. Each line contains one redirection separated
by a tab-character. I edit this file by hand to see
if any of the redirections really represent an error
(Some site redirect not-found errors to a special page).
A file can be marked as an error by replacing the string after
the tab by something starting with the # character,
for example, with "#not found".
I save this file as compare\redirects.txt.
After, I have done this, I run the program
chkextrefs.c
which reads the contents of the files compare\dir.txt,
compare\links.txt and
compare\redirects.txt. The program will
scan through all the HTML files, and make the
neccesary changes. Any broken link is changed into
a reference to Broken.html?some error|original link.
Whenever a HTML file need to be changed, the changed
file is placed in the converted sub-directory.
The original file is thus not affected. After a sanity
check, the files from the converted sub-directory
can be placed back in original directory.
File exchange
For the exchange of files between the various computers
on which I do my editing (currently only
ester
and the Toshiba laptop), I make use of a MS-DOS floppy. The reason
behind using the MS-DOS filename format, is because the
Toshiba laptop runs under MS-DOS.
I wrote a small C program to support the file exchanges.
For the mapping between the long filename format and the
"short" MS-DOS filename format, it makes use of a file
with the name content.l2s which is stored on
the exchange floppy. When the program is ran, it compares
the files on the floppy with the files on the harddisk
based on the mapping described in contents.l2s.
Based on this, it produces a batch file with all copy
statements for transfering the files. I Usually edit
this batch file first, before I execute it, to remove
the files that I do not want to transfer.
The program is called by the batch-file
syncro.bat, which
is executed in the home directory of all the files that
make up this site. This batch-file makes a directory
listing of this directory in the file compare\dir.txt,
and a directory listing of the floppy in the file
compare\adir.txt. The the
syncro program is called and
the output is directed to the batch-file syncflds.bat,
which is then edited with notepad. On my desktop, I have a
short cuts to the syncro.bat and syncflds.bat
batch-files. In the past, I have used more advanced
programs, and I also experimented with a VB program, but
this simple set-up works the best as it gives me full control
over the whole file copying process.
Although I do not focus on graphics on my web pages,
there is enough of it. Also for my graphics, I use
some simple free programs. These are:
- MGI PhotoSuite SE (Starter Edition) Version 1.06,
which came with the
Phantom 636 scanner.
- XNview Version 1.12 (Dec 16 1999) by
Pierre-e Gougelet.
Freeware.
- QV Version 2.5 by
Cyril Cambiem.
Freeware.
- GIMP version 1.2.0 for
Windows. Freeware, of course!
- MS Paint. Comes with Windows.
(Annabel used QV to make some drawings.)
Scanning text
The best way to scan some text for web display is:
- Scan on 600 dpi with very high contrast and zero
saturation resulting in an almost black-white image.
- Using XNView, average twice with 3x3 pixels.
- Using XNView, reduce size to 15% using bilinear resampling.
- Using XNView, save as GIF with grey scale 256.
- Using QV, turn into grey-16.
- Using QV, save as GIF.
For an example, look at this image,
which is only 21.812 bytes in size. If you zoom
in on these kind of scans, you notice the amouth of grey
pixels in the image, and that the text actually become
less readable.
If you have only a 300 dpi scanner, you can use the
following recipe (thanks to Henk Vink):
- Scan on 300 dpi with very high contrast and zero
saturation.
- Using XNView, average once with 3x3 pixels.
- Using XNView, reduce size to 30% using bilinear resampling.
- Using XNView, save as GIF with grey scale 256.
- Using QV, turn into grey-16.
- Using QV, save as GIF.
Creating transparent GIF's
For creating transparent GIF, I use
my own program program
(8 Kbyte MS-DOS executable),
which I wrote myself after seeing a small perl
script doing the trick. If you run the program it
displays the color table. The program allows you to
give you an index of the color that should be made
transparent and to specify an output file.
Home