Filtering:
Multifaceted Views of a Single Document
My publication list consists of multiple pages, in which different selections of papers are available depending on topic or other criteria. Several of my papers combine ideas from different topics and are available on multiple pages. I also use a similar sort of filtering in The Geometry Junkyard and Geometry in Action. Here's how I do it.
The idea is simple: a common file, pubs.ff,
contains descriptions of all the papers.
This file is essentially an HTML file, but with extra
lines added to control a program I wrote,
filter.c.
This program copies lines from pubs.ff one at a time.
The control lines tell filter.c
to turn on or off copying based on keywords passed as arguments
to the program. By putting the appropriate control lines in
pubs.ff, the same publication list can be given
many different appearances.
Eventually I hope to do this filtering automatically, as pages are requested, via the CGI interface to the WWW. However until some security questions are resolved, I am currently using a shell script to generate separate files for each view of my publication list.
Advantages of this method include:
- Replacing a large file with many small pages of more focused text leads to better hit rates from web search engines.
- It is easy to maintain a site with hundreds of pages, since to add a page I merely have to add a few lines with that keyword to the source file.
- When I get new information or change existing parts of my files, I only have to change one file instead of finding all places where the information is replicated. This is especially useful for my publications, in which one paper is typically listed in a half-dozen or so pages.
- In web documents consisting of many related pages, all are formatted consistently with each other, and formatting is easy to change for all pages at once.
- It is easy to maintain a list of recently added entries. The filter program provides a mechanism for comment lines recording the date, and to remove entries from the recent list I need merely remove that keyword line from the file.