Next / Previous / Contents / TCC Help System / NM Tech homepage

Abstract

Describes a program that indexes bird photos using Web pages.

This publication is available in Web form and also as a PDF document. Please forward any comments to tcc-doc@nmt.edu.

Table of Contents

1. Introduction
2. Definitions
2.1. Ancestor
2.2. Contained in
2.3. Descendant
2.4. Referred to
2.5. Inverted English name
3. Operation of the catweb script
3.1. The index page
3.2. The form page
4. XHTML output
4.1. XHTML design considerations
4.2. XHTML for the index page
4.3. XHTML for the form page
5. Styling with CSS
6. Analysis notes
7. Design notes
8. Code prologue
8.1. Module imports
9. Manifest constants
9.1. CSS_STYLESHEET: Stylesheet name
9.2. FORM_SUBDIR: Form subdirectory name
9.3. FULL_FRAME_MM2: Full frame size for 35mm
9.4. INDEX_PAGE: Name of the index page
9.5. MM_PER_IN: Conversion factor
10. The main program
10.1. addArchive(): Process one archive's worth of catalog entries
10.2. addArchImage(): Add all forms for one image
10.3. buildWeb(): Build all Web pages
10.4. webPage(): Create an empty XHTML page
11. class TaxonPhotoSet: The taxonomic tree node
11.1. TaxonPhotoSet.__init__(): Constructor
11.2. TaxonPhotoSet.addArchImage(): Add one photo
11.3. TaxonPhotoSet.__addReferred(): Basis case
11.4. TaxonPhotoSet.__addContained(): Recursive case
11.5. TaxonPhotoSet.walk(): Walk the tree
11.6. TaxonPhotoSet.nForms(): Number of contained forms
11.7. TaxonPhotoSet.genForms(): Generate referred FormPhotoSet objects
11.8. TaxonPhotoSet.buildPage(): Construct XHTML
11.9. TaxonPhotoSet.__buildSingleForm(): The taxon has only one form
11.10. TaxonPhotoSet.__webName(): Fill in scientific and English names
11.11. TaxonPhotoSet.__buildMultiForms(): The taxon has multiple forms
11.12. TaxonPhotoSet.__buildFormLine(): Build one form link and form page
12. class FormPhotoSet: All photos for one name
12.1. FormPhotoSet.__init__(): Constructor
12.2. FormPhotoSet.addArchImage(): Add one photo
12.3. FormPhotoSet.genArchImages(): Generate contained photos
12.4. FormPhotoSet.pathName(): Form page relative path name
12.5. FormPhotoSet.buildPage(): Build the XHTML page for one form
12.6. formSet.__buildTable(): Build the image table
12.7. formSet.__addRow(): Generate one row of the table
12.8. FormPhotoSet.__addThumbnail(): Add the thumbnail cell
12.9. FormPhotoSet.__addSize(): Add the size cell
12.10. FormPhotoSet.__addData(): Add the cataloging data cell
13. Epilogue
14. Defect statistics
14.1. Syntax errors
14.2. Strong typing errors
14.3. Logic errors

1. Introduction

This document describes a program that builds a set of Web pages that index a collection of bird photos. See these related documents for other pieces of this system:

  • An XML-based image cataloging system. Start here with an explanation of the basic requirements for the system, and the format of the XML catalog of images.

  • archx: A program to index a photo archive. This document explains how scans are organized into CD-sized directories, and provides a program to build XML-based indices of the contents of each directory. It also reduces each image to a standard thumbnail size and places the thumbnails in a separate directory.

  • A system for representing bird taxonomy. Because it is customary to organize bird records in phylogenetic order, this system slots birds into biological classifications.

Once images are cataloged, scanned, and placed into archive directories, the catweb script builds a set of web pages that list all images according to what kinds of birds are found in each image, with thumbnail images.