make_dweeblist
Usage
make_dweeblist
Description
This script generates a "nice" index of users' home pages.
I run it daily out of crontab on the web server. It runs
as "me,", i.e., no special privileges, and the web page is generated
in my web directory. The generated HTML page is here.
Notable features:
- The normal place for a user's web directory is
~user/public_html/; if that directory exists and is visible
to this (unprivileged) script, the user is considered to "have" a
web page. (Random sampling indicates that many are class assignments.)
- Some users don't want to have an entry in the index. There's a
list of those good folks near the top of the script. (Actual user
names don't appear in the version linked below.) The script
checks to make sure these accounts still exist; when the
account goes away, the name can be removed from the list.
- The script assumes the presence of server-side includes to
include a small "style" file and to timestamp the script.
-
Theres nothing particularly brilliant here, but the chores of
alphabetizing and indexing the names, arranging them into a
three-column table (alphabetized in each column, like a real
index would do it, please note!) were interesting. Lots of
Fortran-style
math with row and column calculations. Lots of
opportunities for off-by-one and other boundary
errors. I think it's right, though.
Nothing derogatory is implied by the word "dweeb" in the script's
name, or the generated HTML filename.
Source
Back to
Hacks
Last modified: June 18 2003 13:49 EDT
Paul A. Sand,
pas@unh.edu