Webindex is the Perl script I use to generate the contents page for my personal website. It is inherently somewhat customised to my own needs, but might prove useful to others. This web page constitutes the only available documentation.
You will need:
You can fetch it from CVS via chiark's cvsweb interface; visit this URL:
http://www.chiark.greenend.org.uk/ucgi/~richardk/cvsweb/webtools/webindex
When you have downloaded the script, put it somewhere appropriate in your path and make it executable.
Each HTML file that you want to appear in the contents page should have a couple of META elements inside its header: one to contain a description and one identifting the category that the file falls into. For example, this page has the following:
<meta name=description content="A Perl program for generating HTML contents pages"> <meta name=category content=software>
HTML files that lack these elements will be ignored. Note that only HTML files with names ending .html or .htm will be recognized.
Note that each category must be listed in @categories; see below.
Webindex will attempt to generate thumbnails for any images it discovers. You can suppress this within a directory by creating a .nothumb file.
Currently thumbnails are not actually used by Webindex once they have been generated.
Webindex will only categorize images if there is a corresponding .var file. It looks in the comments for details of the following form:
# summary=A picture of a galaxy # title=Galaxy
Also it looks at the URI: lines to determine which formats the image is available in.
Create a .webindex.conf file in the root of your web document tree. This file is sourced by the script to define certain variables:
By way of example, the .webindex.conf that I used contains the following:
$footer = '<p><a href="./">RJK</a> | <a href="contents.html">Contents</a>'; $title = "Contents"; $style = "rjk.css"; $lang = "en"; @categories = qw(Personal Photos Fiction Articles Postings Reference Software Pictures Unsorted);
Finally run webindex. The contents file will be written to standard output. Various bits of debugging and progress information will be written to standard error.
Please report bugs to me at rjk@greenend.org.uk. You should check that your bug is not fixed in a later version before doing so. If you send a patch, please use "diff -u" format.
Webindex is copyright © 2000, 2001 Richard Kettlewell. You may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA